diff --git a/Cargo.lock b/Cargo.lock index 6f9e5eeada..f098376996 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,16 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" dependencies = [ - "gimli", + "gimli 0.25.0", +] + +[[package]] +name = "addr2line" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +dependencies = [ + "gimli 0.26.1", ] [[package]] @@ -64,9 +73,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991984e3fd003e7ba02eb724f87a0f997b78677c46c0e91f8424ad7394c9886a" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ "getrandom 0.2.3", "once_cell", @@ -108,9 +117,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" +checksum = "ee10e43ae4a853c0a3591d4e2ada1719e553be18199d9da9d4a83f5927c2f5c7" [[package]] name = "approx" @@ -144,9 +153,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "asn1_der" @@ -167,7 +176,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -250,9 +259,9 @@ dependencies = [ [[package]] name = "async-process" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b21b63ab5a0db0369deb913540af2892750e42d949faacc7a61495ac418a1692" +checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" dependencies = [ "async-io", "blocking", @@ -320,9 +329,9 @@ version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -353,9 +362,9 @@ dependencies = [ [[package]] name = "atomic" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281" +checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" dependencies = [ "autocfg", ] @@ -385,16 +394,16 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" +checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" dependencies = [ - "addr2line", + "addr2line 0.17.0", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object", + "object 0.27.1", "rustc-demangle", ] @@ -406,9 +415,9 @@ checksum = "ec107f431ee3d8a8e45e6dd117adab769556ef463959e77bf6a4888d5fd500cf" dependencies = [ "heck", "proc-macro-error 0.4.12", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -532,7 +541,7 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "regex", "rustc-hash", @@ -666,9 +675,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9" +checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" dependencies = [ "async-channel", "async-task", @@ -878,15 +887,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.7.1" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" +checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" [[package]] name = "byte-slice-cast" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0796d76a983651b4a0ddda16203032759f2fd9103d9181f7c65c06ee8872e6" +checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698" [[package]] name = "byte-tools" @@ -962,9 +971,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" +checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" dependencies = [ "jobserver", ] @@ -1065,9 +1074,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" +checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" dependencies = [ "glob", "libc", @@ -1181,7 +1190,7 @@ dependencies = [ "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.25.0", "log", "regalloc", "smallvec", @@ -1347,7 +1356,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" dependencies = [ "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1623,9 +1632,9 @@ version = "0.1.0" source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1805,7 +1814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1814,18 +1823,18 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] name = "derive" version = "0.0.1" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1849,10 +1858,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" dependencies = [ "convert_case", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "rustc_version 0.3.3", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1946,9 +1955,9 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1993,9 +2002,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ "heck", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2013,9 +2022,9 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2024,9 +2033,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e58b112d5099aa0857c5d05f0eacab86406dd8c0f85fe5d320a13256d29ecf4" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2063,9 +2072,9 @@ checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" [[package]] name = "errno" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ "errno-dragonfly", "libc", @@ -2313,9 +2322,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "14.0.0" +version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96616f82e069102b95a72c87de4c84d2f87ef7f0f20630e78ce3824436483110" +checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" dependencies = [ "cfg-if 1.0.0", "parity-scale-codec", @@ -2357,9 +2366,9 @@ source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec3698090 dependencies = [ "Inflector", "frame-support-procedural-tools", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2369,9 +2378,9 @@ source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec3698090 dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2379,9 +2388,9 @@ name = "frame-support-procedural-tools-derive" version = "3.0.0" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2564,9 +2573,9 @@ checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" dependencies = [ "autocfg", "proc-macro-hack", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2690,6 +2699,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" + [[package]] name = "glob" version = "0.3.0" @@ -2851,9 +2866,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" +checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ "bytes 1.1.0", "http", @@ -2889,9 +2904,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.13" +version = "0.14.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d1cfb9e4f68655fa04c01f59edb405b6074a0f7118ea881e5026e4a1cd8593" +checksum = "2b91bb1f221b6ea1f1e4371216b70f40748774c2fb5971b450c07773fb92d26b" dependencies = [ "bytes 1.1.0", "futures-channel", @@ -2951,9 +2966,9 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a83ec4af652890ac713ffd8dc859e650420a5ef47f7b9be29b6664ab50fbc8" +checksum = "2273e421f7c4f0fc99e1934fe4776f59d8df2972f4199d703fc0da9f2a9f73de" dependencies = [ "if-addrs-sys", "libc", @@ -3006,9 +3021,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" dependencies = [ "serde", ] @@ -3019,9 +3034,9 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -3037,9 +3052,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "716d3d89f35ac6a34fd0eed635395f4c3b76fa889338a4632e5231a8684216bd" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", ] @@ -3183,9 +3198,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -3276,9 +3291,9 @@ dependencies = [ "Inflector", "bae", "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -3487,9 +3502,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.103" +version = "0.2.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" +checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219" [[package]] name = "libloading" @@ -3585,7 +3600,7 @@ dependencies = [ "sha2 0.9.8", "smallvec", "thiserror", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", "zeroize", ] @@ -3655,7 +3670,7 @@ dependencies = [ "regex", "sha2 0.9.8", "smallvec", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "wasm-timer", ] @@ -3696,7 +3711,7 @@ dependencies = [ "sha2 0.9.8", "smallvec", "uint", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", "wasm-timer", ] @@ -3737,7 +3752,7 @@ dependencies = [ "parking_lot 0.11.2", "rand 0.7.3", "smallvec", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", ] [[package]] @@ -3790,7 +3805,7 @@ dependencies = [ "log", "prost", "prost-build", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", ] @@ -3826,7 +3841,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "smallvec", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", "wasm-timer", ] @@ -3847,7 +3862,7 @@ dependencies = [ "minicbor", "rand 0.7.3", "smallvec", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "wasm-timer", ] @@ -3874,7 +3889,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab8cb308d4fc854869f5abb54fdab0833d2cf670d407c745849dc47e6e08d79c" dependencies = [ "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -4310,9 +4325,9 @@ dependencies = [ [[package]] name = "mick-jaeger" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c023c3f16109e7f33aa451f773fd61070e265b4977d0b6e344a51049296dd7df" +checksum = "eaa77fad8461bb1e0d01be11299e24c6e544007715ed442bfec29f165dc487ae" dependencies = [ "futures 0.3.17", "rand 0.7.3", @@ -4334,9 +4349,9 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -4370,9 +4385,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" dependencies = [ "libc", "log", @@ -4434,7 +4449,7 @@ dependencies = [ "percent-encoding 2.1.0", "serde", "static_assertions", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "url 2.2.2", ] @@ -4476,7 +4491,7 @@ dependencies = [ "generic-array 0.14.4", "multihash-derive", "sha2 0.9.8", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", ] [[package]] @@ -4487,9 +4502,9 @@ checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro-error 1.0.4", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "synstructure", ] @@ -4501,16 +4516,16 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d91ec0a2440aaff5f78ec35631a7027d50386c6163aa975f7caa0d5da4b6ff8" +checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab" dependencies = [ "bytes 1.1.0", "futures 0.3.17", "log", "pin-project 1.0.8", "smallvec", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", ] [[package]] @@ -4537,9 +4552,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -4787,6 +4802,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "object" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.8.0" @@ -5371,9 +5395,9 @@ name = "pallet-contracts-proc-macro" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -5963,9 +5987,9 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -6203,9 +6227,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b679c6acc14fac74382942e2b73bea441686a33430b951ea03b5aeb6a7f254" +checksum = "7cb5195cb862b13055cf7f7a76c55073dc73885c2a61511e322b8c1666be7332" dependencies = [ "blake2-rfc", "crc32fast", @@ -6226,7 +6250,7 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "arrayvec 0.7.1", + "arrayvec 0.7.2", "bitvec 0.20.4", "byte-slice-cast", "impl-trait-for-tuples", @@ -6241,9 +6265,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -6290,8 +6314,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro2 1.0.30", - "syn 1.0.80", + "proc-macro2 1.0.32", + "syn 1.0.81", "synstructure", ] @@ -6312,9 +6336,9 @@ checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "parity-ws" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab8a461779bd022964cae2b4989fa9c99deb270bec162da2125ec03c09fcaa" +checksum = "5983d3929ad50f12c3eb9a6743f19d691866ecd44da74c0a3308c3f8a56df0c6" dependencies = [ "byteorder", "bytes 0.4.12", @@ -6385,9 +6409,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" +checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" [[package]] name = "pbkdf2" @@ -6452,9 +6476,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -6502,9 +6526,9 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -6513,9 +6537,9 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -6889,9 +6913,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" +checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" [[package]] name = "platforms" @@ -7558,9 +7582,9 @@ version = "0.9.12" source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -7935,9 +7959,9 @@ dependencies = [ [[package]] name = "polling" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25" +checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" dependencies = [ "cfg-if 1.0.0", "libc", @@ -7971,9 +7995,9 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "primitive-types" @@ -8027,9 +8051,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" dependencies = [ "proc-macro-error-attr 0.4.12", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "version_check", ] @@ -8040,9 +8064,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr 1.0.4", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "version_check", ] @@ -8052,9 +8076,9 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "syn-mid", "version_check", ] @@ -8065,7 +8089,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "version_check", ] @@ -8093,9 +8117,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.30" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" +checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" dependencies = [ "unicode-xid 0.2.2", ] @@ -8150,9 +8174,9 @@ checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -8223,7 +8247,7 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", ] [[package]] @@ -8423,9 +8447,9 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -8899,9 +8923,9 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -9732,9 +9756,9 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -9821,9 +9845,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -9966,16 +9990,16 @@ version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] name = "serde_json" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" +checksum = "e466864e431129c7e0d3476b92f20458e5879919a0596c6472738d9fa2d342f8" dependencies = [ "itoa", "ryu", @@ -10080,9 +10104,9 @@ dependencies = [ [[package]] name = "signature" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" [[package]] name = "simba" @@ -10229,9 +10253,9 @@ source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec3698090 dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -10472,9 +10496,9 @@ name = "sp-debug-derive" version = "3.0.0" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -10612,9 +10636,9 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -10691,9 +10715,9 @@ source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec3698090 dependencies = [ "Inflector", "proc-macro-crate 1.1.0", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -10852,6 +10876,8 @@ name = "sp-transaction-storage-proof" version = "4.0.0-dev" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ + "async-trait", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -10898,9 +10924,9 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -10922,12 +10948,12 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.2.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb102b328df61c67f8ccf8471b29c31c7d6da646a867aff95fe8bff386fe7c4d" +checksum = "c66cd4c4bb7ee41dc5b0c13d600574ae825d3a02e8f31326b17ac71558f2c836" dependencies = [ "Inflector", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "serde", "serde_json", @@ -10966,9 +10992,9 @@ checksum = "f2261c91034a1edc3fc4d1b80e89d82714faede0515c14a75da10cb941546bbf" dependencies = [ "cfg_aliases", "memchr", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -10992,9 +11018,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf9d950ef167e25e0bdb073cf1d68e9ad2795ac826f2f3f59647817cf23c0bfa" +checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" dependencies = [ "clap", "lazy_static", @@ -11003,15 +11029,15 @@ dependencies = [ [[package]] name = "structopt-derive" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134d838a2c9943ac3125cf6df165eda53493451b719f3255b2a26b85f772d0ba" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ "heck", "proc-macro-error 1.0.4", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -11045,9 +11071,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ "heck", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -11057,9 +11083,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ "heck", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -11069,9 +11095,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" dependencies = [ "heck", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -11165,11 +11191,11 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" +checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "unicode-xid 0.2.2", ] @@ -11180,9 +11206,9 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -11191,9 +11217,9 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "unicode-xid 0.2.2", ] @@ -11256,9 +11282,9 @@ version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -11333,9 +11359,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" +checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" dependencies = [ "tinyvec_macros", ] @@ -11348,15 +11374,15 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" +checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee" dependencies = [ "autocfg", "bytes 1.1.0", "libc", "memchr", - "mio 0.7.13", + "mio 0.7.14", "num_cpus", "once_cell", "pin-project-lite 0.2.7", @@ -11367,13 +11393,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2dd85aeaba7b68df939bd357c6afb36c87951be9e80bf9c859f2fc3e9fca0fd" +checksum = "114383b041aa6212c579467afa0075fbbdd0718de036100bc0ba7961d8cb9095" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -11389,9 +11415,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f" +checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" dependencies = [ "futures-core", "pin-project-lite 0.2.7", @@ -11400,9 +11426,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" +checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" dependencies = [ "bytes 1.1.0", "futures-core", @@ -11446,9 +11472,9 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -11721,9 +11747,9 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8d425fafb8cd76bc3f22aace4af471d3156301d7508f2107e98fbeae10bc7f" +checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", @@ -11762,9 +11788,9 @@ dependencies = [ [[package]] name = "value-bag" -version = "1.0.0-alpha.7" +version = "1.0.0-alpha.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd320e1520f94261153e96f7534476ad869c14022aee1e59af7c778075d840ae" +checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" dependencies = [ "ctor", "version_check", @@ -11852,9 +11878,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "wasm-bindgen-shared", ] @@ -11886,9 +11912,9 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -11971,7 +11997,7 @@ dependencies = [ "lazy_static", "libc", "log", - "object", + "object 0.26.2", "paste", "psm", "rayon", @@ -12021,9 +12047,9 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.25.0", "more-asserts", - "object", + "object 0.26.2", "target-lexicon", "thiserror", "wasmparser", @@ -12039,11 +12065,11 @@ dependencies = [ "anyhow", "cfg-if 1.0.0", "cranelift-entity", - "gimli", + "gimli 0.25.0", "indexmap", "log", "more-asserts", - "object", + "object 0.26.2", "serde", "target-lexicon", "thiserror", @@ -12057,15 +12083,15 @@ version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24f46dd757225f29a419be415ea6fb8558df9b0194f07e3a6a9c99d0e14dd534" dependencies = [ - "addr2line", + "addr2line 0.16.0", "anyhow", "bincode", "cfg-if 1.0.0", - "gimli", + "gimli 0.25.0", "libc", "log", "more-asserts", - "object", + "object 0.26.2", "region", "serde", "target-lexicon", @@ -12378,6 +12404,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", + "pallet-utility", "parity-scale-codec", "scale-info", "serde", @@ -12435,9 +12462,9 @@ name = "xcm-procedural" version = "0.1.0" source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -12473,22 +12500,22 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf68b08513768deaa790264a7fac27a58cbf2705cfcdc9448362229217d7e970" +checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdff2024a851a322b08f179173ae2ba620445aef1e838f0c196820eade4ae0c7" +checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "synstructure", ] diff --git a/pallets/committee/src/lib.rs b/pallets/committee/src/lib.rs index 9e01f74233..cafa2ca7d0 100644 --- a/pallets/committee/src/lib.rs +++ b/pallets/committee/src/lib.rs @@ -416,7 +416,7 @@ pub mod pallet { let votes = maybe_votes.as_mut().ok_or(Error::::NoProposalWithHash)?; // Can only vote within the allowed range of blocks for this proposal - ensure!(Self::within_voting_period(&votes), Error::::NotInVotingPeriod); + ensure!(Self::within_voting_period(votes), Error::::NotInVotingPeriod); // members can vote only once ensure!(!votes.has_voted(&voter.account_id), Error::::DuplicateVote); votes.cast_vote(MemberVote::new(voter.clone(), vote.clone())); // mutates votes in place diff --git a/pallets/committee/src/tests.rs b/pallets/committee/src/tests.rs index da25de57e0..d02765028c 100644 --- a/pallets/committee/src/tests.rs +++ b/pallets/committee/src/tests.rs @@ -187,13 +187,13 @@ fn member_can_vote_aye() { new_test_ext(ASHLEY_RANGE).execute_with(|| { let expected_votes = VoteAggregate::::new(vec![ASHLEY_COUNCIL], vec![], vec![], START_OF_V1); let proposal = submit_proposal(123); - assert_eq!(VotingEligibility::::get(ASHLEY), Some(0u64.into())); + assert_eq!(VotingEligibility::::get(ASHLEY), Some(0u64)); run_to_block(START_OF_S1); // first block in voting period assert_ok!(Committee::vote(Origin::signed(ASHLEY), proposal.hash(), VoteKind::Aye)); - assert_eq!(VotingEligibility::::get(ASHLEY), Some(0u64.into())); + assert_eq!(VotingEligibility::::get(ASHLEY), Some(0u64)); assert_eq!(Committee::get_votes_for(&proposal.hash()), Some(expected_votes)); }); } diff --git a/pallets/remote-asset-manager/src/lib.rs b/pallets/remote-asset-manager/src/lib.rs index 47f7a60e1c..72d23788f6 100644 --- a/pallets/remote-asset-manager/src/lib.rs +++ b/pallets/remote-asset-manager/src/lib.rs @@ -27,9 +27,7 @@ pub mod pallet { }; use frame_system::pallet_prelude::*; use orml_traits::{MultiCurrency, XcmTransfer}; - use xcm::latest::{ - Error as XcmError, ExecuteXcm, Instruction, MultiLocation, OriginKind, Result as XcmResult, SendXcm, Xcm, - }; + use xcm::latest::{prelude::*, Error as XcmError, Result as XcmResult}; use primitives::traits::{MaybeAssetIdConvert, RemoteAssetManager}; use xcm_calls::{ @@ -127,6 +125,10 @@ pub mod pallet { #[pallet::constant] type RelayChainAssetId: Get; + /// Unbonding slashing spans for unbonding on the relaychain. + #[pallet::constant] + type AssetUnbondingSlashingSpans: Get; + /// Determines the threshold amounts when operating with staked assets. type AssetStakingCap: StakingCap; @@ -208,6 +210,12 @@ pub mod pallet { pub type Proxies = StorageDoubleMap<_, Blake2_128Concat, T::AssetId, Twox64Concat, AccountIdFor, ProxyState, ValueQuery>; + /// The extra weight for cross-chain XCM transfers. + /// xcm_dest_weight: value: Weight + #[pallet::storage] + #[pallet::getter(fn xcm_dest_weight)] + pub type XcmDestWeight = StorageValue<_, Weight, ValueQuery>; + /// The config of the statemint parachain. /// /// Provides information that is required when sending XCM calls to transfer PINT:, @@ -216,6 +224,7 @@ pub mod pallet { /// - `parachain id`: the parachain of the statemint chain /// - `weights`: the weights to use for the call #[pallet::storage] + #[pallet::getter(fn statemint_para_config)] pub type StatemintParaConfig = StorageValue<_, StatemintConfig, OptionQuery>; #[pallet::genesis_config] @@ -299,6 +308,8 @@ pub mod pallet { Frozen(T::AssetId), /// The asset was thawed for XCM related operations. \[asset id\] Thawed(T::AssetId), + /// A new weight for XCM transfers has been set.\[new_weight\] + XcmDestWeightSet(Weight), } #[pallet::error] @@ -384,8 +395,9 @@ pub mod pallet { /// /// The maximum number of separate xcm calls we send here is limited to the number of liquid /// assets with staking support. - fn on_finalize(now: T::BlockNumber) { + fn on_idle(now: BlockNumberFor, remaining_weight: Weight) -> Weight { // check all assets with enabled cross chain staking support and a valid destination + // TODO handle weight for (asset, config, dest) in PalletStakingConfig::::iter() .filter_map(|(asset, config)| Self::asset_destination(asset).ok().map(|dest| (asset, config, dest))) { @@ -452,6 +464,8 @@ pub mod pallet { AssetBalance::::insert(asset, balances); } } + + remaining_weight } } @@ -491,13 +505,11 @@ pub mod pallet { let call = PalletStakingCall::::Bond(Bond { controller: controller.clone(), value, payee }); let encoder = call.encoder::(&asset); - let transact = Instruction::Transact { - origin_type: OriginKind::SovereignAccount, - require_weight_at_most: config.weights.bond, - call: encoder.encode_runtime_call(config.pallet_index).encode().into(), - }; - let mut xcm = Xcm::new(); - xcm.0.push(transact); + let xcm = Self::wrap_call_into_xcm( + encoder.encode_runtime_call(config.pallet_index).encode(), + config.weights.bond, + Self::xcm_dest_weight().into(), + ); let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_staking::bond xcm: {:?} ",result); @@ -546,13 +558,11 @@ pub mod pallet { }); let encoder = call.encoder::(&asset); - let transact = Instruction::Transact { - origin_type: OriginKind::SovereignAccount, - require_weight_at_most: config.weights.add_proxy, - call: encoder.encode_runtime_call(config.pallet_index).encode().into(), - }; - let mut xcm = Xcm::new(); - xcm.0.push(transact); + let xcm = Self::wrap_call_into_xcm( + encoder.encode_runtime_call(config.pallet_index).encode(), + config.weights.add_proxy, + Self::xcm_dest_weight().into(), + ); let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_proxy::add_proxy xcm: {:?} ",result); @@ -658,6 +668,22 @@ pub mod pallet { Ok(()) } + /// Sets the `xcm_dest_weight` for XCM transfers. + /// + /// Callable by the admin origin + /// + /// Parameters: + /// - `xcm_dest_weight`: The new weight for XCM transfers. + #[pallet::weight(< T as Config >::WeightInfo::set_xcm_dest_weight())] + #[transactional] + pub fn set_xcm_dest_weight(origin: OriginFor, #[pallet::compact] xcm_dest_weight: Weight) -> DispatchResult { + T::AdminOrigin::ensure_origin(origin)?; + + XcmDestWeight::::put(xcm_dest_weight); + Self::deposit_event(Event::::XcmDestWeightSet(xcm_dest_weight)); + Ok(()) + } + /// Enables XCM transactions for the statemint parachain, if configured. /// /// This is a noop if it's already enabled @@ -725,7 +751,7 @@ pub mod pallet { who.clone(), config.multi_asset(amount.into()), config.parahain_location(), - 100_000_000, + Self::xcm_dest_weight().into(), )?; Self::deposit_event(Event::StatemintTransfer(who, amount)); @@ -782,13 +808,11 @@ pub mod pallet { let call = PalletStakingCall::::BondExtra(amount); let encoder = call.encoder::(&asset); - let transact = Instruction::Transact { - origin_type: OriginKind::SovereignAccount, - require_weight_at_most: config.weights.bond_extra, - call: encoder.encode_runtime_call(config.pallet_index).encode().into(), - }; - let mut xcm = Xcm::new(); - xcm.0.push(transact); + let xcm = Self::wrap_call_into_xcm( + encoder.encode_runtime_call(config.pallet_index).encode(), + config.weights.bond_extra, + Self::xcm_dest_weight().into(), + ); let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_staking::bond_extra xcm: {:?} ",result); @@ -845,13 +869,11 @@ pub mod pallet { let call = PalletStakingCall::::Unbond(amount); let encoder = call.encoder::(&asset); - let transact = Instruction::Transact { - origin_type: OriginKind::SovereignAccount, - require_weight_at_most: config.weights.unbond, - call: encoder.encode_runtime_call(config.pallet_index).encode().into(), - }; - let mut xcm = Xcm::new(); - xcm.0.push(transact); + let xcm = Self::wrap_call_into_xcm( + encoder.encode_runtime_call(config.pallet_index).encode(), + config.weights.unbond, + Self::xcm_dest_weight().into(), + ); let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_staking::unbond xcm: {:?} ",result); @@ -863,15 +885,19 @@ pub mod pallet { /// Remove any unlocked chunks from the `unlocking` queue. /// An `withdraw_unbonded` call must be signed by the controller /// account. - /// This essentially gives the PNIT's sovereign hold of the balance + /// This essentially gives the PINT's reserve account hold of the balance pub fn do_send_withdraw_unbonded(asset: T::AssetId) -> DispatchResult { let dest = Self::asset_destination(asset)?; + // ensures that the call is encodable for the destination ensure!(T::PalletProxyCallEncoder::can_encode(&asset), Error::::NotEncodableForLocation); + + // get the config for how staking is configured let config = PalletStakingConfig::::get(&asset).ok_or(Error::::NoPalletConfigFound)?; let mut ledger = PalletStakingLedger::::get(&asset).ok_or(Error::::NotBonded)?; + // only controller account is allowed to send unbonded Self::ensure_staking_controller(ledger.controller.clone())?; // ensure that at least one chunk is withdrawable @@ -880,17 +906,14 @@ pub mod pallet { Error::::NothingToWithdraw ); - // NOTE: this sets `num_slashing_spans` to 0, to not clear slashing metadata - let call = PalletStakingCall::::WithdrawUnbonded(0); + let call = PalletStakingCall::::WithdrawUnbonded(T::AssetUnbondingSlashingSpans::get()); let encoder = call.encoder::(&asset); - let transact = Instruction::Transact { - origin_type: OriginKind::SovereignAccount, - require_weight_at_most: config.weights.withdraw_unbonded, - call: encoder.encode_runtime_call(config.pallet_index).encode().into(), - }; - let mut xcm = Xcm::new(); - xcm.0.push(transact); + let xcm = Self::wrap_call_into_xcm( + encoder.encode_runtime_call(config.pallet_index).encode(), + config.weights.withdraw_unbonded, + Self::xcm_dest_weight().into(), + ); let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_staking::withdraw_unbonded xcm: {:?} ",result); @@ -911,10 +934,30 @@ pub mod pallet { Ok(()) } + /// The destination address of the asset's native location fn asset_destination(asset: T::AssetId) -> Result { let dest = T::AssetIdConvert::convert(asset).ok_or(Error::::InvalidAssetChainLocation)?; Ok(dest) } + + /// Wrap the call into a Xcm instance. + /// params: + /// - call: The encoded call to be executed + /// - fee: fee (in remote currency) used to buy the `weight` and `debt`. + /// - require_weight_at_most: the weight limit used for the xcm transacted call. + fn wrap_call_into_xcm(call: Vec, require_weight_at_most: Weight, fee: u128) -> Xcm<()> { + let asset = MultiAsset { id: Concrete(MultiLocation::here()), fun: Fungibility::Fungible(fee) }; + Xcm(vec![ + WithdrawAsset(asset.clone().into()), + BuyExecution { fees: asset, weight_limit: Unlimited }, + Transact { origin_type: OriginKind::SovereignAccount, require_weight_at_most, call: call.into() }, + DepositAsset { + assets: All.into(), + max_assets: u32::MAX, + beneficiary: MultiLocation { parents: 1, interior: X1(Parachain(T::SelfParaId::get().into())) }, + }, + ]) + } } impl RemoteAssetManager for Pallet { @@ -967,6 +1010,7 @@ pub mod pallet { fn transfer() -> Weight; fn freeze() -> Weight; fn thaw() -> Weight; + fn set_xcm_dest_weight() -> Weight; } /// For backwards compatibility and tests @@ -980,5 +1024,8 @@ pub mod pallet { fn thaw() -> Weight { Default::default() } + fn set_xcm_dest_weight() -> Weight { + Default::default() + } } } diff --git a/pallets/saft-registry/src/lib.rs b/pallets/saft-registry/src/lib.rs index 17597eef94..9eb7f6f467 100644 --- a/pallets/saft-registry/src/lib.rs +++ b/pallets/saft-registry/src/lib.rs @@ -176,7 +176,7 @@ pub mod pallet { nav: T::Balance, units: T::Balance, ) -> DispatchResult { - Self::do_add_saft(T::AdminOrigin::ensure_origin(origin.clone())?, asset_id, nav, units) + Self::do_add_saft(T::AdminOrigin::ensure_origin(origin)?, asset_id, nav, units) } /// Adds saft with root origin diff --git a/primitives/xcm-calls/Cargo.toml b/primitives/xcm-calls/Cargo.toml index 4a90ef0ce8..1e0ba9177b 100644 --- a/primitives/xcm-calls/Cargo.toml +++ b/primitives/xcm-calls/Cargo.toml @@ -26,6 +26,7 @@ frame-election-provider-support = { git = 'https://github.com/paritytech/substra pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-proxy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-utility = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12'} pallet-staking-reward-curve = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } diff --git a/primitives/xcm-calls/src/lib.rs b/primitives/xcm-calls/src/lib.rs index c87d86c37f..0e9a2efdf6 100644 --- a/primitives/xcm-calls/src/lib.rs +++ b/primitives/xcm-calls/src/lib.rs @@ -1,7 +1,75 @@ // Copyright 2021 ChainSafe Systems // SPDX-License-Identifier: LGPL-3.0-only -//! Support for creating XCM calls that are used within `Xcm::Transact` +//! Support for generically creating XCM calls that are used within `Xcm::Transact` +//! +//! Receiving chains will decode incoming XCM calls based on their native types, therefore the +//! encoding of `Xcm::Transact` is runtime agnostic. +//! +//! This crate provides a set of abstractions for commonly used pallets. +//! To create chain agnostic bindings for pallets, a few things are required. +//! +//! First, an exact replica of the pallet's call enum, but not bound to `T: Config`, but with +//! generic types. like for `pallet_staking`: +//! +//! ```ignore +//! pub enum StakingCall { +//! Bond(/* -snip */ ), +//! UnBond(/* -snip */ ), +//! BondExtra(/* -snip */ ), +//! } +//! ``` +//! +//! each enum variant represents the corresponding extrinsic of the pallet. +//! +//! All the pallet's type that would be configured as part of `Config` trait and are part of the +//! public interface are now generics: ``. +//! +//! In the event that bindings for different runtimes are required for the pallet, we may still need +//! to support different types, e.g. `RuntimeA::Balance = u128;` and `RuntimeB::Balance = u64;`. +//! +//! Instead of maintaining multiple configs of `StakingCall` with different types, we maintain a +//! config with a single type configuration, preferably those from our local chain's +//! `frame_system::Config`, and then provide a separate encoder, that handle encoding context aware, +//! for example a `CurrencyId` or `AssetId`. +//! +//! For that we configure the pallet's `PalletCallEncoder` trait according to the set of different +//! runtime configs. +//! +//! For the `pallet_staking` that is `StakingCallEncoder` that can be configured with encoders for +//! all the `StakingCall`'s generic types +//! +//! ``` +//! use xcm_calls::{PalletCallEncoder, PassthroughCompactEncoder, PassthroughEncoder}; +//! use xcm_calls::staking::StakingCallEncoder; +//! // native types +//! type AssetId = u64; +//! type Balance = u128; +//! type AccountId = u64; +//! type AccountLookupSource = sp_runtime::MultiAddress; +//! /// The encoder to use when transacting `pallet_staking` calls +//! pub struct PalletStakingEncoder; +//! impl StakingCallEncoder for PalletStakingEncoder { +//! // encode the `Balance` as the same type as configured but compactly +//! type CompactBalanceEncoder = PassthroughCompactEncoder; +//! // encode the `AccountLookupSource` as the same type as configured +//! type SourceEncoder = PassthroughEncoder; +//! // encode the `AccountId` as the same type as configured +//! type AccountIdEncoder = PassthroughEncoder; +//! } +//! +//! // Implement the `PalletCallEncoder` that determines whether a call can be encoded based +//! // on the context +//! impl PalletCallEncoder for PalletStakingEncoder { +//! type Context = AssetId; +//! fn can_encode(_ctx: &Self::Context) -> bool { +//! // allow all calls +//! // handling this separately here allows us to eventually support additional chains +//! // without runtime upgrades +//! true +//! } +//! } +//! ``` #![cfg_attr(not(feature = "std"), no_std)] @@ -14,6 +82,7 @@ pub mod assets; mod encode_with; pub mod proxy; pub mod staking; +pub mod utility; /// Represents an extrinsic of a pallet configured inside a runtime #[derive(Encode)] @@ -115,7 +184,10 @@ mod tests { }; use super::*; - use crate::assets::{AssetParams, AssetsCall, AssetsCallEncoder, STATEMINT_PALLET_ASSETS_INDEX}; + use crate::{ + assets::{AssetParams, AssetsCall, AssetsCallEncoder, STATEMINT_PALLET_ASSETS_INDEX}, + utility::{UtilityCall, UtilityCallEncoder}, + }; use frame_support::traits::Everything; /// The AccountId alias in this test module. @@ -176,6 +248,7 @@ mod tests { System: frame_system::{Pallet, Call, Config, Storage, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Balances: pallet_balances::{Pallet, Call, Storage, Event}, + Utility: pallet_utility::{Pallet, Call, Event}, // use polkadot index 7 Staking: staking::{Pallet, Call, Storage, Event} = 7, @@ -198,6 +271,12 @@ mod tests { pub static BagThresholds: &'static [sp_npos_elections::VoteWeight] = &THRESHOLDS; } + impl pallet_utility::Config for Test { + type Event = Event; + type Call = Call; + type WeightInfo = (); + } + impl pallet_bags_list::Config for Test { type Event = Event; type WeightInfo = (); @@ -443,6 +522,16 @@ mod tests { type Extra = (); } + struct PalletUtilityEncoder; + impl UtilityCallEncoder for PalletUtilityEncoder {} + + impl PalletCallEncoder for PalletUtilityEncoder { + type Context = AssetId; + fn can_encode(_ctx: &u64) -> bool { + true + } + } + struct PalletStakingEncoder; impl StakingCallEncoder for PalletStakingEncoder { type CompactBalanceEncoder = PassthroughCompactEncoder; @@ -710,4 +799,15 @@ mod tests { encode_decode_call!(PalletAssetsCall, call, xcm_encoder, STATEMINT_PALLET_ASSETS_INDEX); } + + #[test] + fn can_encode_decode() { + let dest = 1; + let value = 1_000; + let transfers = vec![ + pallet_balances::Call::::transfer { dest, value }.encode(), + pallet_balances::Call::::transfer { dest, value }.encode(), + ]; + let _xcm_call = UtilityCall::BatchAll(transfers); + } } diff --git a/primitives/xcm-calls/src/utility.rs b/primitives/xcm-calls/src/utility.rs new file mode 100644 index 0000000000..5309ea446b --- /dev/null +++ b/primitives/xcm-calls/src/utility.rs @@ -0,0 +1,50 @@ +// Copyright 2021 ChainSafe Systems +// SPDX-License-Identifier: LGPL-3.0-only + +//! Xcm support for dispatching `pallet_utility` pallet calls + +use codec::{Decode, Encode, Output}; +use frame_support::{sp_std::vec::Vec, RuntimeDebug}; + +use crate::{CallEncoder, PalletCall, PalletCallEncoder}; + +/// The index of `pallet_utility` in the polkadot runtime +pub const POLKADOT_PALLET_UTILITY_INDEX: u8 = 26u8; + +/// The index of `pallet_utility` in the polkadot runtime +pub const KUSAMA_PALLET_UTILITY_INDEX: u8 = 24u8; + +pub trait UtilityCallEncoder: PalletCallEncoder {} + +impl<'a, 'b, Config> Encode for CallEncoder<'a, 'b, UtilityCall, Config> +where + Config: UtilityCallEncoder, +{ + fn encode_to(&self, dest: &mut T) { + // include the pallet identifier + dest.push_byte(self.call.pallet_call_index()); + self.call.encode_to(dest) + } +} + +/// Represents dispatchable calls of the FRAME `pallet_utility` pallet. +/// +/// This is a generic version of the `pallet_utility::Call` enum generated by the substrate pallet +/// macros +#[derive(Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] +pub enum UtilityCall { + #[codec(index = 1)] + AsDerivative(u16, Vec), + #[codec(index = 2)] + BatchAll(Vec>), +} + +impl PalletCall for UtilityCall { + /// the indices of the corresponding calls within the `pallet_utility` + fn pallet_call_index(&self) -> u8 { + match self { + UtilityCall::AsDerivative(_, _) => 1, + UtilityCall::BatchAll(_) => 2, + } + } +} diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 0715577197..59e7f7a6fc 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -9,10 +9,11 @@ version = '0.0.1' [dependencies] codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive']} +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } # xcm xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs index 2e89992e2f..e10aaf9688 100644 --- a/runtime/common/src/constants.rs +++ b/runtime/common/src/constants.rs @@ -138,6 +138,7 @@ parameter_types! { pub const MinCouncilVotes: usize = 4; pub const MinimumPeriod: u64 = SLOT_DURATION / 2; pub const MinimumRedemption: u32 = 0; + pub const AssetUnbondingSlashingSpans: u32 = 5; pub const MinimumStatemintTransferAmount: Balance = 1; // Minimum amount of funds that need to be present in the fund account pub const MinimumReserve: Balance = 100; diff --git a/runtime/common/src/weights/pallet_remote_asset_manager.rs b/runtime/common/src/weights/pallet_remote_asset_manager.rs index 8fd82f9abe..d27c52c09e 100644 --- a/runtime/common/src/weights/pallet_remote_asset_manager.rs +++ b/runtime/common/src/weights/pallet_remote_asset_manager.rs @@ -42,4 +42,8 @@ impl pallet_remote_asset_manager::WeightInfo for Weight fn thaw() -> Weight { (2_000_000 as Weight) } + + fn set_xcm_dest_weight() -> Weight { + (10_000_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + } } diff --git a/runtime/dev/src/lib.rs b/runtime/dev/src/lib.rs index 17d94c54a4..f9585e0c20 100644 --- a/runtime/dev/src/lib.rs +++ b/runtime/dev/src/lib.rs @@ -48,9 +48,10 @@ use xcm::v1::{ BodyId, Fungibility, Junction, Junction::*, Junctions, Junctions::*, MultiAsset, MultiLocation, NetworkId, }; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, - LocationInverter, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, + AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, + EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, LocationInverter, ParentIsDefault, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, }; use xcm_executor::XcmExecutor; @@ -289,7 +290,14 @@ match_type! { }; } -pub type Barrier = (TakeWeightCredit, AllowTopLevelPaidExecutionFrom); +pub type Barrier = ( + TakeWeightCredit, + AllowTopLevelPaidExecutionFrom, + // Expected responses are OK. + AllowKnownQueryResponses, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, +); pub struct ToTreasury; impl TakeRevenue for ToTreasury { @@ -682,6 +690,7 @@ impl pallet_remote_asset_manager::Config for Runtime { type SelfLocation = SelfLocation; type SelfParaId = parachain_info::Pallet; type RelayChainAssetId = RelayChainAssetId; + type AssetUnbondingSlashingSpans = AssetUnbondingSlashingSpans; type AssetStakingCap = (MinimumRemoteReserveBalance, MinimumBondExtra); type Assets = Currencies; type XcmExecutor = XcmExecutor; diff --git a/runtime/integration-tests/src/pint.rs b/runtime/integration-tests/src/pint.rs index e282efc38f..2da4413cac 100644 --- a/runtime/integration-tests/src/pint.rs +++ b/runtime/integration-tests/src/pint.rs @@ -24,6 +24,7 @@ use orml_traits::parameter_type_with_key; use orml_xcm_support::{IsNativeConcrete, MultiCurrencyAdapter}; use pallet_price_feed::{AssetPricePair, Price, PriceFeed}; use pallet_xcm::XcmPassthrough; +use pint_runtime_common::constants::AssetUnbondingSlashingSpans; use pint_runtime_kusama::{AccountId32Convert, AssetIdConvert}; use polkadot_parachain::primitives::Sibling; use sp_core::H256; @@ -418,6 +419,7 @@ impl pallet_remote_asset_manager::Config for Runtime { type SelfLocation = SelfLocation; type SelfParaId = parachain_info::Pallet; type RelayChainAssetId = RelayChainAssetId; + type AssetUnbondingSlashingSpans = AssetUnbondingSlashingSpans; type AssetStakingCap = (MinimumReserve, MinimumBondExtra); type Assets = Currency; type XcmExecutor = XcmExecutor; diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 39b0409a8c..ab4a9821bb 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -56,9 +56,10 @@ use xcm::v1::{ BodyId, Fungibility, Junction, Junction::*, Junctions, Junctions::*, MultiAsset, MultiLocation, NetworkId, }; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, - LocationInverter, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, + AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, + EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, LocationInverter, ParentIsDefault, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, }; use xcm_calls::{ proxy::{ProxyCallEncoder, ProxyType}, @@ -280,7 +281,14 @@ match_type! { }; } -pub type Barrier = (TakeWeightCredit, AllowTopLevelPaidExecutionFrom); +pub type Barrier = ( + TakeWeightCredit, + AllowTopLevelPaidExecutionFrom, + // Expected responses are OK. + AllowKnownQueryResponses, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, +); pub struct ToTreasury; impl TakeRevenue for ToTreasury { @@ -647,6 +655,7 @@ impl pallet_remote_asset_manager::Config for Runtime { type SelfLocation = SelfLocation; type SelfParaId = parachain_info::Pallet; type RelayChainAssetId = RelayChainAssetId; + type AssetUnbondingSlashingSpans = AssetUnbondingSlashingSpans; type AssetStakingCap = (MinimumRemoteReserveBalance, MinimumBondExtra); type Assets = Currencies; type XcmExecutor = XcmExecutor; diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 673f9fbac8..1860b519c2 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -49,9 +49,10 @@ use xcm::v1::{ BodyId, Fungibility, Junction, Junction::*, Junctions, Junctions::*, MultiAsset, MultiLocation, NetworkId, }; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, - LocationInverter, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, + AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, + EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, LocationInverter, ParentIsDefault, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, }; use xcm_executor::XcmExecutor; @@ -283,7 +284,14 @@ match_type! { }; } -pub type Barrier = (TakeWeightCredit, AllowTopLevelPaidExecutionFrom); +pub type Barrier = ( + TakeWeightCredit, + AllowTopLevelPaidExecutionFrom, + // Expected responses are OK. + AllowKnownQueryResponses, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, +); pub struct ToTreasury; impl TakeRevenue for ToTreasury { @@ -650,6 +658,7 @@ impl pallet_remote_asset_manager::Config for Runtime { type SelfLocation = SelfLocation; type SelfParaId = parachain_info::Pallet; type RelayChainAssetId = RelayChainAssetId; + type AssetUnbondingSlashingSpans = AssetUnbondingSlashingSpans; type AssetStakingCap = (MinimumRemoteReserveBalance, MinimumBondExtra); type Assets = Currencies; type XcmExecutor = XcmExecutor;