diff --git a/Cargo.lock b/Cargo.lock index 2abe2200bb..6700cef441 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -478,17 +478,16 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c290043c9a95b05d45e952fb6383c67bcb61471f60cfa21e890dba6654234f43" +checksum = "fd8b508d585e01084059b60f06ade4cb7415cd2e4084b71dd1cb44e7d3fb9880" dependencies = [ "async-channel", "async-executor", "async-io", - "async-mutex", + "async-lock", "blocking", "futures-lite", - "num_cpus", "once_cell", ] @@ -510,9 +509,9 @@ dependencies = [ [[package]] name = "async-io" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" +checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07" dependencies = [ "concurrent-queue", "futures-lite", @@ -536,15 +535,6 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-mutex" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" -dependencies = [ - "event-listener", -] - [[package]] name = "async-process" version = "1.4.0" @@ -776,9 +766,9 @@ checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b" [[package]] name = "beef" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed554bd50246729a1ec158d08aa3235d1b69d94ad120ebe187e28894787e736" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" dependencies = [ "serde", ] @@ -900,17 +890,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq", -] - [[package]] name = "blake2b_simd" version = "1.0.0" @@ -1056,9 +1035,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byte-slice-cast" @@ -1164,9 +1143,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fd178c5af4d59e83498ef15cf3f154e1a6f9d091270cb86283c65ef44e9ef0" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] @@ -1315,9 +1294,9 @@ dependencies = [ [[package]] name = "cid" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a52cffa791ce5cf490ac3b2d6df970dc04f931b04e727be3c3e220e17164dfc4" +checksum = "fc949bff6704880faf064c42a4854032ab07bfcf3a4fcb82a57470acededb69c" dependencies = [ "core2", "multibase", @@ -1346,9 +1325,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.3.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6b561dcf059c85bbe388e0a7b0a1469acb3934cc0cfa148613a830629e3049" +checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b" dependencies = [ "glob", "libc", @@ -1431,6 +1410,17 @@ dependencies = [ "unreachable", ] +[[package]] +name = "comfy-table" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b103d85ca6e209388771bfb7aa6b68a7aeec4afbf6f0a0264bfbf50360e5212e" +dependencies = [ + "strum", + "strum_macros", + "unicode-width", +] + [[package]] name = "concurrent-queue" version = "1.2.2" @@ -1918,15 +1908,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct 0.6.1", -] - [[package]] name = "ctor" version = "0.1.22" @@ -2086,13 +2067,14 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.3.3" +version = "5.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391b56fbd302e585b7a9494fb70e40949567b1cf9003a8e4a6041a1687c26573" +checksum = "3495912c9c1ccf2e18976439f4443f3fee0fd61f424ff99fde6a66b15ecb448f" dependencies = [ "cfg-if", "hashbrown 0.12.1", "lock_api", + "parking_lot_core 0.9.3", ] [[package]] @@ -2298,17 +2280,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" -dependencies = [ - "libc", - "redox_users 0.3.5", - "winapi", -] - [[package]] name = "dirs" version = "4.0.0" @@ -2325,7 +2296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", - "redox_users 0.4.3", + "redox_users", "winapi", ] @@ -2336,7 +2307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users 0.4.3", + "redox_users", "winapi", ] @@ -2723,9 +2694,9 @@ dependencies = [ [[package]] name = "firestorm" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3d6188b8804df28032815ea256b6955c9625c24da7525f387a7af02fbb8f01" +checksum = "2c5f6c2c942da57e2aaaa84b8a521489486f14e75e7fa91dab70aba913975f98" [[package]] name = "fixed" @@ -2785,9 +2756,9 @@ dependencies = [ [[package]] name = "fixed-sqrt" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73d44f350be1d321180dc53d14b3a03570607ae6b3d9d681607e554f95b284c8" +checksum = "af725dbdc8dd186b6914026b51e43d99b332e8e816d3b495b84bf8304ac17b73" dependencies = [ "fixed", "integer-sqrt", @@ -2808,13 +2779,11 @@ checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" [[package]] name = "flate2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if", "crc32fast", - "libc", "libz-sys", "miniz_oxide", ] @@ -2885,6 +2854,7 @@ dependencies = [ "Inflector", "chrono", "clap 3.1.18", + "comfy-table", "frame-benchmarking", "frame-support", "frame-system", @@ -2898,7 +2868,6 @@ dependencies = [ "log", "memory-db", "parity-scale-codec", - "prettytable-rs", "rand 0.8.5", "rand_pcg 0.3.1", "sc-block-builder", @@ -3686,9 +3655,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes 1.1.0", "http", @@ -3774,9 +3743,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" dependencies = [ "bytes 1.1.0", "futures-channel", @@ -3798,19 +3767,17 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ - "ct-logs", - "futures-util", + "http", "hyper", "log", - "rustls 0.19.1", - "rustls-native-certs 0.5.0", + "rustls 0.20.6", + "rustls-native-certs", "tokio", - "tokio-rustls 0.22.0", - "webpki 0.21.4", + "tokio-rustls 0.23.4", ] [[package]] @@ -3920,9 +3887,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown 0.11.2", @@ -3937,18 +3904,18 @@ checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" [[package]] name = "ink_allocator" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe6a609d6c6cd84dd091419f672a5ed98504a111211491d7024014244782369" +checksum = "e131a5e2dc1ae56ba66a2b32fcac74134044e828cc46bfbeccead93b4d2a6cd3" dependencies = [ "cfg-if", ] [[package]] name = "ink_engine" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdedf68966ab265e469e99ae6fe72f6f421ca5e845578cd603ba38309a60823c" +checksum = "34a3accfd498e386e6a1dad78ca18ed8cbc699ec72f48931bd0d51cd7736e6fc" dependencies = [ "blake2", "derive_more", @@ -3961,9 +3928,9 @@ dependencies = [ [[package]] name = "ink_env" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43679bbf0e47f7a3a654c64fac0a206a673cd19d8a88db110a779519cbbc69e4" +checksum = "c68d27c8e99f67681862779f1238d13d2f6fae996a2140a0e52d1d25eeed8972" dependencies = [ "arrayref", "blake2", @@ -3988,9 +3955,9 @@ dependencies = [ [[package]] name = "ink_lang" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c870349b41516a75c479d70d9d7c7c38a2a56d82e8fc2fdb526cdf9cc590f95a" +checksum = "c18fdbce6774f2c4a1f5890412d3a5337e82c61b9e57a50295d91b314e264103" dependencies = [ "derive_more", "ink_env", @@ -4003,9 +3970,9 @@ dependencies = [ [[package]] name = "ink_lang_codegen" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8579c42a4a313ea22ad9362e5ad9988d499121f5ff37f28915ca5282cee9778" +checksum = "86c4cca39c31030b9ffdd6d0fecacec10158fde164868c4beb13399c95983b8d" dependencies = [ "blake2", "derive_more", @@ -4022,9 +3989,9 @@ dependencies = [ [[package]] name = "ink_lang_ir" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea5a1b06d72d1abaa50c7788e670f21e2de9fc9e651ee57b3b24596da693d08" +checksum = "eb68cdb4db44e7c088755857c93ec7a270e720bcd403c8caefa90100533759e5" dependencies = [ "blake2", "either", @@ -4036,9 +4003,9 @@ dependencies = [ [[package]] name = "ink_lang_macro" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6409c1a3929ce836a4f09677b2c1a85650651bd77e634dfc849ad004124bce4d" +checksum = "c39fcbdaffd4126eb985fcb571ac302e966f8d14c5c2d3d64c330ef111a9d789" dependencies = [ "ink_lang_codegen", "ink_lang_ir", @@ -4050,9 +4017,9 @@ dependencies = [ [[package]] name = "ink_metadata" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ad130f7a2645f22a6106b87bc9dd0e512f110b4e98da6960e4fc3d4daa766" +checksum = "e00b1ea893ae80972db897ae2c9ce2d5292961a9c7b83714d3ee6b17461413e1" dependencies = [ "derive_more", "impl-serde", @@ -4064,18 +4031,18 @@ dependencies = [ [[package]] name = "ink_prelude" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a9133adeaa0d07bb1f29b9d4a0db6f0399e34ff63d5c9f1c008cde54f4db24" +checksum = "17443d7d15df552eca048ba3b7ba8551fff3b0d529779bd3a64afc1be19ba65a" dependencies = [ "cfg-if", ] [[package]] name = "ink_primitives" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a45f65f373fa1a2d91b4293bb4dcf5858b5505d0aaa800b19d6fcd5b36f100" +checksum = "538ad6c2050f950099e6d0202c296d174854f956d2d815e608c24d9db214ae4f" dependencies = [ "cfg-if", "ink_prelude", @@ -4085,9 +4052,9 @@ dependencies = [ [[package]] name = "ink_storage" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddb68a60e3dacbde670f4eee693ace8008e7fe44cf6773f7873e59adb83902ac" +checksum = "9d1b226ba92ffa9dca87150bb0e472050db540d3af4ce1323311154971652d69" dependencies = [ "array-init", "cfg-if", @@ -4103,9 +4070,9 @@ dependencies = [ [[package]] name = "ink_storage_derive" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e4abd7ecf3a146a70dda56c8523583d2ec338fca3224179d8b592a2192dc4" +checksum = "7fbe35878a5db2fb9405bae6a0943bf9ace1198b1279ea6926e01d6ac0502599" dependencies = [ "proc-macro2 1.0.39", "quote 1.0.18", @@ -4147,9 +4114,9 @@ checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" [[package]] name = "insta" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "689960f187c43c01650c805fb6bc6f55ab944499d86d4ffe9474ad78991d8e94" +checksum = "bcc3e639bcba360d9237acabd22014c16f3df772db463b7446cd81b070714767" dependencies = [ "console", "once_cell", @@ -4273,7 +4240,7 @@ dependencies = [ "jsonrpsee-core", "jsonrpsee-types", "pin-project 1.0.10", - "rustls-native-certs 0.6.2", + "rustls-native-certs", "soketto 0.7.1", "thiserror", "tokio", @@ -4299,7 +4266,7 @@ dependencies = [ "futures-util", "hyper", "jsonrpsee-types", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", "serde", @@ -4397,9 +4364,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] name = "kv-log-macro" @@ -4428,7 +4395,7 @@ checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", ] [[package]] @@ -4443,7 +4410,7 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "regex", "rocksdb", "smallvec", @@ -4557,7 +4524,7 @@ dependencies = [ "libp2p-websocket", "libp2p-yamux", "multiaddr", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", "rand 0.7.3", "smallvec", @@ -4602,7 +4569,7 @@ dependencies = [ "multiaddr", "multihash", "multistream-select", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", "prost 0.9.0", "prost-build 0.9.0", @@ -4782,7 +4749,7 @@ dependencies = [ "libp2p-core", "log", "nohash-hasher", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", "smallvec", "unsigned-varint", @@ -4946,9 +4913,9 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf2fe8c80b43561355f4d51875273b5b6dfbac37952e8f64b1270769305c9d7" +checksum = "4f693c8c68213034d472cbb93a379c63f4f307d97c06f1c41e4985de481687a5" dependencies = [ "quote 1.0.18", "syn 1.0.95", @@ -5023,7 +4990,7 @@ checksum = "be902ebd89193cd020e89e89107726a38cfc0d16d18f613f4a37d046e92c7517" dependencies = [ "futures", "libp2p-core", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "thiserror", "yamux", ] @@ -5107,9 +5074,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.6" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e7e15d7610cce1d9752e137625f14e61a28cd45929b6e12e47b50fe154ee2e" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ "cc", "pkg-config", @@ -5236,9 +5203,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889" +checksum = "8015d95cb7b2ddd3c0d32ca38283ceb1eea09b4713ee380bceb942d85a244228" dependencies = [ "hashbrown 0.11.2", ] @@ -5351,6 +5318,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memfd" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6627dc657574b49d6ad27105ed671822be56e0d2547d413bfbf3e8d8fa92e7a" +dependencies = [ + "libc", +] + [[package]] name = "memmap2" version = "0.2.3" @@ -5431,9 +5407,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", ] @@ -5511,7 +5487,7 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3db354f401db558759dfc1e568d010a5d4146f4d3f637be1275ec4a3cf09689" dependencies = [ - "blake2b_simd 1.0.0", + "blake2b_simd", "blake2s_simd", "blake3", "core2", @@ -5790,7 +5766,6 @@ dependencies = [ "sc-consensus-epochs", "sc-finality-grandpa", "sc-finality-grandpa-rpc", - "sc-keystore", "sc-rpc", "sc-rpc-api", "sc-sync-state-rpc", @@ -5998,9 +5973,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b10983b38c53aebdf33f542c6275b0f58a238129d00c4ae0e6fb59738d783ca" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "oorandom" @@ -6054,9 +6029,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.73" +version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5fd19fb3e0a8191c1e34935718976a3e70c112ab9a24af6d7cadccd9d90bc0" +checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" dependencies = [ "autocfg", "cc", @@ -6067,9 +6042,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d8d0b2f198229de29dca79676f2738ff952edf3fde542eb8bf94d8c21b435" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "output_vt100" @@ -6456,6 +6431,7 @@ version = "1.0.0" dependencies = [ "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core 6.0.0", @@ -6728,7 +6704,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "smallvec", "sp-core 6.0.0", "sp-io", "sp-runtime", @@ -6865,7 +6840,7 @@ dependencies = [ "hashbrown 0.12.1", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "smallvec", "winapi", @@ -6922,9 +6897,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", "parking_lot_core 0.9.3", @@ -6939,7 +6914,7 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec", "winapi", ] @@ -6952,7 +6927,7 @@ checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec", "windows-sys", ] @@ -7080,9 +7055,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ "fixedbitset 0.4.1", "indexmap", @@ -7798,7 +7773,7 @@ name = "pink-sidevm-host-runtime" version = "0.1.0" dependencies = [ "anyhow", - "dashmap 5.3.3", + "dashmap 5.3.4", "futures", "hex_fmt", "log", @@ -7982,20 +7957,6 @@ dependencies = [ "output_vt100", ] -[[package]] -name = "prettytable-rs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fd04b170004fa2daccf418a7f8253aaf033c27760b5f225889024cf66d7ac2e" -dependencies = [ - "atty", - "csv", - "encode_unicode", - "lazy_static", - "term", - "unicode-width", -] - [[package]] name = "primitive-types" version = "0.11.1" @@ -8090,7 +8051,7 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "thiserror", ] @@ -8137,6 +8098,16 @@ dependencies = [ "prost-derive 0.9.0", ] +[[package]] +name = "prost" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" +dependencies = [ + "bytes 1.1.0", + "prost-derive 0.10.1", +] + [[package]] name = "prost-build" version = "0.8.0" @@ -8167,7 +8138,7 @@ dependencies = [ "lazy_static", "log", "multimap", - "petgraph 0.6.0", + "petgraph 0.6.2", "prost 0.9.0", "prost-types 0.9.0", "regex", @@ -8201,6 +8172,19 @@ dependencies = [ "syn 1.0.95", ] +[[package]] +name = "prost-derive" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2 1.0.39", + "quote 1.0.18", + "syn 1.0.95", +] + [[package]] name = "prost-types" version = "0.8.0" @@ -8508,12 +8492,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.13" @@ -8523,17 +8501,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" -dependencies = [ - "getrandom 0.1.16", - "redox_syscall 0.1.57", - "rust-argon2", -] - [[package]] name = "redox_users" version = "0.4.3" @@ -8541,7 +8508,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.6", - "redox_syscall 0.2.13", + "redox_syscall", "thiserror", ] @@ -8589,9 +8556,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -8609,9 +8576,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "region" @@ -8747,9 +8714,9 @@ dependencies = [ [[package]] name = "retain_mut" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c31b5c4033f8fdde8700e4657be2c497e7288f01515be52168c631e2e4d4086" +checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" [[package]] name = "rfc6979" @@ -8862,7 +8829,7 @@ dependencies = [ "memchr", "multer", "num_cpus", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project-lite 0.2.9", "rand 0.8.5", "ref-cast", @@ -8969,18 +8936,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "rust-argon2" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" -dependencies = [ - "base64 0.13.0", - "blake2b_simd 0.5.11", - "constant_time_eq", - "crossbeam-utils", -] - [[package]] name = "rust-crypto" version = "0.2.36" @@ -8996,9 +8951,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.23.1" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" +checksum = "e2ee7337df68898256ad0d4af4aad178210d9e44d2ff900ce44064a97cd86530" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -9106,18 +9061,6 @@ dependencies = [ "webpki 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rustls-native-certs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" -dependencies = [ - "openssl-probe", - "rustls 0.19.1", - "schannel", - "security-framework", -] - [[package]] name = "rustls-native-certs" version = "0.6.2" @@ -9210,7 +9153,7 @@ dependencies = [ "libp2p", "log", "parity-scale-codec", - "prost 0.9.0", + "prost 0.10.4", "prost-build 0.9.0", "rand 0.7.3", "sc-client-api", @@ -9335,7 +9278,7 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -9365,7 +9308,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-client-api", "sc-state-db", "sp-arithmetic", @@ -9386,7 +9329,7 @@ dependencies = [ "futures-timer", "libp2p", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-client-api", "sc-utils", "serde", @@ -9413,7 +9356,7 @@ dependencies = [ "num-rational 0.2.4", "num-traits", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", "retain_mut", "sc-client-api", @@ -9516,7 +9459,7 @@ dependencies = [ "lazy_static", "lru", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -9596,7 +9539,7 @@ dependencies = [ "hex", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", "sc-chain-spec", @@ -9663,7 +9606,7 @@ version = "4.0.0-dev" dependencies = [ "async-trait", "hex", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "serde_json", "sp-application-crypto", "sp-core 6.0.0", @@ -9693,15 +9636,16 @@ dependencies = [ "log", "lru", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", - "prost 0.9.0", + "prost 0.10.4", "prost-build 0.9.0", "rand 0.7.3", "sc-block-builder", "sc-client-api", "sc-consensus", "sc-network-common", + "sc-network-light", "sc-network-sync", "sc-peerset", "sc-utils", @@ -9749,6 +9693,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "sc-network-light" +version = "0.10.0-dev" +dependencies = [ + "futures", + "libp2p", + "log", + "parity-scale-codec", + "prost 0.10.4", + "prost-build 0.9.0", + "sc-client-api", + "sc-network-common", + "sc-peerset", + "sp-blockchain", + "sp-core 6.0.0", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-network-sync" version = "0.10.0-dev" @@ -9761,7 +9724,7 @@ dependencies = [ "log", "lru", "parity-scale-codec", - "prost 0.9.0", + "prost 0.10.4", "prost-build 0.9.0", "sc-client-api", "sc-consensus", @@ -9791,7 +9754,7 @@ dependencies = [ "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", "sc-client-api", "sc-network", @@ -9833,7 +9796,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -9861,7 +9824,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -9901,7 +9864,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", "rand 0.7.3", "sc-block-builder", @@ -9961,7 +9924,7 @@ dependencies = [ "hex-literal", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-block-builder", "sc-client-api", "sc-client-db", @@ -9995,7 +9958,7 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-client-api", "sp-core 6.0.0", ] @@ -10044,7 +10007,7 @@ dependencies = [ "futures", "libp2p", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", "rand 0.7.3", "serde", @@ -10064,7 +10027,7 @@ dependencies = [ "libc", "log", "once_cell", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", @@ -10103,7 +10066,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "retain_mut", "sc-client-api", "sc-transaction-pool-api", @@ -10139,7 +10102,7 @@ dependencies = [ "futures-timer", "lazy_static", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "prometheus", ] @@ -10845,7 +10808,7 @@ dependencies = [ "log", "lru", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sp-api", "sp-consensus", "sp-database", @@ -10958,7 +10921,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "rand 0.7.3", "regex", @@ -11005,7 +10968,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "rand 0.7.3", "regex", @@ -11070,7 +11033,7 @@ name = "sp-database" version = "4.0.0-dev" dependencies = [ "kvdb", - "parking_lot 0.12.0", + "parking_lot 0.12.1", ] [[package]] @@ -11154,7 +11117,7 @@ dependencies = [ "libsecp256k1 0.7.0", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "secp256k1 0.21.3", "sp-core 6.0.0", "sp-externalities 0.12.0", @@ -11187,7 +11150,7 @@ dependencies = [ "futures", "merlin", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "schnorrkel", "serde", "sp-core 6.0.0", @@ -11374,7 +11337,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", "smallvec", "sp-core 6.0.0", @@ -11611,7 +11574,7 @@ dependencies = [ "chrono", "crc", "crossbeam-queue", - "dirs 4.0.0", + "dirs", "either", "event-listener", "futures-channel", @@ -11683,9 +11646,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.18.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceb8b72a924ccfe7882d0e26144c114503760a4d1248bb5cd06c8ab2d55404cc" +checksum = "5d804c8d48aeab838be31570866fce1130d275b563d49af08b4927a0bd561e7c" dependencies = [ "Inflector", "num-format", @@ -12046,7 +12009,7 @@ dependencies = [ "hex", "jsonrpsee", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "scale-info", "serde", "serde_json", @@ -12179,9 +12142,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1" +checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" [[package]] name = "tempdir" @@ -12202,7 +12165,7 @@ dependencies = [ "cfg-if", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "remove_dir_all", "winapi", ] @@ -12229,17 +12192,6 @@ dependencies = [ "unic-segment", ] -[[package]] -name = "term" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" -dependencies = [ - "byteorder", - "dirs 1.0.5", - "winapi", -] - [[package]] name = "termcolor" version = "1.1.3" @@ -12467,7 +12419,7 @@ dependencies = [ "mio", "num_cpus", "once_cell", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project-lite 0.2.9", "signal-hook-registry", "socket2", @@ -12759,7 +12711,7 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "resolv-conf", "smallvec", "thiserror", @@ -13670,6 +13622,7 @@ dependencies = [ "libc", "log", "mach", + "memfd", "memoffset", "more-asserts", "rand 0.8.5", @@ -13998,7 +13951,7 @@ dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.8.5", "static_assertions", ] diff --git a/crates/pink/src/runtime.rs b/crates/pink/src/runtime.rs index 39343aa694..4c4540a397 100644 --- a/crates/pink/src/runtime.rs +++ b/crates/pink/src/runtime.rs @@ -97,13 +97,11 @@ parameter_types! { pub const MaxValueSize: u32 = 16_384; pub const DeletionQueueDepth: u32 = 1024; pub const DeletionWeightLimit: Weight = 500_000_000_000; - pub const MaxCodeSize: u32 = 2 * 1024 * 1024; - pub DefaultSchedule: Schedule = { - let mut schedule = >::default(); - schedule.limits.code_len = MaxCodeSize::get(); - schedule - }; + pub const MaxCodeLen: u32 = 2 * 1024 * 1024; + pub const RelaxedMaxCodeLen: u32 = 2 * 1024 * 1024; pub const TransactionByteFee: u64 = 0; + + pub DefaultSchedule: Schedule = Default::default(); } impl Convert for PinkRuntime { @@ -130,6 +128,8 @@ impl Config for PinkRuntime { type DepositPerItem = ConstU128<0>; type AddressGenerator = Pink; type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight; + type MaxCodeLen = MaxCodeLen; + type RelaxedMaxCodeLen = RelaxedMaxCodeLen; } diff --git a/pallets/bridge/src/lib.rs b/pallets/bridge/src/lib.rs index dc391a91c1..7678429cd7 100644 --- a/pallets/bridge/src/lib.rs +++ b/pallets/bridge/src/lib.rs @@ -433,7 +433,7 @@ pub mod pallet { /// Provides an AccountId for the pallet. /// This is used both as an origin check and deposit/withdrawal account. pub fn account_id() -> T::AccountId { - MODULE_ID.into_account() + MODULE_ID.into_account_truncating() } /// Asserts if a resource is registered @@ -710,7 +710,7 @@ pub mod pallet { impl EnsureOrigin for EnsureBridge { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { - let bridge_id = MODULE_ID.into_account(); + let bridge_id = MODULE_ID.into_account_truncating(); o.into().and_then(|o| match o { system::RawOrigin::Signed(who) if who == bridge_id => Ok(bridge_id), r => Err(T::Origin::from(r)), @@ -719,7 +719,7 @@ pub mod pallet { #[cfg(feature = "runtime-benchmarks")] fn successful_origin() -> T::Origin { - let bridge_id = MODULE_ID.into_account(); + let bridge_id = MODULE_ID.into_account_truncating(); T::Origin::from(system::RawOrigin::Signed(bridge_id)) } } diff --git a/pallets/bridge/src/mock.rs b/pallets/bridge/src/mock.rs index b947294dd3..4d6ac78452 100644 --- a/pallets/bridge/src/mock.rs +++ b/pallets/bridge/src/mock.rs @@ -106,7 +106,7 @@ pub const ENDOWED_BALANCE: u64 = 100_000_000; pub const TEST_THRESHOLD: u32 = 2; pub fn new_test_ext() -> sp_io::TestExternalities { - let bridge_id = PalletId(*b"phala/bg").into_account(); + let bridge_id = PalletId(*b"phala/bg").into_account_truncating(); let mut t = frame_system::GenesisConfig::default() .build_storage::() .unwrap(); diff --git a/pallets/bridge_transfer/src/mock.rs b/pallets/bridge_transfer/src/mock.rs index 32442a1b6a..ff9c14dd58 100644 --- a/pallets/bridge_transfer/src/mock.rs +++ b/pallets/bridge_transfer/src/mock.rs @@ -161,7 +161,7 @@ pub const RELAYER_C: u64 = 0x4; pub const ENDOWED_BALANCE: u64 = 100_000_000; pub fn new_test_ext() -> sp_io::TestExternalities { - let bridge_id = PalletId(*b"phala/bg").into_account(); + let bridge_id = PalletId(*b"phala/bg").into_account_truncating(); let mut t = frame_system::GenesisConfig::default() .build_storage::() .unwrap(); diff --git a/pallets/kitties/src/lib.rs b/pallets/kitties/src/lib.rs index 7eb845ee87..d30f39d568 100644 --- a/pallets/kitties/src/lib.rs +++ b/pallets/kitties/src/lib.rs @@ -147,7 +147,7 @@ decl_module! { } impl Module { pub fn account_id() -> T::AccountId { - PALLET_ID.into_account() + PALLET_ID.into_account_truncating() } fn transfer(to: T::AccountId, kitty_id: T::Hash) -> Result { diff --git a/pallets/phala/src/mining.rs b/pallets/phala/src/mining.rs index 648e173a36..d105682845 100644 --- a/pallets/phala/src/mining.rs +++ b/pallets/phala/src/mining.rs @@ -526,7 +526,7 @@ pub mod pallet { BalanceOf: FixedPointConvert, { pub fn account_id() -> T::AccountId { - MINING_PALLETID.into_account() + MINING_PALLETID.into_account_truncating() } fn heartbeat_challenge() { diff --git a/scripts/debug-cli/src/main.rs b/scripts/debug-cli/src/main.rs index ee772e7f91..9640c26332 100644 --- a/scripts/debug-cli/src/main.rs +++ b/scripts/debug-cli/src/main.rs @@ -189,7 +189,7 @@ async fn main() { use sp_runtime::traits::AccountIdConversion; let pallet_id_array: [u8; 8] = pallet_id.as_bytes().try_into().expect("Bad length"); let id = frame_support::PalletId(pallet_id_array); - let account: AccountId = id.into_account(); + let account: AccountId = id.into_account_truncating(); println!("Pallet account: {}", account); } Cli::Rpc { url, command } => { diff --git a/standalone/pruntime/Cargo.lock b/standalone/pruntime/Cargo.lock index 620355d14f..87fedca1ff 100644 --- a/standalone/pruntime/Cargo.lock +++ b/standalone/pruntime/Cargo.lock @@ -241,17 +241,16 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c290043c9a95b05d45e952fb6383c67bcb61471f60cfa21e890dba6654234f43" +checksum = "fd8b508d585e01084059b60f06ade4cb7415cd2e4084b71dd1cb44e7d3fb9880" dependencies = [ "async-channel", "async-executor", "async-io", - "async-mutex", + "async-lock", "blocking", "futures-lite", - "num_cpus", "once_cell", ] @@ -273,9 +272,9 @@ dependencies = [ [[package]] name = "async-io" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" +checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07" dependencies = [ "concurrent-queue", "futures-lite", @@ -299,15 +298,6 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-mutex" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" -dependencies = [ - "event-listener", -] - [[package]] name = "async-std" version = "1.11.0" @@ -624,9 +614,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byte-slice-cast" @@ -706,9 +696,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fd178c5af4d59e83498ef15cf3f154e1a6f9d091270cb86283c65ef44e9ef0" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] @@ -1238,13 +1228,14 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.3.3" +version = "5.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391b56fbd302e585b7a9494fb70e40949567b1cf9003a8e4a6041a1687c26573" +checksum = "3495912c9c1ccf2e18976439f4443f3fee0fd61f424ff99fde6a66b15ecb448f" dependencies = [ "cfg-if", "hashbrown 0.12.1", "lock_api", + "parking_lot_core 0.9.3", ] [[package]] @@ -1705,9 +1696,9 @@ dependencies = [ [[package]] name = "fixed-sqrt" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73d44f350be1d321180dc53d14b3a03570607ae6b3d9d681607e554f95b284c8" +checksum = "af725dbdc8dd186b6914026b51e43d99b332e8e816d3b495b84bf8304ac17b73" dependencies = [ "fixed", "integer-sqrt", @@ -2360,9 +2351,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -2448,9 +2439,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" dependencies = [ "bytes", "futures-channel", @@ -2536,9 +2527,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown 0.11.2", @@ -2553,18 +2544,18 @@ checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" [[package]] name = "ink_allocator" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe6a609d6c6cd84dd091419f672a5ed98504a111211491d7024014244782369" +checksum = "e131a5e2dc1ae56ba66a2b32fcac74134044e828cc46bfbeccead93b4d2a6cd3" dependencies = [ "cfg-if", ] [[package]] name = "ink_engine" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdedf68966ab265e469e99ae6fe72f6f421ca5e845578cd603ba38309a60823c" +checksum = "34a3accfd498e386e6a1dad78ca18ed8cbc699ec72f48931bd0d51cd7736e6fc" dependencies = [ "blake2", "derive_more", @@ -2577,9 +2568,9 @@ dependencies = [ [[package]] name = "ink_env" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43679bbf0e47f7a3a654c64fac0a206a673cd19d8a88db110a779519cbbc69e4" +checksum = "c68d27c8e99f67681862779f1238d13d2f6fae996a2140a0e52d1d25eeed8972" dependencies = [ "arrayref", "blake2", @@ -2604,9 +2595,9 @@ dependencies = [ [[package]] name = "ink_lang" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c870349b41516a75c479d70d9d7c7c38a2a56d82e8fc2fdb526cdf9cc590f95a" +checksum = "c18fdbce6774f2c4a1f5890412d3a5337e82c61b9e57a50295d91b314e264103" dependencies = [ "derive_more", "ink_env", @@ -2619,9 +2610,9 @@ dependencies = [ [[package]] name = "ink_lang_codegen" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8579c42a4a313ea22ad9362e5ad9988d499121f5ff37f28915ca5282cee9778" +checksum = "86c4cca39c31030b9ffdd6d0fecacec10158fde164868c4beb13399c95983b8d" dependencies = [ "blake2", "derive_more", @@ -2638,9 +2629,9 @@ dependencies = [ [[package]] name = "ink_lang_ir" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea5a1b06d72d1abaa50c7788e670f21e2de9fc9e651ee57b3b24596da693d08" +checksum = "eb68cdb4db44e7c088755857c93ec7a270e720bcd403c8caefa90100533759e5" dependencies = [ "blake2", "either", @@ -2652,9 +2643,9 @@ dependencies = [ [[package]] name = "ink_lang_macro" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6409c1a3929ce836a4f09677b2c1a85650651bd77e634dfc849ad004124bce4d" +checksum = "c39fcbdaffd4126eb985fcb571ac302e966f8d14c5c2d3d64c330ef111a9d789" dependencies = [ "ink_lang_codegen", "ink_lang_ir", @@ -2666,9 +2657,9 @@ dependencies = [ [[package]] name = "ink_metadata" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ad130f7a2645f22a6106b87bc9dd0e512f110b4e98da6960e4fc3d4daa766" +checksum = "e00b1ea893ae80972db897ae2c9ce2d5292961a9c7b83714d3ee6b17461413e1" dependencies = [ "derive_more", "impl-serde", @@ -2680,18 +2671,18 @@ dependencies = [ [[package]] name = "ink_prelude" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a9133adeaa0d07bb1f29b9d4a0db6f0399e34ff63d5c9f1c008cde54f4db24" +checksum = "17443d7d15df552eca048ba3b7ba8551fff3b0d529779bd3a64afc1be19ba65a" dependencies = [ "cfg-if", ] [[package]] name = "ink_primitives" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a45f65f373fa1a2d91b4293bb4dcf5858b5505d0aaa800b19d6fcd5b36f100" +checksum = "538ad6c2050f950099e6d0202c296d174854f956d2d815e608c24d9db214ae4f" dependencies = [ "cfg-if", "ink_prelude", @@ -2701,9 +2692,9 @@ dependencies = [ [[package]] name = "ink_storage" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddb68a60e3dacbde670f4eee693ace8008e7fe44cf6773f7873e59adb83902ac" +checksum = "9d1b226ba92ffa9dca87150bb0e472050db540d3af4ce1323311154971652d69" dependencies = [ "array-init", "cfg-if", @@ -2719,9 +2710,9 @@ dependencies = [ [[package]] name = "ink_storage_derive" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e4abd7ecf3a146a70dda56c8523583d2ec338fca3224179d8b592a2192dc4" +checksum = "7fbe35878a5db2fb9405bae6a0943bf9ace1198b1279ea6926e01d6ac0502599" dependencies = [ "proc-macro2 1.0.39", "quote 1.0.18", @@ -2806,9 +2797,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] name = "kv-log-macro" @@ -3109,9 +3100,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", ] @@ -3359,9 +3350,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b10983b38c53aebdf33f542c6275b0f58a238129d00c4ae0e6fb59738d783ca" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "opaque-debug" @@ -3387,9 +3378,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d8d0b2f198229de29dca79676f2738ff952edf3fde542eb8bf94d8c21b435" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "output_vt100" @@ -3755,6 +3746,7 @@ version = "1.0.0" dependencies = [ "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -3967,7 +3959,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "smallvec", "sp-core", "sp-io", "sp-runtime", @@ -4062,7 +4053,7 @@ dependencies = [ "hashbrown 0.12.1", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "winapi", ] @@ -4118,9 +4109,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", "parking_lot_core 0.9.3", @@ -4716,10 +4707,11 @@ dependencies = [ [[package]] name = "pink-sidevm-env" -version = "0.1.0" +version = "0.1.1" dependencies = [ "cfg-if", "derive_more", + "futures", "log", "num_enum", "parity-scale-codec", @@ -4732,7 +4724,7 @@ name = "pink-sidevm-host-runtime" version = "0.1.0" dependencies = [ "anyhow", - "dashmap 5.3.3", + "dashmap 5.3.4", "futures", "hex_fmt", "log", @@ -5271,9 +5263,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -5291,9 +5283,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "region" @@ -5414,7 +5406,7 @@ dependencies = [ "memchr", "multer", "num_cpus", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project-lite", "rand 0.8.5", "ref-cast", @@ -6181,7 +6173,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "rand 0.7.3", "regex", @@ -6285,7 +6277,7 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "secp256k1 0.21.3", "sp-core", "sp-externalities", @@ -6318,7 +6310,7 @@ dependencies = [ "futures", "merlin", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "schnorrkel", "sp-core", "sp-externalities", @@ -6465,7 +6457,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", "smallvec", "sp-core", @@ -6594,9 +6586,9 @@ checksum = "c530c2b0d0bf8b69304b39fe2001993e267461948b890cd037d8ad4293fa1a0d" [[package]] name = "ss58-registry" -version = "1.18.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceb8b72a924ccfe7882d0e26144c114503760a4d1248bb5cd06c8ab2d55404cc" +checksum = "5d804c8d48aeab838be31570866fce1130d275b563d49af08b4927a0bd561e7c" dependencies = [ "Inflector", "num-format", @@ -6834,9 +6826,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1" +checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" [[package]] name = "tempdir" @@ -7041,7 +7033,7 @@ dependencies = [ "mio", "num_cpus", "once_cell", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", "socket2", diff --git a/standalone/rpc/Cargo.toml b/standalone/rpc/Cargo.toml index e74940e4e2..8c64d1ce92 100644 --- a/standalone/rpc/Cargo.toml +++ b/standalone/rpc/Cargo.toml @@ -21,7 +21,6 @@ sc-consensus-epochs = { path = "../../substrate/client/consensus/epochs" } sc-chain-spec = { path = "../../substrate/client/chain-spec" } sc-finality-grandpa = { path = "../../substrate/client/finality-grandpa" } sc-finality-grandpa-rpc = { path = "../../substrate/client/finality-grandpa/rpc" } -sc-keystore = { path = "../../substrate/client/keystore" } sc-rpc-api = { path = "../../substrate/client/rpc-api" } sc-rpc = { path = "../../substrate/client/rpc" } sc-sync-state-rpc = { path = "../../substrate/client/sync-state-rpc" } diff --git a/standalone/rpc/src/lib.rs b/standalone/rpc/src/lib.rs index 9486cb915b..0bd09ba5e7 100644 --- a/standalone/rpc/src/lib.rs +++ b/standalone/rpc/src/lib.rs @@ -37,12 +37,10 @@ use jsonrpsee::RpcModule; use node_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index}; use sc_client_api::AuxStore; use sc_consensus_babe::{Config, Epoch}; -use sc_consensus_babe_rpc::BabeRpc; use sc_consensus_epochs::SharedEpochChanges; use sc_finality_grandpa::{ FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, }; -use sc_finality_grandpa_rpc::GrandpaRpc; use sc_rpc::SubscriptionTaskExecutor; pub use sc_rpc_api::DenyUnsafe; use sc_transaction_pool_api::TransactionPool; @@ -98,7 +96,7 @@ pub struct FullDeps { /// Instantiate all Full RPC extensions. pub fn create_full( deps: FullDeps, - backend: Arc, + _backend: Arc, ) -> Result, Box> where C: ProvideRuntimeApi @@ -118,11 +116,11 @@ pub fn create_full( B: sc_client_api::Backend + Send + Sync + 'static, B::State: sc_client_api::backend::StateBackend>, { - use pallet_transaction_payment_rpc::{TransactionPaymentApiServer, TransactionPaymentRpc}; - use sc_consensus_babe_rpc::BabeApiServer; - use sc_finality_grandpa_rpc::GrandpaApiServer; - use sc_sync_state_rpc::{SyncStateRpc, SyncStateRpcApiServer}; - use substrate_frame_rpc_system::{SystemApiServer, SystemRpc}; + use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; + use sc_consensus_babe_rpc::{Babe, BabeApiServer}; + use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer}; + use sc_sync_state_rpc::{SyncState, SyncStateApiServer}; + use substrate_frame_rpc_system::{System, SystemApiServer}; let mut io = RpcModule::new(()); let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa } = deps; @@ -136,13 +134,13 @@ pub fn create_full( finality_provider, } = grandpa; - io.merge(SystemRpc::new(client.clone(), pool, deny_unsafe).into_rpc())?; + io.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; // Making synchronous calls in light client freezes the browser currently, // more context: https://github.com/paritytech/substrate/pull/3480 // These RPCs should use an asynchronous caller instead. - io.merge(TransactionPaymentRpc::new(client.clone()).into_rpc())?; + io.merge(TransactionPayment::new(client.clone()).into_rpc())?; io.merge( - BabeRpc::new( + Babe::new( client.clone(), shared_epoch_changes.clone(), keystore, @@ -153,7 +151,7 @@ pub fn create_full( .into_rpc(), )?; io.merge( - GrandpaRpc::new( + Grandpa::new( subscription_executor, shared_authority_set.clone(), shared_voter_state, @@ -164,7 +162,7 @@ pub fn create_full( )?; io.merge( - SyncStateRpc::new(chain_spec, client.clone(), shared_authority_set, shared_epoch_changes)? + SyncState::new(chain_spec, client.clone(), shared_authority_set, shared_epoch_changes)? .into_rpc(), )?; diff --git a/standalone/runtime/src/impls.rs b/standalone/runtime/src/impls.rs index 907c6332ef..511a81a7f9 100644 --- a/standalone/runtime/src/impls.rs +++ b/standalone/runtime/src/impls.rs @@ -17,8 +17,11 @@ //! Some configurable implementations as associated type for the substrate runtime. -use crate::{Authorship, Balances, NegativeImbalance}; -use frame_support::traits::{Currency, OnUnbalanced}; +use crate::{AccountId, Authorship, Balances, NegativeImbalance, Runtime}; +use frame_support::traits::{ + fungibles::{Balanced, CreditOf}, + Currency, OnUnbalanced, +}; pub struct Author; impl OnUnbalanced for Author { @@ -43,7 +46,7 @@ mod multiplier_tests { AdjustmentVariable, MinimumMultiplier, Runtime, RuntimeBlockWeights as BlockWeights, System, TargetBlockFullness, TransactionPayment, }; - use frame_support::weights::{DispatchClass, Weight, WeightToFeePolynomial}; + use frame_support::weights::{DispatchClass, Weight, WeightToFee}; fn max_normal() -> Weight { BlockWeights::get() @@ -218,7 +221,9 @@ mod multiplier_tests { fm = next; iterations += 1; let fee = - ::WeightToFee::calc(&tx_weight); + ::WeightToFee::weight_to_fee( + &tx_weight, + ); let adjusted_fee = fm.saturating_mul_acc_int(fee); println!( "iteration {}, new fm = {:?}. Fee at this point is: {} units / {} millicents, \ @@ -342,14 +347,14 @@ mod multiplier_tests { Weight::max_value() / 2, Weight::max_value(), ] - .into_iter() - .for_each(|i| { - run_with_system_weight(i, || { - let next = runtime_multiplier_update(Multiplier::one()); - let truth = truth_value_update(i, Multiplier::one()); - assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000)); + .into_iter() + .for_each(|i| { + run_with_system_weight(i, || { + let next = runtime_multiplier_update(Multiplier::one()); + let truth = truth_value_update(i, Multiplier::one()); + assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000)); + }); }); - }); // Some values that are all above the target and will cause an increase. let t = target(); diff --git a/standalone/runtime/src/lib.rs b/standalone/runtime/src/lib.rs index f4c7090496..9b7be9d07b 100644 --- a/standalone/runtime/src/lib.rs +++ b/standalone/runtime/src/lib.rs @@ -27,7 +27,7 @@ mod msg_routing; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_election_provider_support::{onchain, ExtendedBalance, SequentialPhragmen, VoteWeight}; +use frame_election_provider_support::{onchain, ElectionDataProvider, ExtendedBalance, SequentialPhragmen, VoteWeight}; use frame_support::{ pallet_prelude::Get, construct_runtime, parameter_types, @@ -672,6 +672,25 @@ impl onchain::BoundedConfig for OnChainSeqPhragmen { type TargetsBound = ConstU32<2_000>; } +impl pallet_election_provider_multi_phase::MinerConfig for Runtime { + type AccountId = AccountId; + type MaxLength = MinerMaxLength; + type MaxWeight = MinerMaxWeight; + type Solution = NposSolution16; + type MaxVotesPerVoter = + <::DataProvider as ElectionDataProvider>::MaxVotesPerVoter; + + // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their + // weight estimate function is wired to this call's weight. + fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight { + < + ::WeightInfo + as + pallet_election_provider_multi_phase::WeightInfo + >::submit_unsigned(v, t, a, d) + } +} + impl pallet_election_provider_multi_phase::Config for Runtime { type Event = Event; type Currency = Balances; @@ -681,9 +700,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type BetterUnsignedThreshold = BetterUnsignedThreshold; type BetterSignedThreshold = (); type OffchainRepeat = OffchainRepeat; - type MinerMaxWeight = MinerMaxWeight; - type MinerMaxLength = MinerMaxLength; type MinerTxPriority = MultiPhaseUnsignedPriority; + type MinerConfig = Self; type SignedMaxSubmissions = ConstU32<10>; type SignedRewardBase = SignedRewardBase; type SignedDepositBase = SignedDepositBase; @@ -694,7 +712,6 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type SlashHandler = (); // burn slashes type RewardHandler = (); // nothing to do upon rewards type DataProvider = Staking; - type Solution = NposSolution16; type Fallback = onchain::BoundedExecution; type GovernanceFallback = onchain::BoundedExecution; type Solver = SequentialPhragmen, OffchainRandomBalancing>; @@ -720,6 +737,7 @@ impl pallet_bags_list::Config for Runtime { parameter_types! { pub const PostUnbondPoolsWindow: u32 = 4; pub const NominationPoolsPalletId: PalletId = PalletId(*b"py/nopls"); + pub const MinPointsToBalance: u32 = 10; } use sp_runtime::traits::Convert; @@ -747,6 +765,7 @@ impl pallet_nomination_pools::Config for Runtime { type MaxMetadataLen = ConstU32<256>; type MaxUnbonding = ConstU32<8>; type PalletId = NominationPoolsPalletId; + type MinPointsToBalance = MinPointsToBalance; } parameter_types! { @@ -1598,7 +1617,7 @@ mod tests { #[test] fn perbill_as_onchain_accuracy() { type OnChainAccuracy = - <::Solution as NposSolution>::Accuracy; + <::Solution as NposSolution>::Accuracy; let maximum_chain_accuracy: Vec> = (0..MaxNominations::get()) .map(|_| >::from(OnChainAccuracy::one().deconstruct())) .collect(); diff --git a/substrate b/substrate index 616d33ea23..6cbe1772bf 160000 --- a/substrate +++ b/substrate @@ -1 +1 @@ -Subproject commit 616d33ea23bab86cafffaf116fc607b6790fb4eb +Subproject commit 6cbe1772bf258793fa9845daa8f43ea0cadee596 diff --git a/subxt b/subxt index d6027f1a55..428bebe540 160000 --- a/subxt +++ b/subxt @@ -1 +1 @@ -Subproject commit d6027f1a556bfba21653094824af334ea9bd1c94 +Subproject commit 428bebe5405e2b5fe5390e933354384498b995f8