From 944ed8b251e74916d55a1211acd1a32d6862e9fb Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 15 Sep 2023 14:36:50 +0900 Subject: [PATCH 01/68] Upgrade towards 1.0.0 Refactor BlockNumber to BlockNumberFor https://github.com/paritytech/polkadot/pull/7431 https://github.com/paritytech/substrate/pull/14437 --- Cargo.lock | 2076 ++++++++++++++++---------------- node/Cargo.toml | 104 +- pallets/allocations/Cargo.toml | 22 +- pallets/allocations/src/lib.rs | 45 +- pallets/grants/Cargo.toml | 18 +- pallets/grants/src/lib.rs | 10 +- pallets/mandate/Cargo.toml | 12 +- pallets/reserve/Cargo.toml | 16 +- pallets/sponsorship/Cargo.toml | 20 +- pallets/uniques/Cargo.toml | 18 +- primitives/Cargo.toml | 20 +- runtimes/eden/Cargo.toml | 128 +- runtimes/eden/src/lib.rs | 5 +- support/Cargo.toml | 2 +- 14 files changed, 1277 insertions(+), 1219 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3a575508208..1581db6480c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,11 +14,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.26.2", + "gimli 0.27.3", ] [[package]] @@ -278,12 +278,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" -[[package]] -name = "array-bytes" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" - [[package]] name = "array-bytes" version = "6.1.0" @@ -375,12 +369,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - [[package]] name = "assert_matches" version = "1.5.0" @@ -435,7 +423,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -446,7 +434,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -548,7 +536,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db", "log", @@ -565,9 +553,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.64.0" +version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ "bitflags 1.3.2", "cexpr", @@ -575,12 +563,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", + "prettyplease 0.2.15", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 1.0.109", + "syn 2.0.33", ] [[package]] @@ -755,9 +744,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -864,9 +853,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.10.3" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", ] @@ -924,13 +913,13 @@ dependencies = [ [[package]] name = "cid" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash 0.16.3", + "multihash", "serde", "unsigned-varint", ] @@ -985,9 +974,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.2" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" +checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" dependencies = [ "clap_builder", "clap_derive", @@ -1014,7 +1003,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -1053,15 +1042,21 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" dependencies = [ "strum", "strum_macros", "unicode-width", ] +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + [[package]] name = "concurrent-queue" version = "2.2.0" @@ -1090,6 +1085,28 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +[[package]] +name = "const-random" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +dependencies = [ + "const-random-macro", + "proc-macro-hack", +] + +[[package]] +name = "const-random-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "proc-macro-hack", + "tiny-keccak", +] + [[package]] name = "constant_time_eq" version = "0.3.0" @@ -1157,28 +1174,27 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.4", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", - "hashbrown 0.12.3", + "gimli 0.27.3", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1187,33 +1203,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -1223,15 +1239,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -1240,9 +1256,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1413,12 +1429,13 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "clap", "parity-scale-codec", "sc-chain-spec", "sc-cli", + "sc-client-api", "sc-service", "sp-core", "sp-runtime", @@ -1428,7 +1445,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1451,16 +1468,26 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", + "cumulus-client-collator", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", + "cumulus-primitives-aura", "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", "futures", + "lru 0.10.1", "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-overseer", + "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-aura", + "sc-consensus-babe", "sc-consensus-slots", "sc-telemetry", "sp-api", @@ -1473,6 +1500,8 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", + "sp-state-machine", + "sp-timestamp", "substrate-prometheus-endpoint", "tracing", ] @@ -1480,7 +1509,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1493,18 +1522,38 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus", + "sc-consensus-babe", "schnellru", "sp-blockchain", "sp-consensus", + "sp-consensus-slots", + "sp-core", "sp-runtime", + "sp-timestamp", "sp-trie", + "substrate-prometheus-endpoint", "tracing", ] +[[package]] +name = "cumulus-client-consensus-proposer" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" +dependencies = [ + "anyhow", + "async-trait", + "cumulus-primitives-parachain-inherent", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "thiserror", +] + [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1527,7 +1576,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1551,7 +1600,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1586,7 +1635,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "frame-support", "frame-system", @@ -1602,7 +1651,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1619,7 +1668,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1648,18 +1697,18 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1675,7 +1724,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -1693,10 +1742,24 @@ dependencies = [ "xcm-executor", ] +[[package]] +name = "cumulus-primitives-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-primitives", + "sp-api", + "sp-consensus-aura", + "sp-runtime", + "sp-std", +] + [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -1713,7 +1776,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1736,7 +1799,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "futures", @@ -1749,7 +1812,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1767,7 +1830,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1775,7 +1838,6 @@ dependencies = [ "futures", "futures-timer", "polkadot-cli", - "polkadot-client", "polkadot-service", "sc-cli", "sc-client-api", @@ -1792,7 +1854,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1810,9 +1872,9 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -1848,7 +1910,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1878,7 +1940,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -1925,7 +1987,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms 3.1.2", + "platforms", "rustc_version 0.4.0", "subtle", "zeroize", @@ -1939,7 +2001,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -1966,7 +2028,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -1983,7 +2045,7 @@ checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -2253,7 +2315,33 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", +] + +[[package]] +name = "docify" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1b04e6ef3d21119d3eb7b032bca17f99fe041e9c072f30f32cc0e1a2b1f3c4" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b5610df7f2acf89a1bb5d1a66ae56b1c7fcdcfe3948856fb3ace3f644d70eb7" +dependencies = [ + "common-path", + "derive-syn-parse", + "lazy_static", + "proc-macro2", + "quote", + "regex", + "syn 2.0.33", + "termcolor", + "walkdir", ] [[package]] @@ -2354,8 +2442,6 @@ checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", "ed25519 1.5.3", - "rand 0.7.3", - "serde", "sha2 0.9.9", "zeroize", ] @@ -2455,22 +2541,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -2481,7 +2567,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -2569,19 +2655,6 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "expander" version = "2.0.0" @@ -2592,7 +2665,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -2767,7 +2840,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", ] @@ -2790,7 +2863,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-support-procedural", @@ -2815,10 +2888,10 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", - "array-bytes 4.2.0", + "array-bytes", "chrono", "clap", "comfy-table", @@ -2849,12 +2922,13 @@ dependencies = [ "sp-database", "sp-externalities", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", "sp-storage", "sp-trie", + "sp-wasm-interface", "thiserror", "thousands", ] @@ -2862,18 +2936,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2890,7 +2964,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -2906,9 +2980,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", "parity-scale-codec", @@ -2919,7 +2993,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-recursion", "futures", @@ -2934,12 +3008,13 @@ dependencies = [ "spinners", "substrate-rpc-client", "tokio", + "tokio-retry", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bitflags 1.3.2", "environmental", @@ -2948,7 +3023,7 @@ dependencies = [ "impl-trait-for-tuples", "k256", "log", - "once_cell", + "macro_magic", "parity-scale-codec", "paste", "scale-info", @@ -2958,6 +3033,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", + "sp-debug-derive", "sp-inherents", "sp-io", "sp-runtime", @@ -2972,46 +3048,49 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", + "expander 2.0.0", "frame-support-procedural-tools", "itertools 0.10.5", + "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "cfg-if", "frame-support", "log", "parity-scale-codec", @@ -3028,7 +3107,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -3043,7 +3122,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sp-api", @@ -3052,7 +3131,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "parity-scale-codec", @@ -3165,7 +3244,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -3300,9 +3379,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", "indexmap 1.9.3", @@ -3606,21 +3685,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "log", - "rustls 0.20.9", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", -] - [[package]] name = "hyper-rustls" version = "0.24.1" @@ -3634,7 +3698,7 @@ dependencies = [ "rustls 0.21.7", "rustls-native-certs", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "webpki-roots 0.23.1", ] @@ -3838,6 +3902,12 @@ dependencies = [ "webrtc-util", ] +[[package]] +name = "intx" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3956,7 +4026,7 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", "tracing", "webpki-roots 0.25.2", @@ -3998,7 +4068,7 @@ checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ "async-trait", "hyper", - "hyper-rustls 0.24.1", + "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -4094,8 +4164,8 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "frame-benchmarking", @@ -4128,6 +4198,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -4146,6 +4217,7 @@ dependencies = [ "pallet-society", "pallet-staking", "pallet-staking-runtime-api", + "pallet-state-trie-migration", "pallet-timestamp", "pallet-tips", "pallet-transaction-payment", @@ -4192,8 +4264,8 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "polkadot-primitives", @@ -4225,9 +4297,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7a749456510c45f795e8b04a6a3e0976d0139213ecbf465843830ad55e2217" +checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", @@ -4237,6 +4309,17 @@ dependencies = [ "smallvec", ] +[[package]] +name = "landlock" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520baa32708c4e957d2fc3a186bc5bd8d26637c33137f399ddfc202adb240068" +dependencies = [ + "enumflags2", + "libc", + "thiserror", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -4254,9 +4337,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libloading" @@ -4276,22 +4359,24 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libp2p" -version = "0.50.1" +version = "0.51.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" +checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" dependencies = [ "bytes", "futures", "futures-timer", "getrandom 0.2.10", "instant", - "libp2p-core 0.38.0", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", "libp2p-dns", "libp2p-identify", + "libp2p-identity", "libp2p-kad", "libp2p-mdns", "libp2p-metrics", - "libp2p-mplex", "libp2p-noise", "libp2p-ping", "libp2p-quic", @@ -4302,44 +4387,32 @@ dependencies = [ "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", - "multiaddr 0.16.0", - "parking_lot 0.12.1", + "multiaddr", "pin-project", - "smallvec", ] [[package]] -name = "libp2p-core" -version = "0.38.0" +name = "libp2p-allow-block-list" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek 1.0.1", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "log", - "multiaddr 0.16.0", - "multihash 0.16.3", - "multistream-select", - "once_cell", - "parking_lot 0.12.1", - "pin-project", - "prost", - "prost-build", - "rand 0.8.5", - "rw-stream-sink", - "sec1 0.3.0", - "sha2 0.10.7", - "smallvec", - "thiserror", - "unsigned-varint", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", "void", - "zeroize", ] [[package]] @@ -4355,8 +4428,8 @@ dependencies = [ "instant", "libp2p-identity", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -4372,12 +4445,12 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "smallvec", @@ -4386,20 +4459,21 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", + "either", "futures", "futures-timer", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "lru 0.8.1", - "prost", - "prost-build", - "prost-codec", + "lru 0.10.1", + "quick-protobuf", + "quick-protobuf-codec", "smallvec", "thiserror", "void", @@ -4414,8 +4488,8 @@ dependencies = [ "bs58", "ed25519-dalek 2.0.0", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", @@ -4425,9 +4499,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.42.1" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ "arrayvec 0.7.4", "asynchronous-codec", @@ -4437,11 +4511,11 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", "smallvec", @@ -4453,14 +4527,15 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", "futures", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", "rand 0.8.5", @@ -4473,11 +4548,11 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-identify", "libp2p-kad", "libp2p-ping", @@ -4485,38 +4560,20 @@ dependencies = [ "prometheus-client", ] -[[package]] -name = "libp2p-mplex" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core 0.38.0", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "unsigned-varint", -] - [[package]] name = "libp2p-noise" -version = "0.41.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "log", "once_cell", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", "snow", @@ -4528,14 +4585,15 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ + "either", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.8.5", @@ -4544,15 +4602,16 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -4565,49 +4624,46 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "bytes", "futures", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", - "log", "rand 0.8.5", "smallvec", - "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm-derive", "log", - "pin-project", "rand 0.8.5", "smallvec", - "thiserror", "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ "heck", "quote", @@ -4616,15 +4672,15 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ "futures", "futures-timer", "if-watch", "libc", - "libp2p-core 0.38.0", + "libp2p-core", "log", "socket2 0.4.9", "tokio", @@ -4638,7 +4694,7 @@ checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.2", + "libp2p-core", "libp2p-identity", "rcgen 0.10.0", "ring", @@ -4651,13 +4707,13 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ "futures", "js-sys", - "libp2p-core 0.38.0", + "libp2p-core", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -4665,9 +4721,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha" +version = "0.4.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" dependencies = [ "async-trait", "asynchronous-codec", @@ -4676,13 +4732,13 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-noise", "log", - "multihash 0.16.3", - "prost", - "prost-build", - "prost-codec", + "multihash", + "quick-protobuf", + "quick-protobuf-codec", "rand 0.8.5", "rcgen 0.9.3", "serde", @@ -4696,14 +4752,14 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.40.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", "futures", "futures-rustls", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "quicksink", @@ -4715,23 +4771,22 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core", "log", - "parking_lot 0.12.1", "thiserror", "yamux", ] [[package]] name = "librocksdb-sys" -version = "0.10.0+7.9.2" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe4d5874f5ff2bc616e55e8c6086d478fcda13faf9495768a4aa1c22042d30b" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ "bindgen", "bzip2-sys", @@ -4870,18 +4925,18 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] name = "lru" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ "hashbrown 0.13.2", ] @@ -4925,17 +4980,65 @@ dependencies = [ ] [[package]] -name = "maplit" -version = "1.0.2" +name = "macro_magic" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" +checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.33", +] [[package]] -name = "match_cfg" -version = "0.1.0" +name = "macro_magic_core" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - +checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.33", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.33", +] + +[[package]] +name = "macro_magic_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.33", +] + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + [[package]] name = "matchers" version = "0.0.1" @@ -5003,6 +5106,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + [[package]] name = "memoffset" version = "0.9.0" @@ -5021,12 +5133,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -5079,7 +5185,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "log", @@ -5098,7 +5204,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "anyhow", "jsonrpsee", @@ -5138,24 +5244,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "multiaddr" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" -dependencies = [ - "arrayref", - "byteorder", - "data-encoding", - "multibase", - "multihash 0.16.3", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint", - "url", -] - [[package]] name = "multiaddr" version = "0.17.1" @@ -5167,7 +5255,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -5188,9 +5276,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.16.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "blake2b_simd", "blake2s_simd", @@ -5203,17 +5291,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "multihash" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" -dependencies = [ - "core2", - "multihash-derive", - "unsigned-varint", -] - [[package]] name = "multihash-derive" version = "0.8.0" @@ -5536,12 +5613,12 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.29.0" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "indexmap 1.9.3", "memchr", ] @@ -5641,7 +5718,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.42#4ae0372e2c624e6acc98305564b9d395f70814c0" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.0.0#6819d3f28f9005c0a375e359c942490e04e20000" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -5660,12 +5737,13 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.42#4ae0372e2c624e6acc98305564b9d395f70814c0" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.0.0#6819d3f28f9005c0a375e359c942490e04e20000" dependencies = [ "frame-support", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -5674,7 +5752,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.42#4ae0372e2c624e6acc98305564b9d395f70814c0" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.0.0#6819d3f28f9005c0a375e359c942490e04e20000" dependencies = [ "frame-support", "orml-traits", @@ -5688,7 +5766,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.42#4ae0372e2c624e6acc98305564b9d395f70814c0" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.0.0#6819d3f28f9005c0a375e359c942490e04e20000" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -5754,7 +5832,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -5770,7 +5848,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -5786,7 +5864,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -5800,7 +5878,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5824,7 +5902,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5844,7 +5922,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5859,7 +5937,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -5878,9 +5956,9 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "binary-merkle-tree", "frame-support", "frame-system", @@ -5902,7 +5980,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5920,7 +5998,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5939,7 +6017,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5958,7 +6036,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5975,7 +6053,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bitflags 1.3.2", "environmental", @@ -5998,14 +6076,13 @@ dependencies = [ "sp-runtime", "sp-std", "wasm-instrument 0.4.0", - "wasmi 0.28.0", - "wasmparser-nostd", + "wasmi", ] [[package]] name = "pallet-contracts-primitives" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "24.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -6018,17 +6095,17 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6045,7 +6122,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6063,7 +6140,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6086,7 +6163,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6099,7 +6176,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6111,14 +6188,16 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", + "sp-staking", "sp-std", ] [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -6135,7 +6214,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6177,7 +6256,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6193,7 +6272,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6213,7 +6292,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6230,7 +6309,7 @@ dependencies = [ [[package]] name = "pallet-insecure-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -6259,7 +6338,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6273,10 +6352,29 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6293,7 +6391,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6309,7 +6407,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6344,7 +6442,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -6361,7 +6459,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6381,7 +6479,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6392,7 +6490,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -6409,7 +6507,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6433,7 +6531,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6450,7 +6548,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6465,7 +6563,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6483,7 +6581,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6498,7 +6596,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6535,7 +6633,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6552,7 +6650,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -6573,7 +6671,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6589,13 +6687,18 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "hex-literal 0.3.4", + "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", + "sp-arithmetic", + "sp-io", "sp-runtime", "sp-std", ] @@ -6622,7 +6725,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6645,18 +6748,18 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "sp-arithmetic", @@ -6665,7 +6768,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sp-api", @@ -6674,7 +6777,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6691,8 +6794,9 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -6705,7 +6809,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6723,7 +6827,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6742,7 +6846,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -6758,7 +6862,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6774,7 +6878,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6786,7 +6890,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6803,7 +6907,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6818,7 +6922,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6834,7 +6938,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6849,7 +6953,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6863,8 +6967,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -6884,8 +6988,8 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6904,20 +7008,22 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-runtime", + "sp-std", ] [[package]] name = "parity-db" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +checksum = "ab512a34b3c2c5e465731cc7668edf79208bbe520be03484eeb05e63ed221735" dependencies = [ "blake2", "crc32fast", @@ -6935,9 +7041,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.8" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88eaac72ead1b9bd4ce747d577dbd2ad31fb0a56a9a20c611bf27bd1b97fbed" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -6950,9 +7056,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.8" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33bdcd446e9400b6ad9fc85b4aea68846c258b07c3efb994679ae82707b133f0" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7026,6 +7132,12 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + [[package]] name = "paste" version = "1.0.14" @@ -7111,7 +7223,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -7152,7 +7264,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -7199,12 +7311,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "platforms" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" - [[package]] name = "platforms" version = "3.1.2" @@ -7213,15 +7319,17 @@ checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" [[package]] name = "polkadot-approval-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", + "futures-timer", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", "tracing-gum", @@ -7229,10 +7337,11 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", + "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7243,8 +7352,8 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "derive_more", "fatality", @@ -7266,8 +7375,8 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "fatality", "futures", @@ -7287,15 +7396,15 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "clap", "frame-benchmarking-cli", "futures", "log", - "polkadot-client", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-execute-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-metrics", "polkadot-service", "sc-cli", @@ -7313,52 +7422,10 @@ dependencies = [ "try-runtime-cli", ] -[[package]] -name = "polkadot-client" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" -dependencies = [ - "async-trait", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-system", - "frame-system-rpc-runtime-api", - "futures", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "polkadot-core-primitives", - "polkadot-node-core-parachains-inherent", - "polkadot-primitives", - "polkadot-runtime", - "polkadot-runtime-common", - "sc-client-api", - "sc-consensus", - "sc-executor", - "sc-service", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-keyring", - "sp-mmr-primitives", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-storage", - "sp-timestamp", - "sp-transaction-pool", -] - [[package]] name = "polkadot-collator-protocol" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "always-assert", "bitvec", @@ -7379,8 +7446,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -7391,8 +7458,8 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "derive_more", "fatality", @@ -7416,8 +7483,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7430,8 +7497,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "futures-timer", @@ -7450,8 +7517,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "always-assert", "async-trait", @@ -7473,8 +7540,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "parity-scale-codec", @@ -7491,8 +7558,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "derive_more", @@ -7520,8 +7587,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "futures", @@ -7529,6 +7596,7 @@ dependencies = [ "kvdb", "parity-scale-codec", "polkadot-erasure-coding", + "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7541,8 +7609,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "fatality", @@ -7560,8 +7628,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7575,8 +7643,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "futures", @@ -7595,8 +7663,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "polkadot-node-metrics", @@ -7610,8 +7678,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "futures-timer", @@ -7627,8 +7695,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "fatality", "futures", @@ -7646,8 +7714,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "futures", @@ -7663,8 +7731,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "fatality", @@ -7681,8 +7749,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "always-assert", "futures", @@ -7691,6 +7759,9 @@ dependencies = [ "parity-scale-codec", "pin-project", "polkadot-core-primitives", + "polkadot-node-core-pvf-common", + "polkadot-node-core-pvf-execute-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-parachain", @@ -7702,14 +7773,15 @@ dependencies = [ "sp-tracing", "sp-wasm-interface", "substrate-build-script-utils", + "tempfile", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "polkadot-node-primitives", @@ -7723,29 +7795,67 @@ dependencies = [ ] [[package]] -name = "polkadot-node-core-pvf-worker" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +name = "polkadot-node-core-pvf-common" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ - "assert_matches", "cpu-time", "futures", + "landlock", "libc", "parity-scale-codec", - "polkadot-node-core-pvf", "polkadot-parachain", "polkadot-primitives", - "rayon", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", "sp-core", "sp-externalities", "sp-io", - "sp-maybe-compressed-blob", "sp-tracing", "substrate-build-script-utils", - "tempfile", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-execute-worker" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "cpu-time", + "futures", + "parity-scale-codec", + "polkadot-node-core-pvf-common", + "polkadot-parachain", + "polkadot-primitives", + "rayon", + "sp-core", + "sp-maybe-compressed-blob", + "sp-tracing", + "tikv-jemalloc-ctl", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-prepare-worker" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "futures", + "libc", + "parity-scale-codec", + "polkadot-node-core-pvf-common", + "polkadot-parachain", + "polkadot-primitives", + "rayon", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-io", + "sp-maybe-compressed-blob", + "sp-tracing", "tikv-jemalloc-ctl", "tokio", "tracing-gum", @@ -7753,8 +7863,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "lru 0.9.0", @@ -7768,8 +7878,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "lazy_static", "log", @@ -7786,8 +7896,8 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bs58", "futures", @@ -7805,9 +7915,10 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ + "async-channel", "async-trait", "derive_more", "fatality", @@ -7827,8 +7938,8 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bounded-vec", "futures", @@ -7849,8 +7960,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7859,8 +7970,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "derive_more", @@ -7872,6 +7983,7 @@ dependencies = [ "polkadot-primitives", "polkadot-statement-table", "sc-network", + "sc-transaction-pool-api", "smallvec", "sp-api", "sp-authority-discovery", @@ -7882,8 +7994,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "derive_more", @@ -7915,8 +8027,8 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "futures", @@ -7938,8 +8050,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bounded-collections", "derive_more", @@ -7955,8 +8067,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "hex-literal 0.4.1", @@ -7981,8 +8093,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -8013,8 +8125,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "frame-benchmarking", @@ -8046,6 +8158,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -8107,8 +8220,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "frame-benchmarking", @@ -8153,8 +8266,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "polkadot-primitives", @@ -8167,8 +8280,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bs58", "parity-scale-codec", @@ -8179,8 +8292,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -8193,6 +8306,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -8223,12 +8337,14 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", + "frame-benchmarking", "frame-benchmarking-cli", "frame-support", + "frame-system", "frame-system-rpc-runtime-api", "futures", "hex-literal 0.4.1", @@ -8241,14 +8357,16 @@ dependencies = [ "pallet-babe", "pallet-im-online", "pallet-staking", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-db", + "parity-scale-codec", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", "polkadot-availability-recovery", - "polkadot-client", "polkadot-collator-protocol", + "polkadot-core-primitives", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -8275,7 +8393,7 @@ dependencies = [ "polkadot-primitives", "polkadot-rpc", "polkadot-runtime", - "polkadot-runtime-constants", + "polkadot-runtime-common", "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", @@ -8301,6 +8419,7 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "serde_json", "sp-api", @@ -8314,6 +8433,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-io", + "sp-keyring", "sp-keystore", "sp-mmr-primitives", "sp-offchain", @@ -8324,6 +8444,8 @@ dependencies = [ "sp-timestamp", "sp-transaction-pool", "sp-trie", + "sp-version", + "sp-weights", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -8332,12 +8454,13 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "arrayvec 0.5.2", "fatality", "futures", + "futures-timer", "indexmap 1.9.3", "parity-scale-codec", "polkadot-node-network-protocol", @@ -8353,8 +8476,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8464,6 +8587,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2", + "syn 2.0.33", +] + [[package]] name = "primitive-types" version = "0.12.1" @@ -8546,22 +8679,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + [[package]] name = "proc-macro-warning" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" +checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -8582,25 +8721,25 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", "parking_lot 0.12.1", - "prometheus-client-derive-text-encode", + "prometheus-client-derive-encode", ] [[package]] -name = "prometheus-client-derive-text-encode" -version = "0.3.0" +name = "prometheus-client-derive-encode" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.33", ] [[package]] @@ -8626,26 +8765,13 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn 1.0.109", - "tempfile", - "which", -] - -[[package]] -name = "prost-codec" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" -dependencies = [ - "asynchronous-codec", - "bytes", + "prettyplease 0.1.25", "prost", - "thiserror", - "unsigned-varint", + "prost-types", + "regex", + "syn 1.0.109", + "tempfile", + "which", ] [[package]] @@ -8694,6 +8820,19 @@ dependencies = [ "byteorder", ] +[[package]] +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint", +] + [[package]] name = "quicksink" version = "0.1.2" @@ -8930,14 +9069,14 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -8989,18 +9128,6 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" -[[package]] -name = "region" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" -dependencies = [ - "bitflags 1.3.2", - "libc", - "mach", - "winapi", -] - [[package]] name = "resolv-conf" version = "0.7.0" @@ -9049,9 +9176,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015439787fce1e75d55f279078d33ff14b4af5d93d995e8838ee4631301c8a99" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ "libc", "librocksdb-sys", @@ -9059,8 +9186,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -9088,6 +9215,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -9145,8 +9273,8 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "polkadot-primitives", @@ -9423,7 +9551,7 @@ checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "rustls-webpki 0.101.4", + "rustls-webpki 0.101.5", "sct 0.7.0", ] @@ -9450,9 +9578,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.100.2" +version = "0.100.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" dependencies = [ "ring", "untrusted", @@ -9460,9 +9588,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" dependencies = [ "ring", "untrusted", @@ -9521,7 +9649,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "sp-core", @@ -9532,7 +9660,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -9540,13 +9668,13 @@ dependencies = [ "ip_network", "libp2p", "log", + "multihash", "parity-scale-codec", "prost", "prost-build", "rand 0.8.5", "sc-client-api", "sc-network", - "sc-network-common", "sp-api", "sp-authority-discovery", "sp-blockchain", @@ -9560,7 +9688,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "futures-timer", @@ -9583,7 +9711,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9598,7 +9726,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9617,25 +9745,25 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "chrono", "clap", "fdlimit", "futures", - "libp2p", + "libp2p-identity", "log", "names", "parity-scale-codec", @@ -9646,7 +9774,6 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -9668,7 +9795,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "fnv", "futures", @@ -9684,9 +9811,9 @@ dependencies = [ "sp-core", "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-statement-store", "sp-storage", "substrate-prometheus-endpoint", ] @@ -9694,7 +9821,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db", "kvdb", @@ -9720,12 +9847,12 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p", + "libp2p-identity", "log", "mockall", "parking_lot 0.12.1", @@ -9745,7 +9872,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -9774,7 +9901,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "fork-tree", @@ -9789,8 +9916,8 @@ dependencies = [ "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", + "sc-transaction-pool-api", "scale-info", "sp-api", "sp-application-crypto", @@ -9810,7 +9937,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "jsonrpsee", @@ -9832,9 +9959,10 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "async-channel", "async-trait", "fnv", "futures", @@ -9843,9 +9971,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-consensus", - "sc-keystore", "sc-network", - "sc-network-common", "sc-network-gossip", "sc-network-sync", "sc-utils", @@ -9867,7 +9993,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "jsonrpsee", @@ -9886,7 +10012,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9899,10 +10025,10 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", - "array-bytes 4.2.0", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", @@ -9921,6 +10047,7 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -9939,7 +10066,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "finality-grandpa", "futures", @@ -9959,7 +10086,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -9982,14 +10109,13 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", - "sc-executor-wasmi", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", "sp-externalities", @@ -10000,45 +10126,29 @@ dependencies = [ "sp-version", "sp-wasm-interface", "tracing", - "wasmi 0.13.2", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", "sp-wasm-interface", "thiserror", "wasm-instrument 0.3.0", - "wasmi 0.13.2", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" -dependencies = [ - "log", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi 0.13.2", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "anyhow", "cfg-if", "libc", "log", - "once_cell", "rustix 0.36.15", "sc-allocator", "sc-executor-common", @@ -10050,7 +10160,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "futures", @@ -10066,10 +10176,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", - "async-trait", + "array-bytes", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -10081,9 +10190,9 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-channel", "async-trait", "asynchronous-codec", @@ -10096,47 +10205,43 @@ dependencies = [ "libp2p", "linked_hash_set", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "parking_lot 0.12.1", + "partial_sort", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-client-api", - "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", - "snow", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "async-channel", "cid", "futures", - "libp2p", + "libp2p-identity", "log", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", @@ -10146,45 +10251,33 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", "async-trait", "bitflags 1.3.2", - "bytes", "futures", - "futures-timer", - "libp2p", + "libp2p-identity", "parity-scale-codec", "prost-build", "sc-consensus", - "sc-peerset", - "sc-utils", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", "futures", "futures-timer", "libp2p", "log", - "lru 0.8.1", "sc-network", "sc-network-common", - "sc-peerset", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -10193,19 +10286,18 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "async-channel", "futures", - "libp2p", + "libp2p-identity", "log", "parity-scale-codec", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", @@ -10215,16 +10307,16 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "async-channel", "async-trait", "fork-tree", "futures", "futures-timer", "libp2p", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "prost", @@ -10233,8 +10325,8 @@ dependencies = [ "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -10249,17 +10341,15 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "futures", "libp2p", "log", "parity-scale-codec", - "pin-project", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-consensus", "sp-runtime", @@ -10269,16 +10359,17 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "bytes", "fnv", "futures", "futures-timer", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", @@ -10287,33 +10378,22 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" -dependencies = [ - "futures", - "libp2p", - "log", - "sc-utils", - "serde_json", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10322,7 +10402,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "jsonrpsee", @@ -10345,6 +10425,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", + "sp-statement-store", "sp-version", "tokio", ] @@ -10352,7 +10433,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10371,7 +10452,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "http", "jsonrpsee", @@ -10386,9 +10467,9 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "futures", "futures-util", "hex", @@ -10412,7 +10493,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "directories", @@ -10439,11 +10520,9 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-network-transactions", - "sc-offchain", "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -10478,7 +10557,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "parity-scale-codec", @@ -10489,14 +10568,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "clap", "fs4", - "futures", "log", "sc-client-db", - "sc-utils", "sp-core", "thiserror", "tokio", @@ -10505,7 +10582,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10524,7 +10601,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "libc", @@ -10543,7 +10620,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "chrono", "futures", @@ -10562,7 +10639,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "atty", @@ -10570,12 +10647,10 @@ dependencies = [ "lazy_static", "libc", "log", - "once_cell", "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -10593,25 +10668,24 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "futures-timer", "linked-hash-map", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -10631,13 +10705,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "log", + "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -10645,7 +10721,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-channel", "futures", @@ -10893,14 +10969,14 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "serde_json" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -11066,8 +11142,8 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "enumn", "parity-scale-codec", @@ -11154,7 +11230,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db", "log", @@ -11162,6 +11238,7 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -11174,21 +11251,21 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "blake2", - "expander 1.0.0", + "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "23.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11200,8 +11277,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "16.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "integer-sqrt", "num-traits", @@ -11215,7 +11292,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11228,9 +11305,8 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", @@ -11240,13 +11316,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "log", - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -11258,7 +11334,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -11273,14 +11349,13 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", @@ -11291,7 +11366,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "parity-scale-codec", @@ -11299,11 +11374,9 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keystore", "sp-runtime", "sp-std", "sp-timestamp", @@ -11312,7 +11385,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11331,7 +11404,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "finality-grandpa", "log", @@ -11349,7 +11422,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11360,10 +11433,10 @@ dependencies = [ [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "21.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "bitflags 1.3.2", "blake2", "bounded-collections", @@ -11399,38 +11472,37 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", + "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "9.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.7", "sha3", - "sp-std", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "9.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11438,18 +11510,18 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "0.19.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "environmental", "parity-scale-codec", @@ -11460,13 +11532,12 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", "sp-runtime", "sp-std", "thiserror", @@ -11474,13 +11545,12 @@ dependencies = [ [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "23.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bytes", "ed25519 1.5.3", "ed25519-dalek 1.0.1", - "futures", "libsecp256k1", "log", "parity-scale-codec", @@ -11500,8 +11570,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "24.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "lazy_static", "sp-core", @@ -11511,13 +11581,11 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "0.27.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "futures", "parity-scale-codec", "parking_lot 0.12.1", - "serde", "sp-core", "sp-externalities", "thiserror", @@ -11526,7 +11594,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "thiserror", "zstd 0.12.4", @@ -11535,7 +11603,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -11546,7 +11614,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11564,7 +11632,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11578,7 +11646,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sp-api", "sp-core", @@ -11587,8 +11655,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "backtrace", "lazy_static", @@ -11598,7 +11666,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "rustc-hash", "serde", @@ -11607,8 +11675,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "24.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "either", "hash256-std-hasher", @@ -11629,8 +11697,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "17.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11647,25 +11715,26 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "11.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", "sp-std", @@ -11674,8 +11743,9 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -11686,8 +11756,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "0.28.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db", "log", @@ -11702,17 +11772,35 @@ dependencies = [ "sp-trie", "thiserror", "tracing", + "trie-db", +] + +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "thiserror", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "13.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11725,11 +11813,9 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "futures-timer", - "log", "parity-scale-codec", "sp-inherents", "sp-runtime", @@ -11739,8 +11825,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "10.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sp-std", @@ -11752,7 +11838,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sp-api", "sp-runtime", @@ -11761,10 +11847,9 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "log", "parity-scale-codec", "scale-info", "sp-core", @@ -11776,8 +11861,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "22.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", "hash-db", @@ -11799,8 +11884,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "22.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11816,33 +11901,32 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "14.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", "sp-std", - "wasmi 0.13.2", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "20.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -12015,15 +12099,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12042,7 +12123,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hyper", "log", @@ -12054,7 +12135,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "jsonrpsee", @@ -12067,14 +12148,12 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", - "log", "parity-scale-codec", "sc-client-api", "sc-rpc-api", - "scale-info", "serde", "sp-core", "sp-runtime", @@ -12086,12 +12165,13 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", "strum", "tempfile", @@ -12137,9 +12217,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.32" +version = "2.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "9caece70c63bfba29ec2fed841a09851b14a235c60010fa4de58089b6c025668" dependencies = [ "proc-macro2", "quote", @@ -12236,7 +12316,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -12345,6 +12425,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -12397,18 +12486,18 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] -name = "tokio-rustls" -version = "0.23.4" +name = "tokio-retry" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ - "rustls 0.20.9", + "pin-project", + "rand 0.8.5", "tokio", - "webpki 0.22.1", ] [[package]] @@ -12504,11 +12593,11 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "bytes", "futures-core", "futures-util", @@ -12553,7 +12642,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -12578,8 +12667,8 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12589,14 +12678,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -12720,7 +12809,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "clap", @@ -12730,7 +12819,6 @@ dependencies = [ "parity-scale-codec", "sc-cli", "sc-executor", - "sc-service", "serde", "serde_json", "sp-api", @@ -12822,9 +12910,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -13002,7 +13090,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", "wasm-bindgen-shared", ] @@ -13036,7 +13124,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -13067,9 +13155,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" +checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" dependencies = [ "anyhow", "libc", @@ -13083,9 +13171,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" +checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" dependencies = [ "anyhow", "cxx", @@ -13095,15 +13183,14 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" +checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" dependencies = [ "anyhow", "cc", "cxx", "cxx-build", - "regex", ] [[package]] @@ -13123,56 +13210,24 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" -dependencies = [ - "parity-wasm", - "wasmi-validation", - "wasmi_core 0.2.1", -] - -[[package]] -name = "wasmi" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e61a7006b0fdf24f6bbe8dcfdad5ca1b350de80061fb2827f31c82fbbb9565a" +checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4" dependencies = [ + "intx", + "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core 0.12.0", + "wasmi_core", "wasmparser-nostd", ] -[[package]] -name = "wasmi-validation" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] - [[package]] name = "wasmi_arena" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" -[[package]] -name = "wasmi_core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" -dependencies = [ - "downcast-rs", - "libm", - "memory_units", - "num-rational", - "num-traits", - "region", -] - [[package]] name = "wasmi_core" version = "0.12.0" @@ -13187,9 +13242,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.100.0" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ "indexmap 1.9.3", "url", @@ -13206,9 +13261,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", @@ -13216,7 +13271,7 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", - "object 0.29.0", + "object 0.30.4", "once_cell", "paste", "psm", @@ -13229,26 +13284,26 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.4", "bincode", "directories-next", "file-per-thread-logger", @@ -13257,15 +13312,15 @@ dependencies = [ "serde", "sha2 0.10.7", "toml 0.5.11", - "windows-sys 0.42.0", + "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -13273,27 +13328,43 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "target-lexicon", "thiserror", "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli 0.27.3", + "object 0.30.4", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", + "gimli 0.27.3", "indexmap 1.9.3", "log", - "object 0.29.0", + "object 0.30.4", "serde", "target-lexicon", "thiserror", @@ -13303,18 +13374,18 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line 0.17.0", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "rustc-demangle", "serde", "target-lexicon", @@ -13322,36 +13393,36 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object 0.30.4", "once_cell", "rustix 0.36.15", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ "cfg-if", "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-runtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", @@ -13361,21 +13432,21 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset 0.8.0", "paste", "rand 0.8.5", "rustix 0.36.15", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-types" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ "cranelift-entity", "serde", @@ -13428,7 +13499,7 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki 0.100.2", + "rustls-webpki 0.100.3", ] [[package]] @@ -13647,8 +13718,8 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "frame-benchmarking", @@ -13677,6 +13748,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13739,8 +13811,8 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "polkadot-primitives", @@ -13832,21 +13904,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -14099,8 +14156,8 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bounded-collections", "derivative", @@ -14115,8 +14172,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "frame-system", @@ -14130,14 +14187,15 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] [[package]] name = "xcm-executor" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "environmental", "frame-benchmarking", @@ -14156,13 +14214,13 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] @@ -14205,7 +14263,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.33", ] [[package]] diff --git a/node/Cargo.toml b/node/Cargo.toml index da02479aa2d..84f7fe49bce 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -9,7 +9,7 @@ version = "2.3.1" targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [[bin]] name = "nodle-parachain" @@ -36,67 +36,67 @@ runtime-eden = { path = "../runtimes/eden" } primitives = { version = "2.0.17", path = "../primitives" } # Substrate Dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } ## Substrate Client Dependencies -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } ## Substrate Primitive Dependencies -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } # Cumulus dependencies -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } +cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } # Polkadot dependencies -polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" } +polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } [dev-dependencies] hex-literal = "0.3.4" diff --git a/pallets/allocations/Cargo.toml b/pallets/allocations/Cargo.toml index 5d97ce91c6b..8592b124733 100644 --- a/pallets/allocations/Cargo.toml +++ b/pallets/allocations/Cargo.toml @@ -30,18 +30,18 @@ log = { version = "0.4.17", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.152", optional = true, features = ["derive"] } scale-info = { version = "2.0.1", default-features = false, features = [ "derive",] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } support = { path = "../../support", default-features = false } [dev-dependencies] -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } lazy_static = {version = "1.4.0", default-features = false, features = ["spin_no_std"] } diff --git a/pallets/allocations/src/lib.rs b/pallets/allocations/src/lib.rs index 1d1b34adc45..c2a422b2bb5 100644 --- a/pallets/allocations/src/lib.rs +++ b/pallets/allocations/src/lib.rs @@ -33,6 +33,7 @@ use frame_support::{ }; use frame_system::ensure_signed; +use frame_system::pallet_prelude::BlockNumberFor; use scale_info::TypeInfo; use sp_arithmetic::traits::UniqueSaturatedInto; use sp_runtime::{ @@ -62,16 +63,16 @@ enum Releases { #[derive(Default, TypeInfo)] pub struct MintCurve { - session_period: T::BlockNumber, - fiscal_period: T::BlockNumber, + session_period: BlockNumberFor, + fiscal_period: BlockNumberFor, inflation_steps: Vec, maximum_supply: BalanceOf, } impl MintCurve { pub fn new( - session_period: T::BlockNumber, - fiscal_period: T::BlockNumber, + session_period: BlockNumberFor, + fiscal_period: BlockNumberFor, inflation_steps: &[Perbill], maximum_supply: BalanceOf, ) -> Self { @@ -87,8 +88,8 @@ impl MintCurve { pub fn calc_session_quota( &self, - n: T::BlockNumber, - curve_start: T::BlockNumber, + n: BlockNumberFor, + curve_start: BlockNumberFor, current_supply: BalanceOf, ) -> BalanceOf { let step: usize = n @@ -106,21 +107,21 @@ impl MintCurve { Perbill::from_rational(self.session_period, self.fiscal_period) * target_increase } - pub fn next_quota_renew_schedule(&self, n: T::BlockNumber, curve_start: T::BlockNumber) -> T::BlockNumber { + pub fn next_quota_renew_schedule(&self, n: BlockNumberFor, curve_start: BlockNumberFor) -> BlockNumberFor { Self::next_schedule(n, curve_start, self.session_period) } - pub fn next_quota_calc_schedule(&self, n: T::BlockNumber, curve_start: T::BlockNumber) -> T::BlockNumber { + pub fn next_quota_calc_schedule(&self, n: BlockNumberFor, curve_start: BlockNumberFor) -> BlockNumberFor { Self::next_schedule(n, curve_start, self.fiscal_period) } #[inline(always)] - pub fn session_period(&self) -> T::BlockNumber { + pub fn session_period(&self) -> BlockNumberFor { self.session_period } #[inline(always)] - pub fn fiscal_period(&self) -> T::BlockNumber { + pub fn fiscal_period(&self) -> BlockNumberFor { self.fiscal_period } @@ -130,7 +131,7 @@ impl MintCurve { } /// Helper function to calculate the very next schedule based on the current block number. - fn next_schedule(n: T::BlockNumber, curve_start: T::BlockNumber, period: T::BlockNumber) -> T::BlockNumber { + fn next_schedule(n: BlockNumberFor, curve_start: BlockNumberFor, period: BlockNumberFor) -> BlockNumberFor { if n >= curve_start { n.saturating_sub(curve_start) .checked_div(&period) @@ -191,7 +192,7 @@ pub mod pallet { /// Provide access to the block number that should be used in mint curve calculations. For /// example those who use this pallet for a parachain may decide to use the block creation /// pace of the relay chain for timing. - type BlockNumberProvider: BlockNumberProvider; + type BlockNumberProvider: BlockNumberProvider>; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; @@ -225,7 +226,7 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::set_curve_starting_block())] pub fn set_curve_starting_block( origin: OriginFor, - curve_start: T::BlockNumber, + curve_start: BlockNumberFor, ) -> DispatchResultWithPostInfo { ensure_root(origin)?; >::put(curve_start); @@ -284,17 +285,17 @@ pub mod pallet { /// The block in or after which the the session quota should be renewed #[pallet::storage] #[pallet::getter(fn quota_renew_schedule)] - pub(crate) type SessionQuotaRenewSchedule = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(crate) type SessionQuotaRenewSchedule = StorageValue<_, BlockNumberFor, ValueQuery>; /// The block in or after which the the session quota should be calculated #[pallet::storage] #[pallet::getter(fn quota_calc_schedule)] - pub(crate) type SessionQuotaCalculationSchedule = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(crate) type SessionQuotaCalculationSchedule = StorageValue<_, BlockNumberFor, ValueQuery>; /// The block from which the mint curve should be considered starting its first inflation step #[pallet::storage] #[pallet::getter(fn mint_curve_starting_block)] - pub(crate) type MintCurveStartingBlock = StorageValue<_, T::BlockNumber, OptionQuery>; + pub(crate) type MintCurveStartingBlock = StorageValue<_, BlockNumberFor, OptionQuery>; } impl Pallet { @@ -383,7 +384,7 @@ impl Pallet { /// Update both the quota renewal and re-calculation schedules based on the given starting block /// for the curve. - fn update_session_quota_schedules(curve_start: T::BlockNumber) { + fn update_session_quota_schedules(curve_start: BlockNumberFor) { let n = T::BlockNumberProvider::current_block_number(); Self::update_session_quota_calculation_schedule(n, curve_start); Self::update_session_quota_renew_schedule(n, curve_start); @@ -392,7 +393,7 @@ impl Pallet { /// Calculate the session quota and update the corresponding storage only once during a fiscal /// period. /// Return the weight of the call. - fn checked_calc_session_quota(n: T::BlockNumber) -> Weight { + fn checked_calc_session_quota(n: BlockNumberFor) -> Weight { if n >= >::get() { let curve_start = Self::curve_start_or(n); Self::update_session_quota_calculation_schedule(n, curve_start); @@ -409,7 +410,7 @@ impl Pallet { /// Renew the session quota and update the corresponding storage only once during a session /// period. /// Return the weight of the call. - fn checked_renew_session_quota(n: T::BlockNumber) -> Weight { + fn checked_renew_session_quota(n: BlockNumberFor) -> Weight { if n >= >::get() { let curve_start = Self::curve_start_or(n); Self::update_session_quota_renew_schedule(n, curve_start); @@ -423,20 +424,20 @@ impl Pallet { } /// Update the schedule for calculating the session quota. - fn update_session_quota_calculation_schedule(n: T::BlockNumber, curve_start: T::BlockNumber) { + fn update_session_quota_calculation_schedule(n: BlockNumberFor, curve_start: BlockNumberFor) { let next_schedule = T::MintCurve::get().next_quota_calc_schedule(n, curve_start); >::put(next_schedule); } /// Update the schedule for renewing (refilling the bucket) for the session quota. - fn update_session_quota_renew_schedule(n: T::BlockNumber, curve_start: T::BlockNumber) { + fn update_session_quota_renew_schedule(n: BlockNumberFor, curve_start: BlockNumberFor) { let next_schedule = T::MintCurve::get().next_quota_renew_schedule(n, curve_start); >::put(next_schedule); } /// Return the mint curve starting block number or if it's not set before return `n` itself /// while setting the mint curve starting block to n. - fn curve_start_or(n: T::BlockNumber) -> T::BlockNumber { + fn curve_start_or(n: BlockNumberFor) -> BlockNumberFor { >::get().unwrap_or_else(|| { >::put(n); n diff --git a/pallets/grants/Cargo.toml b/pallets/grants/Cargo.toml index bd810b297ee..93bc04fdacf 100644 --- a/pallets/grants/Cargo.toml +++ b/pallets/grants/Cargo.toml @@ -34,15 +34,15 @@ log = { version = "0.4.17", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.152", optional = true } scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch ="polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch ="polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallets/grants/src/lib.rs b/pallets/grants/src/lib.rs index fbd4fd9532a..b6996f5966d 100644 --- a/pallets/grants/src/lib.rs +++ b/pallets/grants/src/lib.rs @@ -61,11 +61,11 @@ enum Releases { } pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; -pub type VestingScheduleOf = VestingSchedule<::BlockNumber, BalanceOf>; +pub type VestingScheduleOf = VestingSchedule>, BalanceOf>; pub type ListVestingScheduleOf = Vec>; pub type ScheduledGrant = ( - ::BlockNumber, - ::BlockNumber, + BlockNumberFor<>, + BlockNumberFor<>, u32, BalanceOf, ); @@ -121,7 +121,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; - type Currency: LockableCurrency; + type Currency: LockableCurrency>; type CancelOrigin: EnsureOrigin; /// The maximum number of vesting schedule. #[pallet::constant] @@ -129,7 +129,7 @@ pub mod pallet { /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; // The block number provider - type BlockNumberProvider: BlockNumberProvider; + type BlockNumberProvider: BlockNumberProvider>; } #[pallet::pallet] diff --git a/pallets/mandate/Cargo.toml b/pallets/mandate/Cargo.toml index 704115eda18..522989d51c9 100644 --- a/pallets/mandate/Cargo.toml +++ b/pallets/mandate/Cargo.toml @@ -24,9 +24,9 @@ serde = { version = "1.0.152", optional = true, features = ["derive"] } scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallets/reserve/Cargo.toml b/pallets/reserve/Cargo.toml index be107819406..cfc6aef2de5 100644 --- a/pallets/reserve/Cargo.toml +++ b/pallets/reserve/Cargo.toml @@ -29,14 +29,14 @@ try-runtime = ["frame-support/try-runtime"] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.152", optional = true, features = ["derive"] } scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } support = { path = "../../support", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallets/sponsorship/Cargo.toml b/pallets/sponsorship/Cargo.toml index e2408f3a868..707241a6301 100644 --- a/pallets/sponsorship/Cargo.toml +++ b/pallets/sponsorship/Cargo.toml @@ -15,19 +15,19 @@ codec = { package = "parity-scale-codec", version = "3.2.2", default-features = "derive", ] } scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } support = { path = "../../support", default-features = false } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index a5b04918c1c..9acd1e045ed 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -36,15 +36,15 @@ serde = { version = "1.0.152", optional = true, features = ["derive"] } scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } support = { path = "../../support", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index da3d11289ef..58957c1bcba 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -27,13 +27,13 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.0.1", default-features = false, features = [ "derive" ] } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } diff --git a/runtimes/eden/Cargo.toml b/runtimes/eden/Cargo.toml index 3e327701460..3131ac1bc89 100644 --- a/runtimes/eden/Cargo.toml +++ b/runtimes/eden/Cargo.toml @@ -156,77 +156,77 @@ serde = { version = "1.0.152", optional = true, features = ["derive"] } smallvec = "1.9.0" lazy_static = {version = "1.4.0", default-features = false, features = ["spin_no_std"] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.42" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.42" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42", default-features = false } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } -pallet-contracts = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +pallet-contracts = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.42" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42", optional = true } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v1.0.0" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0", optional = true } primitives = { default-features = false, path = "../../primitives" } pallet-allocations = { default-features = false, path = "../../pallets/allocations" } pallet-reserve = { default-features = false, path = "../../pallets/reserve" } pallet-grants = { default-features = false, path = "../../pallets/grants" } pallet-mandate = { default-features = false, path = "../../pallets/mandate" } pallet-sponsorship = { default-features = false, path = "../../pallets/sponsorship" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.42", default-features = false } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.42", default-features = false } +orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.0.0", default-features = false } +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.0.0", default-features = false } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 8dd4f0f03e8..90d2e2523f8 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -128,10 +128,9 @@ construct_runtime! { } /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; -/// Block type as expected by this runtime. + pub type Block = generic::Block; + /// A Block signed with a Justification pub type SignedBlock = generic::SignedBlock; /// BlockId type as expected by this runtime. diff --git a/support/Cargo.toml b/support/Cargo.toml index 6013595167a..332f0e0f669 100644 --- a/support/Cargo.toml +++ b/support/Cargo.toml @@ -9,7 +9,7 @@ codec = { package = "parity-scale-codec", version = "3.2.2", default-features = "derive", ] } scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } [features] default = ["std"] From 4413826b3ab91083a0d2b7c4cec5d201d6d21cff Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 19 Sep 2023 13:07:50 +0900 Subject: [PATCH 02/68] Patched orml --- Cargo.lock | 138 +++++++++++++++++++-------------------- runtimes/eden/Cargo.toml | 4 +- 2 files changed, 71 insertions(+), 71 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1581db6480c..6dc3bc60dd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0b45430fa9661f457981503dd5bf0" dependencies = [ "memchr", ] @@ -423,7 +423,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -434,7 +434,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -569,7 +569,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -899,9 +899,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.30" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", @@ -974,9 +974,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.3" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" dependencies = [ "clap_builder", "clap_derive", @@ -984,9 +984,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ "anstream", "anstyle", @@ -1003,7 +1003,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -1702,7 +1702,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -2001,7 +2001,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -2028,7 +2028,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -2045,7 +2045,7 @@ checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -2315,7 +2315,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -2339,7 +2339,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.33", + "syn 2.0.37", "termcolor", "walkdir", ] @@ -2556,7 +2556,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -2567,7 +2567,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -2665,7 +2665,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -2941,7 +2941,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -3060,7 +3060,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -3072,7 +3072,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -3082,7 +3082,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -3244,7 +3244,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -4988,7 +4988,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -5002,7 +5002,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -5013,7 +5013,7 @@ checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -5024,7 +5024,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -5081,11 +5081,11 @@ checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.23", + "rustix 0.38.13", ] [[package]] @@ -5718,7 +5718,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.0.0#6819d3f28f9005c0a375e359c942490e04e20000" +source = "git+https://github.com/NodleCode/open-runtime-module-library.git?branch=iso/polkadot-v1.0.0#439553b1b7b1ed2da9d93b88ea4e24f05509d9f0" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -5737,7 +5737,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.0.0#6819d3f28f9005c0a375e359c942490e04e20000" +source = "git+https://github.com/NodleCode/open-runtime-module-library.git?branch=iso/polkadot-v1.0.0#439553b1b7b1ed2da9d93b88ea4e24f05509d9f0" dependencies = [ "frame-support", "parity-scale-codec", @@ -5752,7 +5752,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.0.0#6819d3f28f9005c0a375e359c942490e04e20000" +source = "git+https://github.com/NodleCode/open-runtime-module-library.git?branch=iso/polkadot-v1.0.0#439553b1b7b1ed2da9d93b88ea4e24f05509d9f0" dependencies = [ "frame-support", "orml-traits", @@ -5766,7 +5766,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.0.0#6819d3f28f9005c0a375e359c942490e04e20000" +source = "git+https://github.com/NodleCode/open-runtime-module-library.git?branch=iso/polkadot-v1.0.0#439553b1b7b1ed2da9d93b88ea4e24f05509d9f0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -6099,7 +6099,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -6753,7 +6753,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -7223,7 +7223,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -7264,7 +7264,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -8594,7 +8594,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -8693,7 +8693,7 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -8739,7 +8739,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -9041,9 +9041,9 @@ dependencies = [ [[package]] name = "reed-solomon-novelpoly" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0b8e056bbbda75b717e53c87f349936ef234bb84a8f665360ca4b3552a79e9" +checksum = "58130877ca403ab42c864fbac74bb319a0746c07a634a92a5cfc7f54af272582" dependencies = [ "derive_more", "fs-err", @@ -9069,7 +9069,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -9750,7 +9750,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -10673,7 +10673,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -10969,7 +10969,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -11259,7 +11259,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -11496,7 +11496,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -11515,7 +11515,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -11722,7 +11722,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -11907,7 +11907,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -12217,9 +12217,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.33" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9caece70c63bfba29ec2fed841a09851b14a235c60010fa4de58089b6c025668" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -12286,9 +12286,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -12316,7 +12316,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -12486,7 +12486,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -12642,7 +12642,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -12685,7 +12685,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -12880,9 +12880,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -13090,7 +13090,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -13124,7 +13124,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -14220,7 +14220,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] @@ -14263,7 +14263,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.37", ] [[package]] diff --git a/runtimes/eden/Cargo.toml b/runtimes/eden/Cargo.toml index 3131ac1bc89..9665a6e0410 100644 --- a/runtimes/eden/Cargo.toml +++ b/runtimes/eden/Cargo.toml @@ -226,7 +226,7 @@ pallet-reserve = { default-features = false, path = "../../pallets/reserve" } pallet-grants = { default-features = false, path = "../../pallets/grants" } pallet-mandate = { default-features = false, path = "../../pallets/mandate" } pallet-sponsorship = { default-features = false, path = "../../pallets/sponsorship" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.0.0", default-features = false } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.0.0", default-features = false } +orml-xtokens = { git = "https://github.com/NodleCode/open-runtime-module-library.git", branch = "iso/polkadot-v1.0.0", default-features = false } +orml-traits = { git = "https://github.com/NodleCode/open-runtime-module-library.git", branch = "iso/polkadot-v1.0.0", default-features = false } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } From 2e3d2999ccdc4f8c02c75e64d8bde1f6ea5d4cc2 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 20 Sep 2023 13:40:37 +0900 Subject: [PATCH 03/68] Refactor BlockNumber to BlockNumberFor --- pallets/grants/src/lib.rs | 7 ++++--- pallets/reserve/src/lib.rs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pallets/grants/src/lib.rs b/pallets/grants/src/lib.rs index b6996f5966d..27878e6216c 100644 --- a/pallets/grants/src/lib.rs +++ b/pallets/grants/src/lib.rs @@ -42,6 +42,7 @@ use sp_std::{ vec::Vec, }; +use frame_system::pallet_prelude::BlockNumberFor; #[cfg(feature = "std")] use frame_support::traits::GenesisBuild; @@ -61,11 +62,11 @@ enum Releases { } pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; -pub type VestingScheduleOf = VestingSchedule>, BalanceOf>; +pub type VestingScheduleOf = VestingSchedule, BalanceOf>; pub type ListVestingScheduleOf = Vec>; pub type ScheduledGrant = ( - BlockNumberFor<>, - BlockNumberFor<>, + BlockNumberFor, + BlockNumberFor, u32, BalanceOf, ); diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index a806267e219..019f14938e9 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -51,6 +51,7 @@ pub mod pallet { use super::*; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; + use frame_support::traits::GenesisBuild; #[pallet::config] pub trait Config: frame_system::Config { From 97e6c9d345d7180bee17df1e12e5c48ecf56c496 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 20 Sep 2023 14:10:05 +0900 Subject: [PATCH 04/68] GenesisBuild DefaultNoBound --- pallets/grants/src/lib.rs | 15 +++------------ pallets/reserve/src/lib.rs | 15 +++------------ runtimes/eden/src/constants.rs | 2 +- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/pallets/grants/src/lib.rs b/pallets/grants/src/lib.rs index 27878e6216c..ae37a0c8766 100644 --- a/pallets/grants/src/lib.rs +++ b/pallets/grants/src/lib.rs @@ -28,9 +28,10 @@ mod tests; use codec::{Decode, Encode}; use frame_support::{ + DefaultNoBound, ensure, pallet_prelude::{MaxEncodedLen, TypeInfo}, - traits::{Currency, ExistenceRequirement, LockIdentifier, LockableCurrency, WithdrawReasons}, + traits::{Currency, ExistenceRequirement, GenesisBuild, LockIdentifier, LockableCurrency, WithdrawReasons}, BoundedVec, }; use sp_runtime::{ @@ -43,8 +44,6 @@ use sp_std::{ }; use frame_system::pallet_prelude::BlockNumberFor; -#[cfg(feature = "std")] -use frame_support::traits::GenesisBuild; pub mod weights; pub use weights::WeightInfo; @@ -266,19 +265,11 @@ pub mod pallet { pub(crate) type StorageVersion = StorageValue<_, Releases, ValueQuery>; #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig { pub vesting: Vec>, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - vesting: Default::default(), - } - } - } - #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index 019f14938e9..411f16148b7 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -27,15 +27,13 @@ mod tests; use frame_support::{ dispatch::GetDispatchInfo, - traits::{Currency, ExistenceRequirement, Get, Imbalance, OnUnbalanced}, + traits::{Currency, ExistenceRequirement,GenesisBuild, Get, Imbalance, OnUnbalanced}, PalletId, }; use sp_runtime::traits::{AccountIdConversion, Dispatchable}; use sp_std::prelude::Box; use support::WithAccountId; -#[cfg(feature = "std")] -use frame_support::traits::GenesisBuild; pub mod weights; pub use weights::WeightInfo; @@ -50,6 +48,7 @@ type NegativeImbalanceOf = pub mod pallet { use super::*; use frame_support::pallet_prelude::*; + use frame_support::DefaultNoBound; use frame_system::pallet_prelude::*; use frame_support::traits::GenesisBuild; @@ -133,19 +132,11 @@ pub mod pallet { } #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig, I: 'static = ()> { pub phantom: sp_std::marker::PhantomData<(T, I)>, } - #[cfg(feature = "std")] - impl, I: 'static> Default for GenesisConfig { - fn default() -> Self { - Self { - phantom: Default::default(), - } - } - } - #[pallet::genesis_build] impl, I: 'static> GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/runtimes/eden/src/constants.rs b/runtimes/eden/src/constants.rs index ec478f5cfa7..8c50f46ed23 100644 --- a/runtimes/eden/src/constants.rs +++ b/runtimes/eden/src/constants.rs @@ -73,7 +73,7 @@ pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for .5 seconds of compute with a 16 second average block time. pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), - polkadot_primitives::v4::MAX_POV_SIZE as u64, + polkadot_primitives::v5::MAX_POV_SIZE as u64, ); const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct()); From 09fd602632c70545f450bb555ce3745209df9357 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 20 Sep 2023 14:15:19 +0900 Subject: [PATCH 05/68] Temporary remove uniques pallet Save compile errors to later. --- Cargo.lock | 19 - pallets/uniques/Cargo.toml | 50 -- pallets/uniques/src/benchmarking.rs | 191 ----- pallets/uniques/src/lib.rs | 867 --------------------- pallets/uniques/src/tests.rs | 1086 --------------------------- pallets/uniques/src/weights.rs | 401 ---------- 6 files changed, 2614 deletions(-) delete mode 100644 pallets/uniques/Cargo.toml delete mode 100644 pallets/uniques/src/benchmarking.rs delete mode 100644 pallets/uniques/src/lib.rs delete mode 100644 pallets/uniques/src/tests.rs delete mode 100644 pallets/uniques/src/weights.rs diff --git a/Cargo.lock b/Cargo.lock index 6dc3bc60dd3..62dd81987a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6420,25 +6420,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-nodle-uniques" -version = "2.3.1" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-balances", - "pallet-uniques", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "support", -] - [[package]] name = "pallet-nomination-pools" version = "1.0.0" diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml deleted file mode 100644 index 9acd1e045ed..00000000000 --- a/pallets/uniques/Cargo.toml +++ /dev/null @@ -1,50 +0,0 @@ -[package] -name = "pallet-nodle-uniques" -version = "2.3.1" -authors = ["Nodle "] -edition = "2021" - -[features] -default = ["std"] -std = [ - "codec/std", - "serde", - "scale-info/std", - "frame-support/std", - "frame-benchmarking/std", - "frame-system/std", - "sp-io/std", - "sp-runtime/std", - "sp-std/std", - "pallet-uniques/std", - "pallet-balances/std", -] -try-runtime = [ - "frame-support/try-runtime", - "pallet-uniques/try-runtime" -] -runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "pallet-uniques/runtime-benchmarks", -] - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.152", optional = true, features = ["derive"] } -scale-info = { version = "2.0.1", default-features = false, features = [ - "derive", -] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -support = { path = "../../support", default-features = false } - -[dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs deleted file mode 100644 index d2726a4c01b..00000000000 --- a/pallets/uniques/src/benchmarking.rs +++ /dev/null @@ -1,191 +0,0 @@ -/* - * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain - * Copyright (C) 2020-2022 Nodle International - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -//! Nodle uniques pallet benchmarking. - -#![cfg(feature = "runtime-benchmarks")] - -use super::*; -use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; -use frame_support::{assert_ok, traits::Get, BoundedVec}; -use frame_system::RawOrigin as SystemOrigin; -use pallet_uniques::{BenchmarkHelper, DestroyWitness}; -use sp_runtime::traits::Bounded; -use sp_std::prelude::*; - -use crate::Pallet as Uniques; -const SEED: u32 = 0; - -fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { - let collection_owner: T::AccountId = account("collection_owner", 0, SEED); - let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); - let collection_id = >::Helper::collection(0); - (collection_id, collection_owner, collection_owner_lookup) -} - -fn create_collection, I: 'static>( - extra_deposit_limit: BalanceOf, -) -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { - let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); - assert_ok!(Uniques::::create_with_extra_deposit_limit( - SystemOrigin::Signed(collection_owner.clone()).into(), - collection_id, - collection_owner_lookup.clone(), - extra_deposit_limit - )); - (collection_id, collection_owner, collection_owner_lookup) -} -fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { - let (.., collection_owner, collection_owner_lookup) = get_config::(); - - let caller = collection_owner; - let caller_lookup = collection_owner_lookup; - assert!(Uniques::::set_collection_metadata( - SystemOrigin::Signed(caller.clone()).into(), - >::Helper::collection(0), - vec![0; T::StringLimit::get() as usize].try_into().unwrap(), - false, - ) - .is_ok()); - (caller, caller_lookup) -} -fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { - let (.., collection_owner, collection_owner_lookup) = get_config::(); - - let caller = collection_owner; - let caller_lookup = collection_owner_lookup; - assert!(Uniques::::set_metadata( - SystemOrigin::Signed(caller.clone()).into(), - >::Helper::collection(0), - item, - vec![0; T::StringLimit::get() as usize].try_into().unwrap(), - false, - ) - .is_ok()); - (caller, caller_lookup) -} -fn add_item_attribute, I: 'static>( - item: T::ItemId, -) -> (BoundedVec, T::AccountId, AccountIdLookupOf) { - let (.., collection_owner, collection_owner_lookup) = get_config::(); - - let key: BoundedVec<_, _> = vec![0; T::KeyLimit::get() as usize].try_into().unwrap(); - assert!(Uniques::::set_attribute( - SystemOrigin::Signed(collection_owner.clone()).into(), - >::Helper::collection(0), - Some(item), - key.clone(), - vec![0; T::ValueLimit::get() as usize].try_into().unwrap(), - ) - .is_ok()); - (key, collection_owner, collection_owner_lookup) -} -fn mint_item_with_extra_deposit, I: 'static>( - index: u16, - deposit: BalanceOf, -) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { - let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - let item = T::Helper::item(index); - assert!(Uniques::::mint_with_extra_deposit( - SystemOrigin::Signed(collection_owner.clone()).into(), - collection_id, - item, - collection_owner_lookup.clone(), - deposit, - ) - .is_ok()); - (item, collection_owner, collection_owner_lookup) -} - -fn assert_last_event, I: 'static>(system_event: ::RuntimeEvent) { - let events = frame_system::Pallet::::events(); - // compare to the last event record - let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; - assert_eq!(event, &system_event); -} - -benchmarks_instance_pallet! { - destroy { - let n in 0 .. 1_000; - let m in 0 .. 1_000; - let a in 0 .. 1_000; - - let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); - - add_collection_metadata::(); - - for i in 0..n { - mint_item_with_extra_deposit::(i as u16, T::Currency::minimum_balance()); - } - for i in 0..m { - add_item_metadata::(T::Helper::item(i as u16)); - } - for i in 0..a { - add_item_attribute::(T::Helper::item(i as u16)); - } - let witness = DestroyWitness{ - items: n, - item_metadatas: m, - attributes: a, - }; - }: _(SystemOrigin::Signed(collection_owner), collection_id, witness) - - mint_with_extra_deposit { - let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); - let item = T::Helper::item(0); - let deposit = 5u32.into(); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, collection_owner_lookup, deposit) - - burn { - let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); - let (item, ..) = mint_item_with_extra_deposit::(0, T::Currency::minimum_balance()); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, Some(collection_owner_lookup)) - - create_with_extra_deposit_limit { - let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, collection_owner_lookup, BalanceOf::::max_value()) - verify { - let event: >::RuntimeEvent = pallet_uniques::Event::Created { collection: >::Helper::collection(0), creator: collection_owner.clone(), owner: collection_owner }.into(); - assert_last_event::(event.into()); - } - - transfer_ownership { - let (collection, collection_owner, _) = create_collection::(BalanceOf::::max_value()); - let target: T::AccountId = account("target", 0, SEED); - let target_lookup = T::Lookup::unlookup(target.clone()); - T::Currency::make_free_balance_be(&target, T::Currency::minimum_balance()); - let origin = SystemOrigin::Signed(target.clone()).into(); - Uniques::::set_accept_ownership(origin, Some(collection))?; - }: _(SystemOrigin::Signed(collection_owner), collection, target_lookup) - verify { - let event: >::RuntimeEvent = pallet_uniques::Event::OwnerChanged { collection, new_owner: target }.into(); - assert_last_event::(event.into()); - } - - update_extra_deposit_limit { - let (collection, collection_owner, _) = create_collection::(BalanceOf::::max_value()); - }: _(SystemOrigin::Signed(collection_owner), collection, BalanceOf::::min_value()) - verify { - let event: >::RuntimeEvent = Event::ExtraDepositLimitUpdated { collection, limit: BalanceOf::::min_value() }.into(); - assert_last_event::(event.into()); - } - - impl_benchmark_test_suite!(Uniques, crate::tests::new_test_ext(), crate::tests::Test); -} diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs deleted file mode 100644 index f1a3c281367..00000000000 --- a/pallets/uniques/src/lib.rs +++ /dev/null @@ -1,867 +0,0 @@ -/* - * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain - * Copyright (C) 2020-2022 Nodle International - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#![cfg_attr(not(feature = "std"), no_std)] - -//! Handle the ability to notify other pallets that they should stop all - -use frame_support::traits::Currency; -use sp_runtime::traits::{StaticLookup, Zero}; -use support::LimitedBalance; - -pub use pallet::*; -pub use weights::WeightInfo as NodleWeightInfo; - -pub mod weights; - -mod benchmarking; -#[cfg(test)] -mod tests; - -type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; -pub type BalanceOf = - <>::Currency as Currency<::AccountId>>::Balance; - -#[frame_support::pallet] -pub mod pallet { - use super::*; - use frame_support::{ - pallet_prelude::*, - traits::{BalanceStatus::Reserved, ExistenceRequirement, ReservableCurrency}, - transactional, - }; - use frame_system::pallet_prelude::*; - use pallet_uniques::{DestroyWitness, WeightInfo as UniquesWeightInfo}; - use sp_runtime::DispatchResult; - use sp_std::vec::Vec; - - #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config { - /// The overarching event type. - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - /// Weight information for extrinsics specific to this pallet. - type WeightInfo: NodleWeightInfo; - } - - #[pallet::pallet] - pub struct Pallet(PhantomData<(T, I)>); - - #[pallet::hooks] - impl, I: 'static> Hooks> for Pallet {} - - #[pallet::storage] - /// The extra deposits in existence. - pub(crate) type ItemExtraDeposits, I: 'static = ()> = StorageDoubleMap< - _, - Blake2_128Concat, - T::CollectionId, - Blake2_128Concat, - T::ItemId, - BalanceOf, - OptionQuery, - >; - - #[pallet::storage] - pub(crate) type CollectionExtraDepositDetails, I: 'static = ()> = - StorageMap<_, Blake2_128Concat, T::CollectionId, LimitedBalance>, OptionQuery>; - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event, I: 'static = ()> { - /// A `collection` was created. - ExtraDepositLimitUpdated { - collection: T::CollectionId, - limit: BalanceOf, - }, - } - - #[pallet::error] - pub enum Error { - /// Cannot mint the token most likely due to extra deposit exceeding the collection owner's limit. - FailedToIncreaseTotalExtraDeposit, - /// The owner of collection is not retrievable most likely due to collection not existing. - FailedToRetrieveCollectionOwner, - /// The owner of item is not found due to item not existing. - FailedToRetrieveItemOwner, - /// Permission denied. - PermissionDenied, - /// Cannot update the extra deposit limit most likely due to it going lower than commitment - FailedToUpdateExtraDepositLimit, - } - - #[pallet::call] - impl, I: 'static> Pallet { - /// Issue a new collection of non-fungible items from a public origin. - /// - /// This new collection has no items initially and its owner is the origin. - /// - /// The origin must conform to the configured `CreateOrigin` and have sufficient funds free. - /// - /// `ItemDeposit` funds of sender are reserved. - /// - /// Parameters: - /// - `collection`: The identifier of the new collection. This must not be currently in use. - /// - `admin`: The admin of this collection. The admin is the initial address of each - /// member of the collection's admin team. - /// - /// Emits `Created` event when successful. - /// - /// Weight: `O(1)` - #[pallet::call_index(0)] - #[pallet::weight(>::WeightInfo::create())] - pub fn create( - origin: OriginFor, - collection: T::CollectionId, - admin: AccountIdLookupOf, - ) -> DispatchResult { - pallet_uniques::Pallet::::create(origin, collection, admin) - } - /// Issue a new collection of non-fungible items from a privileged origin. - /// - /// This new collection has no items initially. - /// - /// The origin must conform to `ForceOrigin`. - /// - /// Unlike `create`, no funds are reserved. - /// - /// - `collection`: The identifier of the new item. This must not be currently in use. - /// - `owner`: The owner of this collection of items. The owner has full superuser - /// permissions - /// over this item, but may later change and configure the permissions using - /// `transfer_ownership` and `set_team`. - /// - /// Emits `ForceCreated` event when successful. - /// - /// Weight: `O(1)` - #[pallet::call_index(1)] - #[pallet::weight(>::WeightInfo::force_create())] - pub fn force_create( - origin: OriginFor, - collection: T::CollectionId, - owner: AccountIdLookupOf, - free_holding: bool, - ) -> DispatchResult { - pallet_uniques::Pallet::::force_create(origin, collection, owner, free_holding) - } - - /// Destroy a collection of fungible items. - /// - /// The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the - /// owner of the `collection`. - /// - /// - `collection`: The identifier of the collection to be destroyed. - /// - `witness`: Information on the items minted in the collection. This must be - /// correct. - /// - /// Emits `Destroyed` event when successful. - /// - /// Weight: `O(n + m)` where: - /// - `n = witness.items` - /// - `m = witness.item_metadatas` - /// - `a = witness.attributes` - #[pallet::call_index(2)] - #[pallet::weight(>::WeightInfo::destroy( - witness.items, - witness.item_metadatas, - witness.attributes, - ))] - pub fn destroy( - origin: OriginFor, - collection: T::CollectionId, - witness: DestroyWitness, - ) -> DispatchResultWithPostInfo { - let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) - .ok_or(Error::::FailedToRetrieveCollectionOwner)?; - for (item, extra_deposit) in ItemExtraDeposits::::drain_prefix(collection) { - let item_owner = pallet_uniques::Pallet::::owner(collection, item) - .ok_or(Error::::FailedToRetrieveItemOwner)?; - >::Currency::unreserve(&collection_owner, extra_deposit); - >::Currency::transfer( - &collection_owner, - &item_owner, - extra_deposit, - ExistenceRequirement::AllowDeath, - )?; - } - CollectionExtraDepositDetails::::remove(collection); - pallet_uniques::Pallet::::destroy(origin, collection, witness) - } - - /// Mint an item of a particular collection. - /// - /// The origin must be Signed and the sender must be the Issuer of the `collection`. - /// - /// - `collection`: The collection of the item to be minted. - /// - `item`: The item value of the item to be minted. - /// - `beneficiary`: The initial owner of the minted item. - /// - /// Emits `Issued` event when successful. - /// - /// Weight: `O(1)` - #[pallet::call_index(3)] - #[pallet::weight(>::WeightInfo::mint())] - pub fn mint( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - owner: AccountIdLookupOf, - ) -> DispatchResult { - pallet_uniques::Pallet::::mint(origin, collection, item, owner) - } - - /// Destroy a single item. - /// - /// Origin must be Signed and the signing account must be either: - /// - the Admin of the `collection`; - /// - the Owner of the `item`; - /// - /// - `collection`: The collection of the item to be burned. - /// - `item`: The item of the item to be burned. - /// - `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the - /// item is owned by this value. - /// - /// Emits `Burned` with the actual amount burned. - /// - /// Weight: `O(1)` - /// Modes: `check_owner.is_some()`. - #[pallet::call_index(4)] - #[pallet::weight(>::WeightInfo::burn())] - pub fn burn( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - check_owner: Option>, - ) -> DispatchResult { - let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) - .ok_or(Error::::FailedToRetrieveCollectionOwner)?; - let item_owner = pallet_uniques::Pallet::::owner(collection, item) - .ok_or(Error::::FailedToRetrieveItemOwner)?; - pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; - let extra_deposit = ItemExtraDeposits::::take(collection, item).unwrap_or_else(Zero::zero); - if !extra_deposit.is_zero() { - >::Currency::unreserve(&collection_owner, extra_deposit); - >::Currency::transfer( - &collection_owner, - &item_owner, - extra_deposit, - ExistenceRequirement::AllowDeath, - ) - } else { - Ok(()) - } - } - - /// Move an item from the sender account to another. - /// - /// This resets the approved account of the item. - /// - /// Origin must be Signed and the signing account must be either: - /// - the Admin of the `collection`; - /// - the Owner of the `item`; - /// - the approved delegate for the `item` (in this case, the approval is reset). - /// - /// Arguments: - /// - `collection`: The collection of the item to be transferred. - /// - `item`: The item of the item to be transferred. - /// - `dest`: The account to receive ownership of the item. - /// - /// Emits `Transferred`. - /// - /// Weight: `O(1)` - #[pallet::call_index(5)] - #[pallet::weight(>::WeightInfo::transfer())] - pub fn transfer( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - dest: AccountIdLookupOf, - ) -> DispatchResult { - pallet_uniques::Pallet::::transfer(origin, collection, item, dest) - } - - /// Reevaluate the deposits on some items. - /// - /// Origin must be Signed and the sender should be the Owner of the `collection`. - /// - /// - `collection`: The collection to be frozen. - /// - `items`: The items of the collection whose deposits will be reevaluated. - /// - /// NOTE: This exists as a best-effort function. Any items which are unknown or - /// in the case that the owner account does not have reservable funds to pay for a - /// deposit increase are ignored. Generally the owner isn't going to call this on items - /// whose existing deposit is less than the refreshed deposit as it would only cost them, - /// so it's of little consequence. - /// - /// It will still return an error in the case that the collection is unknown of the signer - /// is not permitted to call it. - /// - /// Weight: `O(items.len())` - #[pallet::call_index(6)] - #[pallet::weight(>::WeightInfo::redeposit(items.len() as u32))] - pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { - pallet_uniques::Pallet::::redeposit(origin, collection, items) - } - - /// Disallow further unprivileged transfer of an item. - /// - /// Origin must be Signed and the sender should be the Freezer of the `collection`. - /// - /// - `collection`: The collection of the item to be frozen. - /// - `item`: The item of the item to be frozen. - /// - /// Emits `Frozen`. - /// - /// Weight: `O(1)` - #[pallet::call_index(7)] - #[pallet::weight(>::WeightInfo::freeze())] - pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::freeze(origin, collection, item) - } - - /// Re-allow unprivileged transfer of an item. - /// - /// Origin must be Signed and the sender should be the Freezer of the `collection`. - /// - /// - `collection`: The collection of the item to be thawed. - /// - `item`: The item of the item to be thawed. - /// - /// Emits `Thawed`. - /// - /// Weight: `O(1)` - #[pallet::call_index(8)] - #[pallet::weight(>::WeightInfo::thaw())] - pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::thaw(origin, collection, item) - } - - /// Disallow further unprivileged transfers for a whole collection. - /// - /// Origin must be Signed and the sender should be the Freezer of the `collection`. - /// - /// - `collection`: The collection to be frozen. - /// - /// Emits `CollectionFrozen`. - /// - /// Weight: `O(1)` - #[pallet::call_index(9)] - #[pallet::weight(>::WeightInfo::freeze_collection())] - pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::freeze_collection(origin, collection) - } - - /// Re-allow unprivileged transfers for a whole collection. - /// - /// Origin must be Signed and the sender should be the Admin of the `collection`. - /// - /// - `collection`: The collection to be thawed. - /// - /// Emits `CollectionThawed`. - /// - /// Weight: `O(1)` - #[pallet::call_index(10)] - #[pallet::weight(>::WeightInfo::thaw_collection())] - pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::thaw_collection(origin, collection) - } - - /// Change the Owner of a collection. - /// - /// Origin must be Signed and the sender should be the Owner of the `collection`. - /// - /// - `collection`: The collection whose owner should be changed. - /// - `owner`: The new Owner of this collection. They must have called - /// `set_accept_ownership` with `collection` in order for this operation to succeed. - /// - /// Emits `OwnerChanged`. - /// - /// Weight: `O(1)` - #[pallet::call_index(11)] - #[pallet::weight(>::WeightInfo::transfer_ownership())] - pub fn transfer_ownership( - origin: OriginFor, - collection: T::CollectionId, - owner: AccountIdLookupOf, - ) -> DispatchResult { - pallet_uniques::Pallet::::transfer_ownership(origin.clone(), collection, owner.clone())?; - let old_owner = ensure_signed(origin)?; - let new_owner = T::Lookup::lookup(owner)?; - if old_owner != new_owner { - let total_extra_deposit = CollectionExtraDepositDetails::::get(collection) - .unwrap_or_default() - .balance(); - T::Currency::repatriate_reserved(&old_owner, &new_owner, total_extra_deposit, Reserved)?; - } - Ok(()) - } - - /// Change the Issuer, Admin and Freezer of a collection. - /// - /// Origin must be Signed and the sender should be the Owner of the `collection`. - /// - /// - `collection`: The collection whose team should be changed. - /// - `issuer`: The new Issuer of this collection. - /// - `admin`: The new Admin of this collection. - /// - `freezer`: The new Freezer of this collection. - /// - /// Emits `TeamChanged`. - /// - /// Weight: `O(1)` - #[pallet::call_index(12)] - #[pallet::weight(>::WeightInfo::set_team())] - pub fn set_team( - origin: OriginFor, - collection: T::CollectionId, - issuer: AccountIdLookupOf, - admin: AccountIdLookupOf, - freezer: AccountIdLookupOf, - ) -> DispatchResult { - pallet_uniques::Pallet::::set_team(origin, collection, issuer, admin, freezer) - } - - /// Approve an item to be transferred by a delegated third-party account. - /// - /// The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be - /// either the owner of the `item` or the admin of the collection. - /// - /// - `collection`: The collection of the item to be approved for delegated transfer. - /// - `item`: The item of the item to be approved for delegated transfer. - /// - `delegate`: The account to delegate permission to transfer the item. - /// - /// Important NOTE: The `approved` account gets reset after each transfer. - /// - /// Emits `ApprovedTransfer` on success. - /// - /// Weight: `O(1)` - #[pallet::call_index(13)] - #[pallet::weight(>::WeightInfo::approve_transfer())] - pub fn approve_transfer( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - delegate: AccountIdLookupOf, - ) -> DispatchResult { - pallet_uniques::Pallet::::approve_transfer(origin, collection, item, delegate) - } - - /// Cancel the prior approval for the transfer of an item by a delegate. - /// - /// Origin must be either: - /// - the `Force` origin; - /// - `Signed` with the signer being the Admin of the `collection`; - /// - `Signed` with the signer being the Owner of the `item`; - /// - /// Arguments: - /// - `collection`: The collection of the item of whose approval will be cancelled. - /// - `item`: The item of the item of whose approval will be cancelled. - /// - `maybe_check_delegate`: If `Some` will ensure that the given account is the one to - /// which permission of transfer is delegated. - /// - /// Emits `ApprovalCancelled` on success. - /// - /// Weight: `O(1)` - #[pallet::call_index(14)] - #[pallet::weight(>::WeightInfo::cancel_approval())] - pub fn cancel_approval( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - maybe_check_delegate: Option>, - ) -> DispatchResult { - pallet_uniques::Pallet::::cancel_approval(origin, collection, item, maybe_check_delegate) - } - - /// Alter the attributes of a given item. - /// - /// Origin must be `ForceOrigin`. - /// - /// - `collection`: The identifier of the item. - /// - `owner`: The new Owner of this item. - /// - `issuer`: The new Issuer of this item. - /// - `admin`: The new Admin of this item. - /// - `freezer`: The new Freezer of this item. - /// - `free_holding`: Whether a deposit is taken for holding an item of this collection. - /// - `is_frozen`: Whether this collection is frozen except for permissioned/admin - /// instructions. - /// - /// Emits `ItemStatusChanged` with the identity of the item. - /// - /// Weight: `O(1)` - #[pallet::call_index(15)] - #[pallet::weight(>::WeightInfo::force_item_status())] - #[allow(clippy::too_many_arguments)] - pub fn force_item_status( - origin: OriginFor, - collection: T::CollectionId, - owner: AccountIdLookupOf, - issuer: AccountIdLookupOf, - admin: AccountIdLookupOf, - freezer: AccountIdLookupOf, - free_holding: bool, - is_frozen: bool, - ) -> DispatchResult { - pallet_uniques::Pallet::::force_item_status( - origin, - collection, - owner, - issuer, - admin, - freezer, - free_holding, - is_frozen, - ) - } - - /// Set an attribute for a collection or item. - /// - /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the - /// `collection`. - /// - /// If the origin is Signed, then funds of signer are reserved according to the formula: - /// `MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into - /// account any already reserved funds. - /// - /// - `collection`: The identifier of the collection whose item's metadata to set. - /// - `maybe_item`: The identifier of the item whose metadata to set. - /// - `key`: The key of the attribute. - /// - `value`: The value to which to set the attribute. - /// - /// Emits `AttributeSet`. - /// - /// Weight: `O(1)` - #[pallet::call_index(16)] - #[pallet::weight(>::WeightInfo::set_attribute())] - pub fn set_attribute( - origin: OriginFor, - collection: T::CollectionId, - maybe_item: Option, - key: BoundedVec, - value: BoundedVec, - ) -> DispatchResult { - pallet_uniques::Pallet::::set_attribute(origin, collection, maybe_item, key, value) - } - - /// Clear an attribute for a collection or item. - /// - /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the - /// `collection`. - /// - /// Any deposit is freed for the collection's owner. - /// - /// - `collection`: The identifier of the collection whose item's metadata to clear. - /// - `maybe_item`: The identifier of the item whose metadata to clear. - /// - `key`: The key of the attribute. - /// - /// Emits `AttributeCleared`. - /// - /// Weight: `O(1)` - #[pallet::call_index(17)] - #[pallet::weight(>::WeightInfo::clear_attribute())] - pub fn clear_attribute( - origin: OriginFor, - collection: T::CollectionId, - maybe_item: Option, - key: BoundedVec, - ) -> DispatchResult { - pallet_uniques::Pallet::::clear_attribute(origin, collection, maybe_item, key) - } - - /// Set the metadata for an item. - /// - /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the - /// `collection`. - /// - /// If the origin is Signed, then funds of signer are reserved according to the formula: - /// `MetadataDepositBase + DepositPerByte * data.len` taking into - /// account any already reserved funds. - /// - /// - `collection`: The identifier of the collection whose item's metadata to set. - /// - `item`: The identifier of the item whose metadata to set. - /// - `data`: The general information of this item. Limited in length by `StringLimit`. - /// - `is_frozen`: Whether the metadata should be frozen against further changes. - /// - /// Emits `MetadataSet`. - /// - /// Weight: `O(1)` - #[pallet::call_index(18)] - #[pallet::weight(>::WeightInfo::set_metadata())] - pub fn set_metadata( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - data: BoundedVec, - is_frozen: bool, - ) -> DispatchResult { - pallet_uniques::Pallet::::set_metadata(origin, collection, item, data, is_frozen) - } - - /// Clear the metadata for an item. - /// - /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the - /// `item`. - /// - /// Any deposit is freed for the collection's owner. - /// - /// - `collection`: The identifier of the collection whose item's metadata to clear. - /// - `item`: The identifier of the item whose metadata to clear. - /// - /// Emits `MetadataCleared`. - /// - /// Weight: `O(1)` - #[pallet::call_index(19)] - #[pallet::weight(>::WeightInfo::clear_metadata())] - pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::clear_metadata(origin, collection, item) - } - - /// Set the metadata for a collection. - /// - /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of - /// the `collection`. - /// - /// If the origin is `Signed`, then funds of signer are reserved according to the formula: - /// `MetadataDepositBase + DepositPerByte * data.len` taking into - /// account any already reserved funds. - /// - /// - `collection`: The identifier of the item whose metadata to update. - /// - `data`: The general information of this item. Limited in length by `StringLimit`. - /// - `is_frozen`: Whether the metadata should be frozen against further changes. - /// - /// Emits `CollectionMetadataSet`. - /// - /// Weight: `O(1)` - #[pallet::call_index(20)] - #[pallet::weight(>::WeightInfo::set_collection_metadata())] - pub fn set_collection_metadata( - origin: OriginFor, - collection: T::CollectionId, - data: BoundedVec, - is_frozen: bool, - ) -> DispatchResult { - pallet_uniques::Pallet::::set_collection_metadata(origin, collection, data, is_frozen) - } - - /// Clear the metadata for a collection. - /// - /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of - /// the `collection`. - /// - /// Any deposit is freed for the collection's owner. - /// - /// - `collection`: The identifier of the collection whose metadata to clear. - /// - /// Emits `CollectionMetadataCleared`. - /// - /// Weight: `O(1)` - #[pallet::call_index(21)] - #[pallet::weight(>::WeightInfo::clear_collection_metadata())] - pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) - } - - /// Set (or reset) the acceptance of ownership for a particular account. - /// - /// Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a - /// provider reference. - /// - /// - `maybe_collection`: The identifier of the collection whose ownership the signer is - /// willing to accept, or if `None`, an indication that the signer is willing to accept no - /// ownership transferal. - /// - /// Emits `OwnershipAcceptanceChanged`. - #[pallet::call_index(22)] - #[pallet::weight(>::WeightInfo::set_accept_ownership())] - pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { - pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) - } - - /// Set the maximum amount of items a collection could have. - /// - /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of - /// the `collection`. - /// - /// Note: This function can only succeed once per collection. - /// - /// - `collection`: The identifier of the collection to change. - /// - `max_supply`: The maximum amount of items a collection could have. - /// - /// Emits `CollectionMaxSupplySet` event when successful. - #[pallet::call_index(23)] - #[pallet::weight(>::WeightInfo::set_collection_max_supply())] - pub fn set_collection_max_supply( - origin: OriginFor, - collection: T::CollectionId, - max_supply: u32, - ) -> DispatchResult { - pallet_uniques::Pallet::::set_collection_max_supply(origin, collection, max_supply) - } - - /// Set (or reset) the price for an item. - /// - /// Origin must be Signed and must be the owner of the asset `item`. - /// - /// - `collection`: The collection of the item. - /// - `item`: The item to set the price for. - /// - `price`: The price for the item. Pass `None`, to reset the price. - /// - `buyer`: Restricts the buy operation to a specific account. - /// - /// Emits `ItemPriceSet` on success if the price is not `None`. - /// Emits `ItemPriceRemoved` on success if the price is `None`. - #[pallet::call_index(24)] - #[pallet::weight(>::WeightInfo::set_price())] - pub fn set_price( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - price: Option>, - whitelisted_buyer: Option>, - ) -> DispatchResult { - pallet_uniques::Pallet::::set_price(origin, collection, item, price, whitelisted_buyer) - } - - /// Allows to buy an item if it's up for sale. - /// - /// Origin must be Signed and must not be the owner of the `item`. - /// - /// - `collection`: The collection of the item. - /// - `item`: The item the sender wants to buy. - /// - `bid_price`: The price the sender is willing to pay. - /// - /// Emits `ItemBought` on success. - #[pallet::call_index(25)] - #[pallet::weight(>::WeightInfo::buy_item())] - #[transactional] - pub fn buy_item( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - bid_price: BalanceOf, - ) -> DispatchResult { - pallet_uniques::Pallet::::buy_item(origin, collection, item, bid_price) - } - - /// Issue a new collection of non-fungible items from a public origin. - /// - /// This new collection has no items initially and its owner is the origin. - /// - /// The origin must conform to the configured `CreateOrigin` and have sufficient funds free. - /// - /// `ItemDeposit` funds of sender are reserved. - /// - /// Parameters: - /// - `collection`: The identifier of the new collection. This must not be currently in use. - /// - `admin`: The admin of this collection. The admin is the initial address of each - /// member of the collection's admin team. - /// - `extra_deposit_limit`: The cap on the total amount of funds that an admin/issuer can - /// reserve from the collection owner (origin of this call) while minting NFTs with extra - /// deposit. - /// - /// Emits `Created` event when successful. - /// - /// Weight: `O(1)` - #[pallet::call_index(26)] - #[pallet::weight(>::WeightInfo::create_with_extra_deposit_limit())] - #[transactional] - pub fn create_with_extra_deposit_limit( - origin: OriginFor, - collection: T::CollectionId, - admin: AccountIdLookupOf, - limit: BalanceOf, - ) -> DispatchResult { - // Since the extrinsic is transactional the following call only succeeds if the - // collection is also created successfully. - CollectionExtraDepositDetails::::insert( - collection, - LimitedBalance::>::with_limit(limit), - ); - pallet_uniques::Pallet::::create(origin, collection, admin) - } - - /// Mint an item of a particular collection with extra deposit. - /// - /// The origin must be Signed and the sender must be the Issuer of the `collection`. - /// - /// - `collection`: The collection of the item to be minted. - /// - `item`: The item value of the item to be minted. - /// - `beneficiary`: The initial owner of the minted item. - /// - /// Emits `Issued` event when successful. - /// - /// Weight: `O(1)` - #[pallet::call_index(27)] - #[pallet::weight(>::WeightInfo::mint_with_extra_deposit())] - #[transactional] - pub fn mint_with_extra_deposit( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - owner: AccountIdLookupOf, - deposit: BalanceOf, - ) -> DispatchResult { - pallet_uniques::Pallet::::mint(origin, collection, item, owner)?; - let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) - .ok_or(Error::::FailedToRetrieveCollectionOwner)?; - let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); - extra_deposit_details - .add(deposit) - .map_err(|_| Error::::FailedToIncreaseTotalExtraDeposit)?; - >::Currency::reserve(&collection_owner, deposit)?; - ItemExtraDeposits::::insert(collection, item, deposit); - CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); - Ok(()) - } - - /// Update extra deposit limit for a collection when it's not against what is already - /// reserved. - /// - /// Only the collection owner can update this limit to a value higher than the total extra - /// deposit for the collection currently. - /// - /// Parameters: - /// - `collection`: The identifier of the collection owned by the origin. - /// - `limit`: The new cap on the total amount of funds that an admin/issuer can - /// reserve from the collection owner (origin of this call) while minting NFTs with extra - /// deposit. - /// - /// Emits `ExtraDepositLimitUpdated` event when successful. - /// - /// Weight: `O(1)` - #[pallet::call_index(28)] - #[pallet::weight(>::WeightInfo::update_extra_deposit_limit())] - #[transactional] - pub fn update_extra_deposit_limit( - origin: OriginFor, - collection: T::CollectionId, - limit: BalanceOf, - ) -> DispatchResult { - let origin = ensure_signed(origin)?; - let owner = pallet_uniques::Pallet::::collection_owner(collection) - .ok_or(Error::::FailedToRetrieveCollectionOwner)?; - ensure!(origin == owner, Error::::PermissionDenied); - - let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); - extra_deposit_details - .update_limit(limit) - .map_err(|_| Error::::FailedToUpdateExtraDepositLimit)?; - CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); - - Self::deposit_event(Event::::ExtraDepositLimitUpdated { collection, limit }); - Ok(()) - } - } -} diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs deleted file mode 100644 index 24e70b2aba3..00000000000 --- a/pallets/uniques/src/tests.rs +++ /dev/null @@ -1,1086 +0,0 @@ -use super::*; -use crate as pallet_nodle_uniques; - -use frame_support::{ - assert_noop, assert_ok, construct_runtime, parameter_types, - traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, -}; -use pallet_uniques::DestroyWitness; -use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; - -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - -construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Uniques: pallet_nodle_uniques::{Call, Storage, Event}, - Uniques2: pallet_uniques::{Pallet, Call, Storage, Event}, - } -); - -impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type DbWeight = (); - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; -} - -impl pallet_balances::Config for Test { - type Balance = u64; - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type MaxLocks = (); - type ExistentialDeposit = ConstU64<1>; - type AccountStore = frame_system::Pallet; - type MaxReserves = (); - type ReserveIdentifier = [u8; 8]; - type WeightInfo = (); - #[doc = " The ID type for holds."] - type HoldIdentifier = [u8; 8]; - #[doc = " The ID type for freezes."] - type FreezeIdentifier = [u8; 8]; - #[doc = " The maximum number of holds that can exist on an account at any time."] - type MaxHolds = (); - #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] - type MaxFreezes = (); -} -parameter_types! { - pub TestCollectionDeposit: u64 = 2; - pub TestItemDeposit: u64 = 1; -} - -impl pallet_uniques::Config for Test { - type RuntimeEvent = RuntimeEvent; - type CollectionId = u32; - type ItemId = u32; - type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; - type ForceOrigin = frame_system::EnsureRoot; - type Locker = (); - type CollectionDeposit = TestCollectionDeposit; - type ItemDeposit = TestItemDeposit; - type MetadataDepositBase = ConstU64<1>; - type AttributeDepositBase = ConstU64<1>; - type DepositPerByte = ConstU64<1>; - type StringLimit = ConstU32<50>; - type KeyLimit = ConstU32<50>; - type ValueLimit = ConstU32<50>; - type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type Helper = (); -} -impl Config for Test { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); -} - -macro_rules! bvec { - ($( $x:tt )*) => { - vec![$( $x )*].try_into().unwrap() - } -} -pub(crate) fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} -#[cfg(test)] -mod test_cases { - use super::*; - use frame_support::traits::Len; - #[test] - fn test_extra_deposit_limit_is_zero_if_not_set_explicitly() { - new_test_ext().execute_with(|| { - let collection_id = 0; - let collection_owner = 1; - let item_id = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_owner, 100); - - assert_ok!(Uniques::create( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_owner, - )); - assert_noop!( - Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection_id, - item_id, - item_owner, - 1 - ), - Error::::FailedToIncreaseTotalExtraDeposit - ); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection_id, - item_id, - item_owner, - 0 - )); - assert_eq!( - Balances::reserved_balance(collection_owner), - TestCollectionDeposit::get() + TestItemDeposit::get() - ); - }) - } - - #[test] - fn test_extra_deposit_limit_is_set_per_collection() { - new_test_ext().execute_with(|| { - let extra_deposit_limits_per_collection = [(0, 53), (1, 143), (2, 0), (3, 1), (4, 71)]; - let collection_owner = 1; - let item = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_owner, u64::MAX); - - let mut total_extra_deposit_limit = 0; - for (collection, extra_deposit_limit) in extra_deposit_limits_per_collection { - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit - )); - assert_noop!( - Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - extra_deposit_limit + 1 - ), - Error::::FailedToIncreaseTotalExtraDeposit - ); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - extra_deposit_limit - )); - total_extra_deposit_limit += extra_deposit_limit; - } - - assert_eq!( - Balances::reserved_balance(collection_owner), - (TestCollectionDeposit::get() + TestItemDeposit::get()) - * (extra_deposit_limits_per_collection.len() as u64) - + total_extra_deposit_limit - ); - }) - } - - #[test] - fn test_destroying_one_collection_does_not_impact_others() { - new_test_ext().execute_with(|| { - let extra_deposit_limits_per_collection = [(0, 53), (1, 143), (2, 0), (3, 1), (4, 71)]; - let collection_owner = 1; - let item = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_owner, u64::MAX); - - for (collection, extra_deposit_limit) in extra_deposit_limits_per_collection { - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit - )); - } - - let witness = DestroyWitness { - items: 0, - item_metadatas: 0, - attributes: 0, - }; - assert_ok!(Uniques::destroy(RuntimeOrigin::signed(collection_owner), 1, witness)); - - // remaining collections after 1 us destroyed are 0, 2, 3, 4 - let remaining_collections_and_limits = [(0, 53), (2, 0), (3, 1), (4, 71)]; - - for (collection, extra_deposit_limit) in remaining_collections_and_limits { - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - extra_deposit_limit - )); - } - - assert_noop!( - Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), 1, item, item_owner, 1), - pallet_uniques::Error::::UnknownCollection - ); - }) - } - - #[test] - fn test_extra_deposit_limit_is_maintained_when_minting_several_items() { - new_test_ext().execute_with(|| { - let extra_deposit_limit = 100; - let collection = 0; - let collection_owner = 1; - // The deposits below sum up to 100. - let items_and_owners_and_deposits = [(0, 2, 53), (1, 3, 35), (2, 4, 0), (3, 5, 12)]; - - Balances::make_free_balance_be(&collection_owner, u64::MAX); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit - )); - - for (item, item_owner, deposit) in items_and_owners_and_deposits { - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - deposit - )); - } - - assert_noop!( - Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), collection, 4, 6, 1), - Error::::FailedToIncreaseTotalExtraDeposit - ); - }) - } - - #[test] - fn test_extra_deposit_limit_is_updatable_when_over_or_equal_previous_total() { - new_test_ext().execute_with(|| { - let extra_deposit_limit = 100; - let collection = 0; - let collection_owner = 1; - // The deposits below sum up to 100. - let items_and_owners_and_deposits = [(0, 2, 53), (1, 3, 35), (2, 4, 0)]; - - Balances::make_free_balance_be(&collection_owner, u64::MAX); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit - )); - - for (item, item_owner, deposit) in items_and_owners_and_deposits { - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - deposit - )); - } - let extra_deposit_total = CollectionExtraDepositDetails::::get(collection) - .unwrap_or_default() - .balance(); - assert_noop!( - Uniques::update_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - extra_deposit_total - 1 - ), - Error::::FailedToUpdateExtraDepositLimit - ); - - assert_ok!(Uniques::update_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - extra_deposit_total - )); - - assert_noop!( - Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), collection, 3, 5, 1), - Error::::FailedToIncreaseTotalExtraDeposit - ); - }) - } - - #[test] - fn test_only_collection_owner_can_update_extra_deposit_limit() { - new_test_ext().execute_with(|| { - let collection_id = 0; - let collection_owner = 1; - let collection_admin = 2; - - let item_owner = 3; - - Balances::make_free_balance_be(&collection_owner, 100); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_admin, - 20 - )); - - assert_noop!( - Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_admin), collection_id, 30), - Error::::PermissionDenied - ); - assert_noop!( - Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(item_owner), collection_id, 30), - Error::::PermissionDenied - ); - - assert_ok!(Uniques::update_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - 30 - )); - }) - } - - #[test] - fn test_updating_extra_deposit_limit_fails_when_collection_not_exist() { - new_test_ext().execute_with(|| { - let collection_id = 0; - let collection_owner = 1; - let collection_admin = 2; - - Balances::make_free_balance_be(&collection_owner, 100); - - assert_noop!( - Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_owner), collection_id, 30), - Error::::FailedToRetrieveCollectionOwner - ); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_admin, - 20 - )); - - assert_noop!( - Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_owner), collection_id + 1, 30), - Error::::FailedToRetrieveCollectionOwner - ); - - assert_ok!(Uniques::update_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - 30 - )); - }) - } - - #[test] - fn test_extra_deposit_is_updatable_for_collections_without_previous_extra_deposit_details() { - new_test_ext().execute_with(|| { - let collection_id = 7; - let collection_owner = 1; - let collection_admin = 2; - - Balances::make_free_balance_be(&collection_owner, 100); - - assert_ok!(Uniques::create( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_admin, - )); - - let limit = 30; - assert_ok!(Uniques::update_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - limit - )); - - assert_eq!( - CollectionExtraDepositDetails::::get(collection_id) - .unwrap() - .limit(), - limit - ); - }) - } - - #[test] - fn test_transfer_ownership_repatriates_extra_deposit() { - new_test_ext().execute_with(|| { - let extra_deposit_limit = 100; - let extra_deposit = extra_deposit_limit - 1; - - let collection_id = 0; - let collection_old_owner = 1; - let collection_new_owner = 2; - - let old_owner_reserved_balance = extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get(); - let old_owner_free_balance = 2 * old_owner_reserved_balance; - let new_owner_free_balance = old_owner_free_balance - 1; - - let item_id = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_old_owner, old_owner_free_balance); - Balances::make_free_balance_be(&collection_new_owner, new_owner_free_balance); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_old_owner), - collection_id, - collection_old_owner, - extra_deposit_limit - )); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_old_owner), - collection_id, - item_id, - item_owner, - extra_deposit - )); - assert_eq!( - Balances::reserved_balance(collection_old_owner), - old_owner_reserved_balance - ); - - assert_ok!(Uniques::set_accept_ownership( - RuntimeOrigin::signed(collection_new_owner), - Some(collection_id), - )); - assert_ok!(Uniques::transfer_ownership( - RuntimeOrigin::signed(collection_old_owner), - collection_id, - collection_new_owner - )); - - assert_eq!(Balances::reserved_balance(collection_old_owner), 0); - assert_eq!( - Balances::free_balance(collection_old_owner), - old_owner_free_balance - old_owner_reserved_balance - ); - assert_eq!( - Balances::reserved_balance(collection_new_owner), - old_owner_reserved_balance - ); - assert_eq!(Balances::free_balance(collection_new_owner), new_owner_free_balance); - }) - } - - #[test] - fn test_transfer_ownership_to_self() { - new_test_ext().execute_with(|| { - let extra_deposit_limit = 100; - let extra_deposit = extra_deposit_limit - 1; - - let collection_id = 0; - let collection_owner = 1; - - let owner_reserved_balance = extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get(); - let owner_free_balance = 2 * owner_reserved_balance; - - let item_id = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_owner, owner_free_balance); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_owner, - extra_deposit_limit - )); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection_id, - item_id, - item_owner, - extra_deposit - )); - assert_eq!(Balances::reserved_balance(collection_owner), owner_reserved_balance); - - assert_ok!(Uniques::set_accept_ownership( - RuntimeOrigin::signed(collection_owner), - Some(collection_id), - )); - assert_ok!(Uniques::transfer_ownership( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_owner - )); - - assert_eq!(Balances::reserved_balance(collection_owner), owner_reserved_balance); - assert_eq!( - Balances::free_balance(collection_owner), - owner_free_balance - owner_reserved_balance - ); - }) - } - - #[test] - fn test_mint_with_extra_deposit() { - new_test_ext().execute_with(|| { - let extra_deposit = 20; - let collection_id = 0; - let item_id = 10; - let item_id2 = 12; - let collection_owner_id = 1; - let item_owner = 42; - Balances::make_free_balance_be(&collection_owner_id, 100); - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner_id), - collection_id, - collection_owner_id, - 100 - )); - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() - ); - assert_ok!(Uniques::set_collection_metadata( - RuntimeOrigin::signed(collection_owner_id), - 0, - bvec![0, 0], - false - )); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner_id), - collection_id, - item_id, - item_owner, - extra_deposit - )); - - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 - ); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner_id), - collection_id, - item_id2, - item_owner, - extra_deposit - )); - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() + 2 * TestItemDeposit::get() + 2 * extra_deposit + 3 - ); - }) - } - - #[test] - fn test_burn_when_extra_deposit_is_zero() { - new_test_ext().execute_with(|| { - let extra_deposit_limit = 100; - let collection = 0; - let collection_owner = 1; - let item = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_owner, u64::MAX); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit - )); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - 0 - )); - - assert_ok!(Uniques::burn(RuntimeOrigin::signed(item_owner), collection, item, None)); - }) - } - - #[test] - fn test_burn_goes_ahead_despite_partial_unreserve() { - new_test_ext().execute_with(|| { - let extra_deposit_limit = 100; - let extra_deposit = 20; - let collection = 0; - let collection_owner = 1; - let item = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_owner, 2 * extra_deposit_limit); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit - )); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - extra_deposit - )); - - assert_ok!(Balances::force_unreserve( - RuntimeOrigin::root(), - collection_owner, - extra_deposit - )); - - assert_ok!(Uniques::burn(RuntimeOrigin::signed(item_owner), collection, item, None)); - }) - } - - #[test] - fn test_destroy_despite_partial_unreserve() { - new_test_ext().execute_with(|| { - let extra_deposit_limit = 100; - let extra_deposit = 20; - let collection = 0; - let collection_owner = 1; - let item = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_owner, 2 * extra_deposit_limit); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit - )); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - extra_deposit - )); - - assert_ok!(Balances::force_unreserve( - RuntimeOrigin::root(), - collection_owner, - extra_deposit - )); - - let witness = DestroyWitness { - items: 1, - item_metadatas: 0, - attributes: 0, - }; - assert_ok!(Uniques::destroy( - RuntimeOrigin::signed(collection_owner), - collection, - witness - )); - }) - } - - #[test] - fn test_destroy_removes_extra_deposit_details() { - new_test_ext().execute_with(|| { - let extra_deposit_limit = 100; - let extra_deposit = 20; - let collection = 0; - let collection_owner = 1; - let item = 0; - let item_owner = 2; - - Balances::make_free_balance_be(&collection_owner, 3 * extra_deposit_limit); - - assert!(!CollectionExtraDepositDetails::::contains_key(collection)); - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit - )); - assert_eq!( - CollectionExtraDepositDetails::::get(collection).unwrap().limit(), - extra_deposit_limit - ); - - assert!(ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection, - item, - item_owner, - extra_deposit - )); - assert!(!ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); - assert_eq!( - CollectionExtraDepositDetails::::get(collection) - .unwrap() - .balance(), - extra_deposit - ); - - let witness = DestroyWitness { - items: 1, - item_metadatas: 0, - attributes: 0, - }; - assert_ok!(Uniques::destroy( - RuntimeOrigin::signed(collection_owner), - collection, - witness - )); - assert!(!CollectionExtraDepositDetails::::contains_key(collection)); - assert!(ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); - - // Recreate the collection with higher limit - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection, - collection_owner, - extra_deposit_limit + 1 - )); - assert_eq!( - CollectionExtraDepositDetails::::get(collection).unwrap().limit(), - extra_deposit_limit + 1 - ); - assert_eq!( - CollectionExtraDepositDetails::::get(collection) - .unwrap() - .balance(), - 0 - ); - }) - } - - #[test] - fn test_mint_and_burn_with_extra_deposit() { - new_test_ext().execute_with(|| { - let extra_deposit = 20; - let collection_id = 0; - let item_id = 10; - let collection_owner_id = 1; - let item_owner = 42; - let init_balance = 100; - Balances::make_free_balance_be(&collection_owner_id, init_balance); - Balances::make_free_balance_be(&item_owner, init_balance); - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner_id), - collection_id, - collection_owner_id, - 100 - )); - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() - ); - assert_ok!(Uniques::set_collection_metadata( - RuntimeOrigin::signed(collection_owner_id), - 0, - bvec![0, 0], - false - )); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner_id), - collection_id, - item_id, - item_owner, - extra_deposit - )); - - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 - ); - - assert_ok!(Uniques::burn( - RuntimeOrigin::signed(collection_owner_id), - collection_id, - item_id, - None - )); - - // check if extra deposit is freed as well as the item deposit - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() + 3 - ); - // check that the owner of the collection does not recover the reserved amount of the burnt item - assert_eq!( - Balances::free_balance(collection_owner_id), - init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) - ); - // extra deposit transferred to the item owner free balance - assert_eq!(Balances::free_balance(item_owner), init_balance + extra_deposit); - }) - } - - #[test] - fn test_mint_and_burn_wrong_origin_with_extra_deposit() { - new_test_ext().execute_with(|| { - let extra_deposit = 20; - let collection_id = 0; - let item_id = 10; - let collection_owner_id = 1; - let not_collection_owner_id = 255; - let item_owner = 42; - let init_balance = 100; - Balances::make_free_balance_be(&collection_owner_id, init_balance); - Balances::make_free_balance_be(&item_owner, init_balance); - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner_id), - collection_id, - collection_owner_id, - 100 - )); - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() - ); - assert_ok!(Uniques::set_collection_metadata( - RuntimeOrigin::signed(1), - 0, - bvec![0, 0], - false - )); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner_id), - collection_id, - item_id, - item_owner, - extra_deposit - )); - - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 - ); - - assert_noop!( - Uniques::burn( - RuntimeOrigin::signed(not_collection_owner_id), - collection_id, - item_id, - None - ), - pallet_uniques::Error::::NoPermission - ); - - // reserved balance should not have changed - assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 - ); - }) - } - - #[test] - fn test_destroy_collection() { - new_test_ext().execute_with(|| { - let collection_id = 0; - let items = [10, 12, 15]; - let extra_deposits = [20, 30, 40]; - let collection_owner = 1; - let owners = [42, 43]; - let init_balance = 100; - - let total_extra_deposit = extra_deposits.into_iter().reduce(|a, b| a + b).unwrap(); - - Balances::make_free_balance_be(&collection_owner, init_balance); - Balances::make_free_balance_be(&owners[0], init_balance); - Balances::make_free_balance_be(&owners[1], init_balance); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_owner, - 100 - )); - assert_eq!( - Balances::reserved_balance(collection_owner), - TestCollectionDeposit::get() - ); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection_id, - items[0], - owners[0], - extra_deposits[0] - )); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection_id, - items[1], - owners[0], - extra_deposits[1] - )); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection_id, - items[2], - owners[1], - extra_deposits[2] - )); - - assert_eq!( - Balances::reserved_balance(collection_owner), - total_extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get() * items.len() as u64 - ); - assert_eq!( - ItemExtraDeposits::::iter_prefix(collection_id).count(), - items.len() - ); - - let witness = DestroyWitness { - items: items.len() as u32, - item_metadatas: 0, - attributes: 0, - }; - assert_ok!(Uniques::destroy( - RuntimeOrigin::signed(collection_owner), - collection_id, - witness - )); - - assert_eq!(ItemExtraDeposits::::iter_prefix(collection_id).count(), 0); - assert_eq!(Balances::reserved_balance(collection_owner), 0); - assert_eq!( - Balances::free_balance(collection_owner), - init_balance - total_extra_deposit - ); - assert_eq!( - Balances::free_balance(owners[0]), - init_balance + extra_deposits[0] + extra_deposits[1] - ); - assert_eq!(Balances::free_balance(owners[1]), init_balance + extra_deposits[2]); - }) - } - - #[test] - fn test_no_storage_change_happens_if_destroy_fails() { - new_test_ext().execute_with(|| { - let extra_deposit = 20; - let collection_id = 0; - let item_id = 10; - let collection_owner = 1; - let item_owner = 42; - let init_balance = 100; - - Balances::make_free_balance_be(&collection_owner, init_balance); - Balances::make_free_balance_be(&item_owner, init_balance); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_owner, - 100 - )); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection_id, - item_id, - item_owner, - extra_deposit - )); - - // This wrong witness should make the destroy fail - let witness = DestroyWitness { - items: 2, - item_metadatas: 0, - attributes: 0, - }; - - assert_noop!( - Uniques::destroy(RuntimeOrigin::signed(1), collection_id, witness), - pallet_uniques::Error::::BadWitness - ); - - assert_eq!( - ItemExtraDeposits::::get(collection_id, item_id).unwrap(), - extra_deposit - ); - }) - } - - #[test] - fn test_no_storage_change_happens_if_burn_fails() { - new_test_ext().execute_with(|| { - let extra_deposit = 20; - let collection_id = 0; - let item_id = 10; - let collection_owner = 1; - let non_owner = 2; - let item_owner = 42; - let init_balance = 100; - - Balances::make_free_balance_be(&collection_owner, init_balance); - Balances::make_free_balance_be(&item_owner, init_balance); - - assert_ok!(Uniques::create_with_extra_deposit_limit( - RuntimeOrigin::signed(collection_owner), - collection_id, - collection_owner, - 100 - )); - - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner), - collection_id, - item_id, - item_owner, - extra_deposit - )); - - assert_noop!( - Uniques::burn(RuntimeOrigin::signed(non_owner), collection_id, item_id, None), - pallet_uniques::Error::::NoPermission - ); - - assert_eq!( - ItemExtraDeposits::::get(collection_id, item_id).unwrap(), - extra_deposit - ); - }) - } -} diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs deleted file mode 100644 index 2a4ba2ad6c8..00000000000 --- a/pallets/uniques/src/weights.rs +++ /dev/null @@ -1,401 +0,0 @@ -/* - * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain - * Copyright (C) 2020-2022 Nodle International - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -//! Autogenerated weights for pallet_nodle_uniques -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-08-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-66242306`, CPU: `AMD EPYC 7B13` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/nodle-parachain -// benchmark -// pallet -// --chain=dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_nodle_uniques -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --template=./.maintain/internal_pallet_weights.hbs -// --output=temp_weights - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}}; -use core::marker::PhantomData; - -/// Weight functions needed for pallet_nodle_uniques. -pub trait WeightInfo { - fn destroy(n: u32, m: u32, a: u32, ) -> Weight; - fn mint_with_extra_deposit() -> Weight; - fn burn() -> Weight; - fn create_with_extra_deposit_limit() -> Weight; - fn transfer_ownership() -> Weight; - fn update_extra_deposit_limit() -> Weight; -} - -/// Weight functions for `pallet_nodle_uniques`. -pub struct SubstrateWeight(PhantomData); -impl WeightInfo for SubstrateWeight { - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques ItemExtraDeposits (r:1001 w:1000) - // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1001 w:1000) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: SubstrateUniques Attribute (r:1000 w:1000) - // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) - // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1000) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) - // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// The range of component `n` is `[0, 1000]`. - /// The range of component `m` is `[0, 1000]`. - /// The range of component `a` is `[0, 1000]`. - fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 3_419_681 nanoseconds. - Weight::from_parts(3_431_080_000_u64, 0) - // Standard Error: 32_660 - .saturating_add(Weight::from_parts(38_598_337_u64, 0).saturating_mul(n as u64)) - // Standard Error: 32_660 - .saturating_add(Weight::from_parts(333_521_u64, 0).saturating_mul(m as u64)) - // Standard Error: 32_660 - .saturating_add(Weight::from_parts(270_245_u64, 0).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a as u64))) - .saturating_add(T::DbWeight::get().writes(8_u64)) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m as u64))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a as u64))) - } - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) - // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques ItemExtraDeposits (r:0 w:1) - // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 99_300 nanoseconds. - Weight::from_parts(101_730_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(9_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques ItemExtraDeposits (r:1 w:1) - // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) - // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) - fn burn() -> Weight { - // Minimum execution time: 97_760 nanoseconds. - Weight::from_parts(99_120_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - fn create_with_extra_deposit_limit() -> Weight { - // Minimum execution time: 59_440 nanoseconds. - Weight::from_parts(60_520_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) - } - // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) - // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques CollectionExtraDepositDetails (r:1 w:0) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassAccount (r:0 w:2) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - fn transfer_ownership() -> Weight { - // Minimum execution time: 90_020 nanoseconds. - Weight::from_parts(91_620_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(9_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn update_extra_deposit_limit() -> Weight { - // Minimum execution time: 32_170 nanoseconds. - Weight::from_parts(32_890_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } -} - -impl WeightInfo for () { - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques ItemExtraDeposits (r:1001 w:1000) - // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1001 w:1000) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: SubstrateUniques Attribute (r:1000 w:1000) - // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) - // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1000) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) - // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// The range of component `n` is `[0, 1000]`. - /// The range of component `m` is `[0, 1000]`. - /// The range of component `a` is `[0, 1000]`. - fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 3_419_681 nanoseconds. - Weight::from_parts(3_431_080_000_u64, 0) - // Standard Error: 32_660 - .saturating_add(Weight::from_parts(38_598_337_u64, 0).saturating_mul(n as u64)) - // Standard Error: 32_660 - .saturating_add(Weight::from_parts(333_521_u64, 0).saturating_mul(m as u64)) - // Standard Error: 32_660 - .saturating_add(Weight::from_parts(270_245_u64, 0).saturating_mul(a as u64)) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n as u64))) - .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m as u64))) - .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a as u64))) - .saturating_add(RocksDbWeight::get().writes(8_u64)) - .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n as u64))) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(m as u64))) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a as u64))) - } - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) - // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques ItemExtraDeposits (r:0 w:1) - // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 99_300 nanoseconds. - Weight::from_parts(101_730_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(9_u64)) - .saturating_add(RocksDbWeight::get().writes(8_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques ItemExtraDeposits (r:1 w:1) - // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) - // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) - fn burn() -> Weight { - // Minimum execution time: 97_760 nanoseconds. - Weight::from_parts(99_120_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().writes(8_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - fn create_with_extra_deposit_limit() -> Weight { - // Minimum execution time: 59_440 nanoseconds. - Weight::from_parts(60_520_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(6_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) - } - // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) - // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques CollectionExtraDepositDetails (r:1 w:0) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassAccount (r:0 w:2) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - fn transfer_ownership() -> Weight { - // Minimum execution time: 90_020 nanoseconds. - Weight::from_parts(91_620_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(9_u64)) - .saturating_add(RocksDbWeight::get().writes(8_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) - // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn update_extra_deposit_limit() -> Weight { - // Minimum execution time: 32_170 nanoseconds. - Weight::from_parts(32_890_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(6_u64)) - .saturating_add(RocksDbWeight::get().writes(3_u64)) - } -} From 04b08fe6ac3cf2b27abafd45374f296ee2cda562 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 20 Sep 2023 14:33:06 +0900 Subject: [PATCH 06/68] Pallet consensus new interface https://github.com/paritytech/cumulus/issues/2782 https://github.com/paritytech/cumulus/pull/2801 --- runtimes/eden/src/pallets_consensus.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/runtimes/eden/src/pallets_consensus.rs b/runtimes/eden/src/pallets_consensus.rs index 7e79fae8d87..dbdc5e3644e 100644 --- a/runtimes/eden/src/pallets_consensus.rs +++ b/runtimes/eden/src/pallets_consensus.rs @@ -78,7 +78,6 @@ impl pallet_collator_selection::Config for Runtime { type UpdateOrigin = EnsureRootOrMoreThanHalfOfTechComm; type PotId = PotId; type MaxCandidates = MaxCandidates; - type MinCandidates = MinCandidates; type MaxInvulnerables = MaxInvulnerables; type KickThreshold = Period; type ValidatorId = AccountId; From c1ed1593db3a88996d1ad11050ac6cab301b5ff4 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 20 Sep 2023 16:28:12 +0900 Subject: [PATCH 07/68] Cleanup integration Clean up benchmarks Clean up type depencies --- pallets/grants/src/benchmarking.rs | 2 +- runtimes/eden/src/lib.rs | 17 +- runtimes/eden/src/pallets_system.rs | 8 +- runtimes/eden/src/weights/pallet_contracts.rs | 388 +----------------- 4 files changed, 33 insertions(+), 382 deletions(-) diff --git a/pallets/grants/src/benchmarking.rs b/pallets/grants/src/benchmarking.rs index b11d76e0b1d..7e07944a882 100644 --- a/pallets/grants/src/benchmarking.rs +++ b/pallets/grants/src/benchmarking.rs @@ -35,7 +35,7 @@ struct BenchmarkConfig { grantee: T::AccountId, grantee_lookup: ::Source, collector_lookup: ::Source, - schedule: VestingSchedule>, + schedule: VestingSchedule, BalanceOf>, } fn create_shared_config(u: u32) -> BenchmarkConfig { diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 90d2e2523f8..ca9351e2dd5 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -37,7 +37,7 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { use constants::RuntimeBlockWeights; use frame_support::{construct_runtime, weights::Weight}; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; -use primitives::{AccountId, Balance, BlockNumber, Hash, Index, Signature}; +use primitives::{AccountId, Balance, BlockNumber, Hash, Header, Index, Signature}; pub use primitives::{AuraId, ParaId}; use sp_core::OpaqueMetadata; #[cfg(any(feature = "std", test))] @@ -96,7 +96,7 @@ construct_runtime! { Authorship: pallet_authorship = 20, Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 23, Aura: pallet_aura::{Pallet, Config, Storage} = 24, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Config, Storage} = 25, + AuraExt: cumulus_pallet_aura_ext::{Pallet, Config, Storage} = 25, // Parachain ParachainSystem: cumulus_pallet_parachain_system = 30, @@ -104,7 +104,7 @@ construct_runtime! { CumulusXcm: cumulus_pallet_xcm = 32, DmpQueue: cumulus_pallet_dmp_queue = 33, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 34, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 35, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 35, XTokens: orml_xtokens::{Pallet, Call, Storage, Event} = 36, // Neat things @@ -129,6 +129,7 @@ construct_runtime! { /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; +/// Block type as expected by this runtime. pub type Block = generic::Block; /// A Block signed with a Justification @@ -161,6 +162,10 @@ pub type XcmGenericBenchmarks = pallet_xcm_benchmarks::generic::Pallet; #[cfg(feature = "runtime-benchmarks")] pub type XcmFungibleBenchmarks = pallet_xcm_benchmarks::fungible::Pallet; +type EventRecord = frame_system::EventRecord< + ::RuntimeEvent, + ::Hash, +>; sp_api::impl_runtime_apis! { impl sp_consensus_aura::AuraApi for Runtime { fn slot_duration() -> sp_consensus_aura::SlotDuration { @@ -278,7 +283,7 @@ sp_api::impl_runtime_apis! { } } - impl pallet_contracts::ContractsApi + impl pallet_contracts::ContractsApi for Runtime { fn call( @@ -288,7 +293,7 @@ sp_api::impl_runtime_apis! { gas_limit: Option, storage_deposit_limit: Option, input_data: Vec, - ) -> pallet_contracts_primitives::ContractExecResult { + ) -> pallet_contracts_primitives::ContractExecResult { let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block); Contracts::bare_call( origin, @@ -310,7 +315,7 @@ sp_api::impl_runtime_apis! { code: pallet_contracts_primitives::Code, data: Vec, salt: Vec, - ) -> pallet_contracts_primitives::ContractInstantiateResult { + ) -> pallet_contracts_primitives::ContractInstantiateResult { let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block); Contracts::bare_instantiate( origin, diff --git a/runtimes/eden/src/pallets_system.rs b/runtimes/eden/src/pallets_system.rs index d291dc89756..e40a2d18b45 100644 --- a/runtimes/eden/src/pallets_system.rs +++ b/runtimes/eden/src/pallets_system.rs @@ -55,13 +55,13 @@ impl frame_system::Config for Runtime { type DbWeight = RocksDbWeight; type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + // type Index = Index; + // type BlockNumber = BlockNumber; type Hash = Hash; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = AccountIdLookup; - type Header = generic::Header; + // type Header = generic::Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = Version; @@ -105,7 +105,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = crate::weights::pallet_balances::WeightInfo; type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; - type HoldIdentifier = (); + // type HoldIdentifier = (); type FreezeIdentifier = (); } diff --git a/runtimes/eden/src/weights/pallet_contracts.rs b/runtimes/eden/src/weights/pallet_contracts.rs index 4ccda3d9f55..084829f5e2d 100644 --- a/runtimes/eden/src/weights/pallet_contracts.rs +++ b/runtimes/eden/src/weights/pallet_contracts.rs @@ -72,14 +72,14 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: Contracts CodeStorage (r:0 w:1) // Proof: Contracts CodeStorage (max_values: None, max_size: Some(126004), added: 128479, mode: Measured) /// The range of component `c` is `[0, 61717]`. - fn reinstrument(c: u32, ) -> Weight { - // Minimum execution time: 47_540 nanoseconds. - Weight::from_parts(53_032_900_u64, 0) - // Standard Error: 45 - .saturating_add(Weight::from_parts(65_453_u64, 0).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } + // fn reinstrument(c: u32, ) -> Weight { + // // Minimum execution time: 47_540 nanoseconds. + // Weight::from_parts(53_032_900_u64, 0) + // // Standard Error: 45 + // .saturating_add(Weight::from_parts(65_453_u64, 0).saturating_mul(c as u64)) + // .saturating_add(T::DbWeight::get().reads(1_u64)) + // .saturating_add(T::DbWeight::get().writes(1_u64)) + // } // Storage: Balances TotalIssuance (r:1 w:0) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: Measured) // Storage: Contracts ContractInfoOf (r:1 w:1) @@ -681,14 +681,14 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: System EventTopics (r:2 w:2) // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. - fn seal_gas(r: u32, ) -> Weight { - // Minimum execution time: 279_350 nanoseconds. - Weight::from_parts(293_089_067_u64, 0) - // Standard Error: 286 - .saturating_add(Weight::from_parts(144_239_u64, 0).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().writes(5_u64)) - } + // fn seal_gas(r: u32, ) -> Weight { + // // Minimum execution time: 279_350 nanoseconds. + // Weight::from_parts(293_089_067_u64, 0) + // // Standard Error: 286 + // .saturating_add(Weight::from_parts(144_239_u64, 0).saturating_mul(r as u64)) + // .saturating_add(T::DbWeight::get().reads(11_u64)) + // .saturating_add(T::DbWeight::get().writes(5_u64)) + // } // Storage: System Account (r:1 w:0) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) // Storage: Balances TotalIssuance (r:1 w:0) @@ -1796,359 +1796,5 @@ impl pallet_contracts::weights::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64const(r: u32, ) -> Weight { - // Minimum execution time: 3_120 nanoseconds. - Weight::from_parts(3_530_155_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(2_125_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64load(r: u32, ) -> Weight { - // Minimum execution time: 3_450 nanoseconds. - Weight::from_parts(4_073_367_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_252_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64store(r: u32, ) -> Weight { - // Minimum execution time: 3_470 nanoseconds. - Weight::from_parts(4_113_724_u64, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(6_709_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_select(r: u32, ) -> Weight { - // Minimum execution time: 3_200 nanoseconds. - Weight::from_parts(3_677_945_u64, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(6_758_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_if(r: u32, ) -> Weight { - // Minimum execution time: 3_210 nanoseconds. - Weight::from_parts(3_558_541_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(6_772_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_br(r: u32, ) -> Weight { - // Minimum execution time: 3_120 nanoseconds. - Weight::from_parts(3_793_792_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_527_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_br_if(r: u32, ) -> Weight { - // Minimum execution time: 3_120 nanoseconds. - Weight::from_parts(3_774_570_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_721_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_br_table(r: u32, ) -> Weight { - // Minimum execution time: 3_190 nanoseconds. - Weight::from_parts(3_943_785_u64, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(7_504_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `e` is `[1, 256]`. - fn instr_br_table_per_entry(_e: u32, ) -> Weight { - // Minimum execution time: 3_200 nanoseconds. - Weight::from_parts(3_543_284_u64, 0) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_call(r: u32, ) -> Weight { - // Minimum execution time: 3_231 nanoseconds. - Weight::from_parts(3_604_679_u64, 0) - // Standard Error: 17 - .saturating_add(Weight::from_parts(18_278_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_call_indirect(r: u32, ) -> Weight { - // Minimum execution time: 3_649 nanoseconds. - Weight::from_parts(6_403_031_u64, 0) - // Standard Error: 36 - .saturating_add(Weight::from_parts(26_858_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `l` is `[0, 1024]`. - fn instr_call_per_local(l: u32, ) -> Weight { - // Minimum execution time: 3_260 nanoseconds. - Weight::from_parts(3_714_066_u64, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(1_545_u64, 0).saturating_mul(l as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_local_get(r: u32, ) -> Weight { - // Minimum execution time: 4_829 nanoseconds. - Weight::from_parts(5_240_157_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(2_182_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_local_set(r: u32, ) -> Weight { - // Minimum execution time: 4_780 nanoseconds. - Weight::from_parts(5_345_445_u64, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(2_740_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_local_tee(r: u32, ) -> Weight { - // Minimum execution time: 4_829 nanoseconds. - Weight::from_parts(5_399_426_u64, 0) - // Standard Error: 20 - .saturating_add(Weight::from_parts(3_627_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_global_get(r: u32, ) -> Weight { - // Minimum execution time: 3_500 nanoseconds. - Weight::from_parts(4_003_486_u64, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(9_257_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_global_set(r: u32, ) -> Weight { - // Minimum execution time: 3_500 nanoseconds. - Weight::from_parts(3_913_541_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(9_607_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_memory_current(r: u32, ) -> Weight { - // Minimum execution time: 3_511 nanoseconds. - Weight::from_parts(3_781_728_u64, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(4_066_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 16]`. - fn instr_memory_grow(r: u32, ) -> Weight { - // Minimum execution time: 3_260 nanoseconds. - Weight::from_parts(1_594_757_u64, 0) - // Standard Error: 178_376 - .saturating_add(Weight::from_parts(16_292_955_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64clz(r: u32, ) -> Weight { - // Minimum execution time: 3_160 nanoseconds. - Weight::from_parts(3_530_405_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_314_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64ctz(r: u32, ) -> Weight { - // Minimum execution time: 3_160 nanoseconds. - Weight::from_parts(3_555_169_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_307_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64popcnt(r: u32, ) -> Weight { - // Minimum execution time: 3_140 nanoseconds. - Weight::from_parts(3_559_163_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_308_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64eqz(r: u32, ) -> Weight { - // Minimum execution time: 3_100 nanoseconds. - Weight::from_parts(3_535_724_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_582_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64extendsi32(r: u32, ) -> Weight { - // Minimum execution time: 3_040 nanoseconds. - Weight::from_parts(3_553_107_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_281_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64extendui32(r: u32, ) -> Weight { - // Minimum execution time: 3_110 nanoseconds. - Weight::from_parts(3_559_484_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_276_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i32wrapi64(r: u32, ) -> Weight { - // Minimum execution time: 3_160 nanoseconds. - Weight::from_parts(3_561_650_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_304_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64eq(r: u32, ) -> Weight { - // Minimum execution time: 3_220 nanoseconds. - Weight::from_parts(3_684_131_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_155_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64ne(r: u32, ) -> Weight { - // Minimum execution time: 3_230 nanoseconds. - Weight::from_parts(3_650_659_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_753_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64lts(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_649_867_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_736_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64ltu(r: u32, ) -> Weight { - // Minimum execution time: 3_169 nanoseconds. - Weight::from_parts(3_635_020_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_750_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64gts(r: u32, ) -> Weight { - // Minimum execution time: 3_240 nanoseconds. - Weight::from_parts(3_638_145_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_741_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64gtu(r: u32, ) -> Weight { - // Minimum execution time: 3_170 nanoseconds. - Weight::from_parts(3_642_749_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(4_745_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64les(r: u32, ) -> Weight { - // Minimum execution time: 3_240 nanoseconds. - Weight::from_parts(3_640_758_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_744_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64leu(r: u32, ) -> Weight { - // Minimum execution time: 3_220 nanoseconds. - Weight::from_parts(3_679_178_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(4_739_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64ges(r: u32, ) -> Weight { - // Minimum execution time: 3_140 nanoseconds. - Weight::from_parts(3_663_759_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_743_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64geu(r: u32, ) -> Weight { - // Minimum execution time: 3_160 nanoseconds. - Weight::from_parts(3_670_359_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(4_745_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64add(r: u32, ) -> Weight { - // Minimum execution time: 3_231 nanoseconds. - Weight::from_parts(3_693_238_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_738_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64sub(r: u32, ) -> Weight { - // Minimum execution time: 3_140 nanoseconds. - Weight::from_parts(3_674_466_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_745_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64mul(r: u32, ) -> Weight { - // Minimum execution time: 3_190 nanoseconds. - Weight::from_parts(3_683_610_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_745_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64divs(r: u32, ) -> Weight { - // Minimum execution time: 3_210 nanoseconds. - Weight::from_parts(3_704_333_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_888_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64divu(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_714_630_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_310_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64rems(r: u32, ) -> Weight { - // Minimum execution time: 3_100 nanoseconds. - Weight::from_parts(3_681_698_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_609_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64remu(r: u32, ) -> Weight { - // Minimum execution time: 3_170 nanoseconds. - Weight::from_parts(3_656_292_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_320_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64and(r: u32, ) -> Weight { - // Minimum execution time: 3_260 nanoseconds. - Weight::from_parts(3_683_845_u64, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(4_748_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64or(r: u32, ) -> Weight { - // Minimum execution time: 3_190 nanoseconds. - Weight::from_parts(3_673_467_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_752_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64xor(r: u32, ) -> Weight { - // Minimum execution time: 3_190 nanoseconds. - Weight::from_parts(3_697_018_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(4_747_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64shl(r: u32, ) -> Weight { - // Minimum execution time: 3_220 nanoseconds. - Weight::from_parts(3_681_441_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(4_750_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64shrs(r: u32, ) -> Weight { - // Minimum execution time: 3_170 nanoseconds. - Weight::from_parts(3_676_811_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_747_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64shru(r: u32, ) -> Weight { - // Minimum execution time: 3_200 nanoseconds. - Weight::from_parts(3_681_752_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_750_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64rotl(r: u32, ) -> Weight { - // Minimum execution time: 3_210 nanoseconds. - Weight::from_parts(3_701_009_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_743_u64, 0).saturating_mul(r as u64)) - } - /// The range of component `r` is `[0, 5000]`. - fn instr_i64rotr(r: u32, ) -> Weight { - // Minimum execution time: 3_169 nanoseconds. - Weight::from_parts(3_683_242_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(4_752_u64, 0).saturating_mul(r as u64)) - } + } From 5ac1d9e6f41596d76df41d84e996364e3e639b82 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 20 Sep 2023 16:32:02 +0900 Subject: [PATCH 08/68] Auto reformat --- pallets/allocations/src/lib.rs | 6 +++++- pallets/grants/src/lib.rs | 10 ++-------- pallets/reserve/src/lib.rs | 5 ++--- runtimes/eden/src/lib.rs | 6 ++---- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/pallets/allocations/src/lib.rs b/pallets/allocations/src/lib.rs index c2a422b2bb5..37699d553ac 100644 --- a/pallets/allocations/src/lib.rs +++ b/pallets/allocations/src/lib.rs @@ -131,7 +131,11 @@ impl MintCurve { } /// Helper function to calculate the very next schedule based on the current block number. - fn next_schedule(n: BlockNumberFor, curve_start: BlockNumberFor, period: BlockNumberFor) -> BlockNumberFor { + fn next_schedule( + n: BlockNumberFor, + curve_start: BlockNumberFor, + period: BlockNumberFor, + ) -> BlockNumberFor { if n >= curve_start { n.saturating_sub(curve_start) .checked_div(&period) diff --git a/pallets/grants/src/lib.rs b/pallets/grants/src/lib.rs index ae37a0c8766..4cae23dd416 100644 --- a/pallets/grants/src/lib.rs +++ b/pallets/grants/src/lib.rs @@ -28,11 +28,10 @@ mod tests; use codec::{Decode, Encode}; use frame_support::{ - DefaultNoBound, ensure, pallet_prelude::{MaxEncodedLen, TypeInfo}, traits::{Currency, ExistenceRequirement, GenesisBuild, LockIdentifier, LockableCurrency, WithdrawReasons}, - BoundedVec, + BoundedVec, DefaultNoBound, }; use sp_runtime::{ traits::{AtLeast32Bit, BlockNumberProvider, CheckedAdd, Saturating, StaticLookup, Zero}, @@ -63,12 +62,7 @@ enum Releases { pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; pub type VestingScheduleOf = VestingSchedule, BalanceOf>; pub type ListVestingScheduleOf = Vec>; -pub type ScheduledGrant = ( - BlockNumberFor, - BlockNumberFor, - u32, - BalanceOf, -); +pub type ScheduledGrant = (BlockNumberFor, BlockNumberFor, u32, BalanceOf); pub type ScheduledItem = (::AccountId, Vec>); /// The vesting schedule. diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index 411f16148b7..11969a183c9 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -27,14 +27,13 @@ mod tests; use frame_support::{ dispatch::GetDispatchInfo, - traits::{Currency, ExistenceRequirement,GenesisBuild, Get, Imbalance, OnUnbalanced}, + traits::{Currency, ExistenceRequirement, GenesisBuild, Get, Imbalance, OnUnbalanced}, PalletId, }; use sp_runtime::traits::{AccountIdConversion, Dispatchable}; use sp_std::prelude::Box; use support::WithAccountId; - pub mod weights; pub use weights::WeightInfo; @@ -48,9 +47,9 @@ type NegativeImbalanceOf = pub mod pallet { use super::*; use frame_support::pallet_prelude::*; + use frame_support::traits::GenesisBuild; use frame_support::DefaultNoBound; use frame_system::pallet_prelude::*; - use frame_support::traits::GenesisBuild; #[pallet::config] pub trait Config: frame_system::Config { diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index ca9351e2dd5..a1c36535b79 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -162,10 +162,8 @@ pub type XcmGenericBenchmarks = pallet_xcm_benchmarks::generic::Pallet; #[cfg(feature = "runtime-benchmarks")] pub type XcmFungibleBenchmarks = pallet_xcm_benchmarks::fungible::Pallet; -type EventRecord = frame_system::EventRecord< - ::RuntimeEvent, - ::Hash, ->; +type EventRecord = + frame_system::EventRecord<::RuntimeEvent, ::Hash>; sp_api::impl_runtime_apis! { impl sp_consensus_aura::AuraApi for Runtime { fn slot_duration() -> sp_consensus_aura::SlotDuration { From ea4c01381c2ce4b864993d6786c909b9c916b8be Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 21 Sep 2023 12:30:18 +0900 Subject: [PATCH 09/68] construct_runtime --- runtimes/eden/src/lib.rs | 16 ++++++++-------- runtimes/eden/src/pallets_system.rs | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index a1c36535b79..b6709d19f60 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -37,7 +37,7 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { use constants::RuntimeBlockWeights; use frame_support::{construct_runtime, weights::Weight}; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; -use primitives::{AccountId, Balance, BlockNumber, Hash, Header, Index, Signature}; +use primitives::{AccountId, Balance, BlockNumber, Hash, Index, Signature}; pub use primitives::{AuraId, ParaId}; use sp_core::OpaqueMetadata; #[cfg(any(feature = "std", test))] @@ -69,11 +69,7 @@ pub use version::native_version; pub use version::VERSION; construct_runtime! { - pub enum Runtime where - Block = Block, - NodeBlock = primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { + pub enum Runtime { // System System: frame_system = 0, Timestamp: pallet_timestamp = 1, @@ -128,10 +124,10 @@ construct_runtime! { } /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; - +/// Block header type as expected by this runtime. +pub type Header = generic::Header; /// Block type as expected by this runtime. pub type Block = generic::Block; - /// A Block signed with a Justification pub type SignedBlock = generic::SignedBlock; /// BlockId type as expected by this runtime. @@ -164,6 +160,10 @@ pub type XcmFungibleBenchmarks = pallet_xcm_benchmarks::fungible::Pallet::RuntimeEvent, ::Hash>; + +/// Index of a transaction in the chain. +pub type Nonce = u32; + sp_api::impl_runtime_apis! { impl sp_consensus_aura::AuraApi for Runtime { fn slot_duration() -> sp_consensus_aura::SlotDuration { diff --git a/runtimes/eden/src/pallets_system.rs b/runtimes/eden/src/pallets_system.rs index e40a2d18b45..2a67a44c611 100644 --- a/runtimes/eden/src/pallets_system.rs +++ b/runtimes/eden/src/pallets_system.rs @@ -73,6 +73,8 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; + /// The type for storing how many extrinsics an account has signed. + type Nonce = Self::Nonce; } parameter_types! { From 2043a7848366e0f9ce5351bde97b7b227818a6ad Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 25 Sep 2023 09:26:08 +0900 Subject: [PATCH 10/68] Index of a transaction in the chain. +/// Index of a transaction in the chain. +pub type Nonce = u32; --- Cargo.lock | 87 ++++++++++++----------------- runtimes/eden/src/lib.rs | 7 ++- runtimes/eden/src/pallets_system.rs | 4 -- 3 files changed, 41 insertions(+), 57 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 62dd81987a1..9e9c0bc2b1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0b45430fa9661f457981503dd5bf0" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -629,16 +629,15 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", "cfg-if", "constant_time_eq", - "digest 0.10.7", ] [[package]] @@ -1294,16 +1293,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.3" @@ -1978,9 +1967,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622178105f911d937a42cdb140730ba4a3ed2becd8ae6ce39c7d28b5d75d4588" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", @@ -2385,9 +2374,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ecdsa" @@ -2452,7 +2441,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "curve25519-dalek 4.1.0", + "curve25519-dalek 4.1.1", "ed25519 2.2.2", "rand_core 0.6.4", "serde", @@ -3162,7 +3151,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.13", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -3524,9 +3513,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -3914,7 +3903,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] @@ -3949,8 +3938,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.13", + "hermit-abi 0.3.3", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -5085,7 +5074,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.13", + "rustix 0.38.14", ] [[package]] @@ -5601,7 +5590,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", ] @@ -8827,9 +8816,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", "rand 0.8.5", @@ -8946,9 +8935,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -8956,14 +8945,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -9488,9 +9475,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ "bitflags 2.4.0", "errno", @@ -11144,9 +11131,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "snap" @@ -11163,7 +11150,7 @@ dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.1.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "ring", "rustc_version 0.4.0", @@ -12261,7 +12248,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.13", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -12505,9 +12492,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -12906,9 +12893,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -13813,7 +13800,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.13", + "rustix 0.38.14", ] [[package]] @@ -13850,9 +13837,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -14092,7 +14079,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.1.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "serde", "zeroize", diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index b6709d19f60..f1adfb25601 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -42,9 +42,10 @@ pub use primitives::{AuraId, ParaId}; use sp_core::OpaqueMetadata; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; + use sp_runtime::{ generic, - traits::{BlakeTwo256, Block as BlockT}, + traits::{BlakeTwo256, Extrinsic, Block as BlockT}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -132,6 +133,8 @@ pub type Block = generic::Block; pub type SignedBlock = generic::SignedBlock; /// BlockId type as expected by this runtime. pub type BlockId = generic::BlockId; +/// Index of a transaction in the chain. +pub type Nonce = u32; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( frame_system::CheckSpecVersion, @@ -161,8 +164,6 @@ pub type XcmFungibleBenchmarks = pallet_xcm_benchmarks::fungible::Pallet::RuntimeEvent, ::Hash>; -/// Index of a transaction in the chain. -pub type Nonce = u32; sp_api::impl_runtime_apis! { impl sp_consensus_aura::AuraApi for Runtime { diff --git a/runtimes/eden/src/pallets_system.rs b/runtimes/eden/src/pallets_system.rs index 2a67a44c611..cf1e3979337 100644 --- a/runtimes/eden/src/pallets_system.rs +++ b/runtimes/eden/src/pallets_system.rs @@ -55,13 +55,10 @@ impl frame_system::Config for Runtime { type DbWeight = RocksDbWeight; type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - // type Index = Index; - // type BlockNumber = BlockNumber; type Hash = Hash; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = AccountIdLookup; - // type Header = generic::Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = Version; @@ -107,7 +104,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = crate::weights::pallet_balances::WeightInfo; type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; - // type HoldIdentifier = (); type FreezeIdentifier = (); } From 742483a7de0281c7b904ecb4ec78f66a2656935c Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 25 Sep 2023 15:18:51 +0900 Subject: [PATCH 11/68] Auto reformat --- runtimes/eden/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index f1adfb25601..b48cd46d2f2 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -45,7 +45,7 @@ pub use sp_runtime::BuildStorage; use sp_runtime::{ generic, - traits::{BlakeTwo256, Extrinsic, Block as BlockT}, + traits::{BlakeTwo256, Block as BlockT, Extrinsic}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -133,6 +133,7 @@ pub type Block = generic::Block; pub type SignedBlock = generic::SignedBlock; /// BlockId type as expected by this runtime. pub type BlockId = generic::BlockId; + /// Index of a transaction in the chain. pub type Nonce = u32; /// The SignedExtension to the basic transaction logic. @@ -164,7 +165,6 @@ pub type XcmFungibleBenchmarks = pallet_xcm_benchmarks::fungible::Pallet::RuntimeEvent, ::Hash>; - sp_api::impl_runtime_apis! { impl sp_consensus_aura::AuraApi for Runtime { fn slot_duration() -> sp_consensus_aura::SlotDuration { From 9c3027310208836f680d0ddcc950a6af3c68f0ed Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 25 Sep 2023 15:40:26 +0900 Subject: [PATCH 12/68] CI: Allow warnings --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6caa5d148ca..69356b2aa86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ env: try-runtime-uri: wss://eden-rpc.dwellir.com:443/ SCCACHE_GHA_ENABLED: "true" RUSTC_WRAPPER: "sccache" + RUSTFLAGS: "" jobs: lints: From db277c0de439924140dfce0b80db4d6b7e3918b7 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 25 Sep 2023 15:57:39 +0900 Subject: [PATCH 13/68] Remove index and blocknumber from grant and allocation tests --- pallets/allocations/src/tests.rs | 11 +++-------- pallets/grants/src/mock.rs | 9 ++------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/pallets/allocations/src/tests.rs b/pallets/allocations/src/tests.rs index 942f58a3d4d..c514ca782e1 100644 --- a/pallets/allocations/src/tests.rs +++ b/pallets/allocations/src/tests.rs @@ -42,12 +42,8 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + pub enum Test { + System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, Membership: pallet_membership::{Pallet, Call, Storage, Config, Event}, Allocations: pallet_allocations::{Pallet, Call, Storage, Event}, @@ -63,9 +59,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type SS58Prefix = (); - type Index = u64; - type BlockNumber = u64; type Hash = H256; + type Block = Block; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; diff --git a/pallets/grants/src/mock.rs b/pallets/grants/src/mock.rs index e632dd2a306..f5b627b5170 100644 --- a/pallets/grants/src/mock.rs +++ b/pallets/grants/src/mock.rs @@ -32,11 +32,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system::{Pallet, Call, Config, Storage, Event}, PalletBalances: pallet_balances::{Pallet, Call, Config, Storage, Event}, Vesting: vesting::{Pallet, Call, Storage, Event, Config}, @@ -54,8 +50,6 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type SS58Prefix = (); - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = AccountId; @@ -68,6 +62,7 @@ impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; type OnNewAccount = (); type OnKilledAccount = (); + type Block = Block; type DbWeight = (); type BaseCallFilter = frame_support::traits::Everything; type OnSetCode = (); From 44efa733386d5568ed2b113fabe248e903dd7099 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 25 Sep 2023 15:58:42 +0900 Subject: [PATCH 14/68] Update Cargo.lock --- Cargo.lock | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9e9c0bc2b1b..031f214d786 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,9 +115,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead 0.5.2", "aes 0.8.3", @@ -814,7 +814,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.18", + "semver 1.0.19", "serde", "serde_json", "thiserror", @@ -1013,9 +1013,9 @@ checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "coarsetime" -version = "0.1.23" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90d114103adbc625300f346d4d09dfb4ab1c4a8df6868435dd903392ecf4354" +checksum = "99280f81a35511dda7d44f7c943491b41d3ac6fd0b54aea92498bec8612a2423" dependencies = [ "libc", "once_cell", @@ -3828,9 +3828,9 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -5045,9 +5045,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "rawpointer", @@ -5055,10 +5055,11 @@ dependencies = [ [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest 0.10.7", ] @@ -9433,7 +9434,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.18", + "semver 1.0.19", ] [[package]] @@ -9519,7 +9520,7 @@ checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "rustls-webpki 0.101.5", + "rustls-webpki 0.101.6", "sct 0.7.0", ] @@ -9556,9 +9557,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.5" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -10907,9 +10908,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" dependencies = [ "serde", ] @@ -10975,9 +10976,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -12348,9 +12349,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", "itoa", @@ -12361,15 +12362,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -13539,7 +13540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" dependencies = [ "aes 0.6.0", - "aes-gcm 0.10.2", + "aes-gcm 0.10.3", "async-trait", "bincode", "block-modes", From bf66775a6efc85a9a8957f1566da115b4903ed1a Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 26 Sep 2023 15:19:02 +1300 Subject: [PATCH 15/68] fix(nodle-parachain): use the Nonce type as newly defined in the crate --- runtimes/eden/src/pallets_system.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/eden/src/pallets_system.rs b/runtimes/eden/src/pallets_system.rs index cf1e3979337..b4a5c1098d3 100644 --- a/runtimes/eden/src/pallets_system.rs +++ b/runtimes/eden/src/pallets_system.rs @@ -71,7 +71,7 @@ impl frame_system::Config for Runtime { type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; /// The type for storing how many extrinsics an account has signed. - type Nonce = Self::Nonce; + type Nonce = crate::Nonce; } parameter_types! { From 3b17c5457de6af382ef675760058542f6f8c0ef9 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Sep 2023 12:45:28 +0900 Subject: [PATCH 16/68] Implement missing members --- runtimes/eden/src/pallets_consensus.rs | 21 ++++++++- runtimes/eden/src/pallets_system.rs | 6 +++ runtimes/eden/src/pallets_util.rs | 1 + runtimes/eden/src/weights/frame_system.rs | 5 +++ .../src/weights/pallet_collator_selection.rs | 8 ++++ runtimes/eden/src/weights/pallet_contracts.rs | 44 +++++++++++++++++++ runtimes/eden/src/xcm_config.rs | 8 ++++ 7 files changed, 91 insertions(+), 2 deletions(-) diff --git a/runtimes/eden/src/pallets_consensus.rs b/runtimes/eden/src/pallets_consensus.rs index dbdc5e3644e..329599e22d5 100644 --- a/runtimes/eden/src/pallets_consensus.rs +++ b/runtimes/eden/src/pallets_consensus.rs @@ -20,7 +20,7 @@ use crate::{ constants, pallets_governance::EnsureRootOrMoreThanHalfOfTechComm, Aura, Balances, CollatorSelection, Runtime, RuntimeEvent, Session, }; -use frame_support::{parameter_types, PalletId}; +use frame_support::{parameter_types, PalletId, traits::ConstBool}; use primitives::{AccountId, AuraId}; use sp_runtime::impl_opaque_keys; use sp_std::prelude::*; @@ -61,6 +61,19 @@ impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; + #[doc = " Whether to allow block authors to create multiple blocks per slot."] + #[doc = ""] + #[doc = " If this is `true`, the pallet will allow slots to stay the same across sequential"] + #[doc = " blocks. If this is `false`, the pallet will require that subsequent blocks always have"] + #[doc = " higher slots than previous ones."] + #[doc = ""] + #[doc = " Regardless of the setting of this storage value, the pallet will always enforce the"] + #[doc = " invariant that slots don\\'t move backwards as the chain progresses."] + #[doc = ""] + #[doc = " The typical value for this should be \\'false\\' unless this pallet is being augmented by"] + #[doc = " another pallet which enforces some limitation on the number of blocks authors can create"] + #[doc = " using the same slot."] + type AllowMultipleBlocksPerSlot = ConstBool; } impl cumulus_pallet_aura_ext::Config for Runtime {} @@ -68,7 +81,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { pub const PotId: PalletId = PalletId(*b"PotStake"); pub const MaxCandidates: u32 = 1000; - pub const MinCandidates: u32 = 3; + pub const MinEligibleCollators: u32 = 3; pub const MaxInvulnerables: u32 = 50; } @@ -84,4 +97,8 @@ impl pallet_collator_selection::Config for Runtime { type ValidatorIdOf = pallet_collator_selection::IdentityCollator; type ValidatorRegistration = Session; type WeightInfo = crate::weights::pallet_collator_selection::WeightInfo; + #[doc = " Minimum number eligible collators. Should always be greater than zero. This includes"] + #[doc = " Invulnerable collators. This ensures that there will always be one collator who can"] + #[doc = " produce a block."] + type MinEligibleCollators = MinEligibleCollators; } diff --git a/runtimes/eden/src/pallets_system.rs b/runtimes/eden/src/pallets_system.rs index b4a5c1098d3..67adb655638 100644 --- a/runtimes/eden/src/pallets_system.rs +++ b/runtimes/eden/src/pallets_system.rs @@ -72,6 +72,9 @@ impl frame_system::Config for Runtime { type MaxConsumers = frame_support::traits::ConstU32<16>; /// The type for storing how many extrinsics an account has signed. type Nonce = crate::Nonce; + #[doc = " The Block type used by the runtime. This is used by `construct_runtime` to retrieve the"] + #[doc = " extrinsics or other block specific data as needed."] + type Block = crate::Block; } parameter_types! { @@ -105,6 +108,9 @@ impl pallet_balances::Config for Runtime { type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; type FreezeIdentifier = (); + + #[doc = " The overarching hold reason."] + type RuntimeHoldReason = (); } parameter_types! { diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 16490ce55be..6542720e3b5 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -208,4 +208,5 @@ impl pallet_contracts::Config for Runtime { type MaxStorageKeyLen = ConstU32<128>; type UnsafeUnstableInterface = ConstBool; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; + type Migrations = (); } diff --git a/runtimes/eden/src/weights/frame_system.rs b/runtimes/eden/src/weights/frame_system.rs index 3727c65890f..51a4309fc0a 100644 --- a/runtimes/eden/src/weights/frame_system.rs +++ b/runtimes/eden/src/weights/frame_system.rs @@ -112,4 +112,9 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p as u64))) } + + fn set_code() -> Weight { + + Default::default() + } } diff --git a/runtimes/eden/src/weights/pallet_collator_selection.rs b/runtimes/eden/src/weights/pallet_collator_selection.rs index 938bc1b6c4d..1a944655ad8 100644 --- a/runtimes/eden/src/weights/pallet_collator_selection.rs +++ b/runtimes/eden/src/weights/pallet_collator_selection.rs @@ -203,4 +203,12 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c as u64))) } + +fn add_invulnerable(_b: u32, _c: u32) -> Weight { + Default::default() + } + +fn remove_invulnerable(_b: u32) -> Weight { + Default::default() + } } diff --git a/runtimes/eden/src/weights/pallet_contracts.rs b/runtimes/eden/src/weights/pallet_contracts.rs index 084829f5e2d..aab64290287 100644 --- a/runtimes/eden/src/weights/pallet_contracts.rs +++ b/runtimes/eden/src/weights/pallet_contracts.rs @@ -1797,4 +1797,48 @@ impl pallet_contracts::weights::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().writes(6_u64)) } +fn v9_migration_step(c: u32, ) -> Weight { + Default::default() + } + +fn v10_migration_step() -> Weight { + Default::default() + } + +fn v11_migration_step(k: u32, ) -> Weight { + Default::default() + } + +fn v12_migration_step(c: u32, ) -> Weight { + Default::default() + } + +fn migration_noop() -> Weight { + Default::default() + } + +fn migrate() -> Weight { + Default::default() + } + +fn on_runtime_upgrade_noop() -> Weight { + Default::default() + } + +fn on_runtime_upgrade_in_progress() -> Weight { + Default::default() + } + +fn on_runtime_upgrade() -> Weight { + Default::default() + } + +fn seal_caller_is_root(r: u32, ) -> Weight { + Default::default() + } + +fn instr_i64const(r: u32, ) -> Weight { + Default::default() + } + } diff --git a/runtimes/eden/src/xcm_config.rs b/runtimes/eden/src/xcm_config.rs index f203ad83bb8..fa4d4d36b12 100644 --- a/runtimes/eden/src/xcm_config.rs +++ b/runtimes/eden/src/xcm_config.rs @@ -159,6 +159,8 @@ impl xcm_executor::Config for XcmConfig { type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; + + type Aliasers = Nothing ; // TODO check if it should be type Aliasers = AliasForeignAccountId32; } #[cfg(feature = "runtime-benchmarks")] @@ -190,6 +192,12 @@ impl pallet_xcm::Config for Runtime { type WeightInfo = crate::weights::pallet_xcm::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; + + #[doc = " The maximum number of consumers a single remote lock may have."] + type MaxRemoteLockConsumers = ConstU32<0>; + + #[doc = " The ID type for local consumers of remote locks."] + type RemoteLockConsumerIdentifier = (); } impl cumulus_pallet_xcmp_queue::Config for Runtime { From 76cfaff71c0aed12baea3ac0c2c9af014a44b2b3 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Sep 2023 12:48:18 +0900 Subject: [PATCH 17/68] Auto fmt --- runtimes/eden/src/lib.rs | 1 - runtimes/eden/src/pallets_consensus.rs | 2 +- runtimes/eden/src/xcm_config.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index b48cd46d2f2..001ad1b0ad9 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -133,7 +133,6 @@ pub type Block = generic::Block; pub type SignedBlock = generic::SignedBlock; /// BlockId type as expected by this runtime. pub type BlockId = generic::BlockId; - /// Index of a transaction in the chain. pub type Nonce = u32; /// The SignedExtension to the basic transaction logic. diff --git a/runtimes/eden/src/pallets_consensus.rs b/runtimes/eden/src/pallets_consensus.rs index 329599e22d5..c0c8e69783e 100644 --- a/runtimes/eden/src/pallets_consensus.rs +++ b/runtimes/eden/src/pallets_consensus.rs @@ -20,7 +20,7 @@ use crate::{ constants, pallets_governance::EnsureRootOrMoreThanHalfOfTechComm, Aura, Balances, CollatorSelection, Runtime, RuntimeEvent, Session, }; -use frame_support::{parameter_types, PalletId, traits::ConstBool}; +use frame_support::{parameter_types, traits::ConstBool, PalletId}; use primitives::{AccountId, AuraId}; use sp_runtime::impl_opaque_keys; use sp_std::prelude::*; diff --git a/runtimes/eden/src/xcm_config.rs b/runtimes/eden/src/xcm_config.rs index fa4d4d36b12..13a6e73b699 100644 --- a/runtimes/eden/src/xcm_config.rs +++ b/runtimes/eden/src/xcm_config.rs @@ -160,7 +160,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; - type Aliasers = Nothing ; // TODO check if it should be type Aliasers = AliasForeignAccountId32; + type Aliasers = Nothing; // TODO check if it should be type Aliasers = AliasForeignAccountId32; } #[cfg(feature = "runtime-benchmarks")] From 5811fdfd4ff7720e114fd5d44c4d6ecc03a840d5 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Sep 2023 15:08:24 +0900 Subject: [PATCH 18/68] Genesis build config for reserve pallet --- pallets/reserve/src/lib.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index 11969a183c9..3551b794ca8 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -27,9 +27,12 @@ mod tests; use frame_support::{ dispatch::GetDispatchInfo, - traits::{Currency, ExistenceRequirement, GenesisBuild, Get, Imbalance, OnUnbalanced}, + traits::{Currency, ExistenceRequirement, Get, Imbalance, OnUnbalanced}, PalletId, }; + +use crate::pallet::Event; +use frame_system::pallet_prelude::*; use sp_runtime::traits::{AccountIdConversion, Dispatchable}; use sp_std::prelude::Box; use support::WithAccountId; @@ -37,8 +40,6 @@ use support::WithAccountId; pub mod weights; pub use weights::WeightInfo; -pub use pallet::*; - type BalanceOf = <>::Currency as Currency<::AccountId>>::Balance; type NegativeImbalanceOf = <>::Currency as Currency<::AccountId>>::NegativeImbalance; @@ -47,7 +48,7 @@ type NegativeImbalanceOf = pub mod pallet { use super::*; use frame_support::pallet_prelude::*; - use frame_support::traits::GenesisBuild; + use frame_support::traits::BuildGenesisConfig; use frame_support::DefaultNoBound; use frame_system::pallet_prelude::*; @@ -137,7 +138,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl, I: 'static> GenesisBuild for GenesisConfig { + impl, I: 'static> BuildGenesisConfig for GenesisConfig { fn build(&self) { let our_account = &>::account_id(); @@ -148,6 +149,8 @@ pub mod pallet { } } +use crate::pallet::{Config, Pallet}; + impl, I: 'static> WithAccountId for Pallet { fn account_id() -> T::AccountId { T::PalletId::get().into_account_truncating() From 1790f6aa97290195601b75df627d71f6a61d9ec8 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Sep 2023 15:59:55 +0900 Subject: [PATCH 19/68] Reseved pallet test case --- pallets/reserve/src/tests.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index bbdfa461fe5..1027e28f285 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -34,11 +34,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, TestModule: pallet_reserve::{Pallet, Call, Storage, Event}, @@ -53,14 +49,12 @@ impl frame_system::Config for Test { type RuntimeCall = RuntimeCall; type BlockWeights = (); type BlockLength = (); + type Block = Block; type SS58Prefix = (); - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = (); type BlockHashCount = BlockHashCount; type Version = (); @@ -113,9 +107,6 @@ type TestCurrency = ::Currency; // our desired mockup. pub fn new_test_ext() -> sp_io::TestExternalities { frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into() } #[test] From eb9c5651155385ff77aedd88f833d992c7825220 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Sep 2023 16:17:10 +0900 Subject: [PATCH 20/68] Update test dependecies --- Cargo.lock | 30 +++++++++++++++--------------- pallets/allocations/src/tests.rs | 7 +++++-- pallets/grants/src/mock.rs | 7 ++++--- pallets/reserve/src/tests.rs | 8 ++++---- pallets/sponsorship/src/mock.rs | 7 +++---- 5 files changed, 31 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 031f214d786..955051bd64c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -452,9 +452,9 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atty" @@ -973,9 +973,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.4" +version = "4.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" +checksum = "824956d0dca8334758a5b7f7e50518d66ea319330cbceedcf76905c2f6ab30e3" dependencies = [ "clap_builder", "clap_derive", @@ -983,9 +983,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.4" +version = "4.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" +checksum = "122ec64120a49b4563ccaedcbea7818d069ed8e9aa6d829b82d8a4128936b2ab" dependencies = [ "anstream", "anstyle", @@ -1058,9 +1058,9 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -2680,9 +2680,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fatality" @@ -7051,9 +7051,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" [[package]] name = "parking_lot" @@ -12247,7 +12247,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.3.5", "rustix 0.38.14", "windows-sys 0.48.0", @@ -13003,9 +13003,9 @@ dependencies = [ [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" diff --git a/pallets/allocations/src/tests.rs b/pallets/allocations/src/tests.rs index c514ca782e1..94f330dbb7f 100644 --- a/pallets/allocations/src/tests.rs +++ b/pallets/allocations/src/tests.rs @@ -64,7 +64,6 @@ impl frame_system::Config for Test { type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -76,6 +75,7 @@ impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type OnSetCode = (); type SystemWeightInfo = (); + type Nonce = u32; type MaxConsumers = frame_support::traits::ConstU32<16>; } parameter_types! { @@ -92,11 +92,14 @@ impl pallet_balances::Config for Test { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = [u8; 8]; - type HoldIdentifier = [u8; 8]; + // type HoldIdentifier = [u8; 8]; type MaxHolds = (); type MaxFreezes = (); type WeightInfo = (); + + #[doc = " The overarching hold reason."] + type RuntimeHoldReason = (); } const THREE_INFLATION_STEPS: &[Perbill] = &[ diff --git a/pallets/grants/src/mock.rs b/pallets/grants/src/mock.rs index f5b627b5170..6b39091b508 100644 --- a/pallets/grants/src/mock.rs +++ b/pallets/grants/src/mock.rs @@ -33,7 +33,7 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, PalletBalances: pallet_balances::{Pallet, Call, Config, Storage, Event}, Vesting: vesting::{Pallet, Call, Storage, Event, Config}, } @@ -54,7 +54,6 @@ impl frame_system::Config for Test { type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -68,6 +67,8 @@ impl frame_system::Config for Test { type OnSetCode = (); type SystemWeightInfo = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + #[doc = " This stores the number of previous transactions associated with a sender account."] + type Nonce = u32; } type Balance = u64; @@ -88,7 +89,7 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; type WeightInfo = (); type FreezeIdentifier = [u8; 8]; - type HoldIdentifier = [u8; 8]; + // type HoldIdentifier = [u8; 8]; type MaxHolds = (); type MaxFreezes = (); } diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index 1027e28f285..f436ffa86da 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -30,12 +30,12 @@ use sp_runtime::{ }; use sp_std::prelude::Box; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; +// type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, TestModule: pallet_reserve::{Pallet, Call, Storage, Event}, } @@ -82,7 +82,7 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; type WeightInfo = (); type FreezeIdentifier = [u8; 8]; - type HoldIdentifier = [u8; 8]; + // type HoldIdentifier = [u8; 8]; type MaxHolds = (); type MaxFreezes = (); } @@ -106,7 +106,7 @@ type TestCurrency = ::Currency; // This function basically just builds a genesis storage key/value store according to // our desired mockup. pub fn new_test_ext() -> sp_io::TestExternalities { - frame_system::GenesisConfig::default() + frame_system::GenesisConfig::default().into() } #[test] diff --git a/pallets/sponsorship/src/mock.rs b/pallets/sponsorship/src/mock.rs index 77f0a573728..e34ee994c37 100644 --- a/pallets/sponsorship/src/mock.rs +++ b/pallets/sponsorship/src/mock.rs @@ -55,13 +55,11 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU64<250>; type Version = (); @@ -87,8 +85,9 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); type MaxHolds = (); + #[doc = " The overarching hold reason."] + type RuntimeHoldReason = (); } impl pallet_transaction_payment::Config for Test { From 1e00e4967d4b85a92560adb0e3649e27e3ec25f7 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 29 Sep 2023 09:29:31 +0900 Subject: [PATCH 21/68] WIP Where is Runtime? --- pallets/reserve/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index 3551b794ca8..8662ae5fe1b 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -50,7 +50,6 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_support::traits::BuildGenesisConfig; use frame_support::DefaultNoBound; - use frame_system::pallet_prelude::*; #[pallet::config] pub trait Config: frame_system::Config { @@ -149,7 +148,7 @@ pub mod pallet { } } -use crate::pallet::{Config, Pallet}; +pub use crate::pallet::{Config, Pallet}; impl, I: 'static> WithAccountId for Pallet { fn account_id() -> T::AccountId { From d758414a0799a3bad32e097cad71213d5a9e7c57 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 2 Oct 2023 12:49:49 +1300 Subject: [PATCH 22/68] fix(nodle-parachain): Fix issue of not finding public pallet identifiers plus the contract api required changes --- pallets/grants/src/lib.rs | 14 ++++++++++---- pallets/reserve/src/lib.rs | 17 ++++++++++------- runtimes/eden/src/constants.rs | 3 ++- runtimes/eden/src/lib.rs | 7 +++++-- runtimes/eden/src/weights/pallet_contracts.rs | 10 +++++----- 5 files changed, 32 insertions(+), 19 deletions(-) diff --git a/pallets/grants/src/lib.rs b/pallets/grants/src/lib.rs index 4cae23dd416..72fc2d2aceb 100644 --- a/pallets/grants/src/lib.rs +++ b/pallets/grants/src/lib.rs @@ -30,8 +30,8 @@ use codec::{Decode, Encode}; use frame_support::{ ensure, pallet_prelude::{MaxEncodedLen, TypeInfo}, - traits::{Currency, ExistenceRequirement, GenesisBuild, LockIdentifier, LockableCurrency, WithdrawReasons}, - BoundedVec, DefaultNoBound, + traits::{Currency, ExistenceRequirement, LockIdentifier, LockableCurrency, WithdrawReasons}, + BoundedVec, }; use sp_runtime::{ traits::{AtLeast32Bit, BlockNumberProvider, CheckedAdd, Saturating, StaticLookup, Zero}, @@ -259,13 +259,19 @@ pub mod pallet { pub(crate) type StorageVersion = StorageValue<_, Releases, ValueQuery>; #[pallet::genesis_config] - #[derive(DefaultNoBound)] pub struct GenesisConfig { pub vesting: Vec>, } + impl Default for GenesisConfig { + fn default() -> Self { + Self { + vesting: Default::default(), + } + } + } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { self.vesting.iter().for_each(|(ref who, schedules)| { let vesting_schedule: BoundedVec, T::MaxSchedule> = schedules diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index 8662ae5fe1b..5e8da2a973d 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -31,7 +31,6 @@ use frame_support::{ PalletId, }; -use crate::pallet::Event; use frame_system::pallet_prelude::*; use sp_runtime::traits::{AccountIdConversion, Dispatchable}; use sp_std::prelude::Box; @@ -40,6 +39,8 @@ use support::WithAccountId; pub mod weights; pub use weights::WeightInfo; +pub use pallet::*; + type BalanceOf = <>::Currency as Currency<::AccountId>>::Balance; type NegativeImbalanceOf = <>::Currency as Currency<::AccountId>>::NegativeImbalance; @@ -48,9 +49,6 @@ type NegativeImbalanceOf = pub mod pallet { use super::*; use frame_support::pallet_prelude::*; - use frame_support::traits::BuildGenesisConfig; - use frame_support::DefaultNoBound; - #[pallet::config] pub trait Config: frame_system::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -131,11 +129,18 @@ pub mod pallet { } #[pallet::genesis_config] - #[derive(DefaultNoBound)] pub struct GenesisConfig, I: 'static = ()> { pub phantom: sp_std::marker::PhantomData<(T, I)>, } + impl, I: 'static> Default for GenesisConfig { + fn default() -> Self { + Self { + phantom: Default::default(), + } + } + } + #[pallet::genesis_build] impl, I: 'static> BuildGenesisConfig for GenesisConfig { fn build(&self) { @@ -148,8 +153,6 @@ pub mod pallet { } } -pub use crate::pallet::{Config, Pallet}; - impl, I: 'static> WithAccountId for Pallet { fn account_id() -> T::AccountId { T::PalletId::get().into_account_truncating() diff --git a/runtimes/eden/src/constants.rs b/runtimes/eden/src/constants.rs index 8c50f46ed23..07d34a724a5 100644 --- a/runtimes/eden/src/constants.rs +++ b/runtimes/eden/src/constants.rs @@ -25,6 +25,7 @@ use frame_support::{ }, }; use frame_system::limits::BlockWeights; +use pallet_contracts::DebugInfo; use primitives::{Balance, BlockNumber}; pub use sp_runtime::{Perbill, Perquintill}; use static_assertions::const_assert; @@ -112,7 +113,7 @@ parameter_types! { // Prints debug output of the `contracts` pallet to stdout if the node is // started with `-lruntime::contracts=debug`. -pub const CONTRACTS_DEBUG_OUTPUT: bool = true; +pub const CONTRACTS_DEBUG_OUTPUT: DebugInfo = DebugInfo::UnsafeDebug; #[cfg(test)] mod tests { diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 001ad1b0ad9..b074790b4ea 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -45,7 +45,7 @@ pub use sp_runtime::BuildStorage; use sp_runtime::{ generic, - traits::{BlakeTwo256, Block as BlockT, Extrinsic}, + traits::{BlakeTwo256, Block as BlockT}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -293,7 +293,7 @@ sp_api::impl_runtime_apis! { input_data: Vec, ) -> pallet_contracts_primitives::ContractExecResult { let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block); - Contracts::bare_call( + Contracts::bare_call( origin, dest, value, @@ -301,6 +301,7 @@ sp_api::impl_runtime_apis! { storage_deposit_limit, input_data, constants::CONTRACTS_DEBUG_OUTPUT, + pallet_contracts::CollectEvents::UnsafeCollect, pallet_contracts::Determinism::Enforced, ) } @@ -324,7 +325,9 @@ sp_api::impl_runtime_apis! { data, salt, constants::CONTRACTS_DEBUG_OUTPUT, + pallet_contracts::CollectEvents::UnsafeCollect, ) + } fn upload_code( diff --git a/runtimes/eden/src/weights/pallet_contracts.rs b/runtimes/eden/src/weights/pallet_contracts.rs index aab64290287..a321829f33e 100644 --- a/runtimes/eden/src/weights/pallet_contracts.rs +++ b/runtimes/eden/src/weights/pallet_contracts.rs @@ -1797,7 +1797,7 @@ impl pallet_contracts::weights::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().writes(6_u64)) } -fn v9_migration_step(c: u32, ) -> Weight { +fn v9_migration_step(_: u32, ) -> Weight { Default::default() } @@ -1805,11 +1805,11 @@ fn v10_migration_step() -> Weight { Default::default() } -fn v11_migration_step(k: u32, ) -> Weight { +fn v11_migration_step(_: u32, ) -> Weight { Default::default() } -fn v12_migration_step(c: u32, ) -> Weight { +fn v12_migration_step(_: u32, ) -> Weight { Default::default() } @@ -1833,11 +1833,11 @@ fn on_runtime_upgrade() -> Weight { Default::default() } -fn seal_caller_is_root(r: u32, ) -> Weight { +fn seal_caller_is_root(_: u32, ) -> Weight { Default::default() } -fn instr_i64const(r: u32, ) -> Weight { +fn instr_i64const(_: u32, ) -> Weight { Default::default() } From d2e2756499adb4fb313675e6e0235b9879f5a866 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 2 Oct 2023 11:51:54 +0900 Subject: [PATCH 23/68] Subrstrate rpc server: break legacy CLI options and remove "backward compatible HTTP server" #13384 https://github.com/paritytech/substrate/pull/13384 --- node/src/chain_spec.rs | 7 ++++++- node/src/command.rs | 34 +++++---------------------------- node/src/service.rs | 5 ++++- pallets/grants/src/mock.rs | 1 + pallets/reserve/src/tests.rs | 2 ++ pallets/sponsorship/src/mock.rs | 1 + 6 files changed, 19 insertions(+), 31 deletions(-) diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 4278bbd61d2..69f643c7189 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -117,6 +117,7 @@ fn eden_testnet_genesis( code: WASM_BINARY .expect("WASM binary was not build, please build it!") .to_vec(), + _config: Default::default(), }, balances: BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, ENDOWMENT)).collect(), @@ -144,7 +145,10 @@ fn eden_testnet_genesis( aura: Default::default(), aura_ext: Default::default(), parachain_system: Default::default(), - parachain_info: ParachainInfoConfig { parachain_id: id }, + parachain_info: ParachainInfoConfig { + parachain_id: id, + _config: Default::default(), + }, transaction_payment: Default::default(), // Governance @@ -165,6 +169,7 @@ fn eden_testnet_genesis( polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), + _config: Default::default(), }, } } diff --git a/node/src/command.rs b/node/src/command.rs index 052e7a3ea4c..3859f30a30b 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -81,10 +81,6 @@ impl SubstrateCli for Cli { fn load_spec(&self, id: &str) -> std::result::Result, String> { load_spec(id) } - - fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { - &runtime_eden::VERSION - } } impl SubstrateCli for RelayChainCli { @@ -119,10 +115,6 @@ impl SubstrateCli for RelayChainCli { fn load_spec(&self, id: &str) -> std::result::Result, String> { polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id) } - - fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - polkadot_cli::Cli::native_runtime_version(chain_spec) - } } macro_rules! construct_async_run { @@ -274,7 +266,7 @@ pub fn run() -> Result<()> { let id = ParaId::from(para_id); let parachain_account = - AccountIdConversion::::into_account_truncating(&id); + AccountIdConversion::::into_account_truncating(&id); let state_version = Cli::native_runtime_version(&config.chain_spec).state_version(); let block: Block = @@ -307,14 +299,6 @@ impl DefaultConfigurationValues for RelayChainCli { 30334 } - fn rpc_ws_listen_port() -> u16 { - 9945 - } - - fn rpc_http_listen_port() -> u16 { - 9934 - } - fn prometheus_listen_port() -> u16 { 9616 } @@ -344,16 +328,8 @@ impl CliConfiguration for RelayChainCli { .or_else(|| self.base_path.clone().map(Into::into))) } - fn rpc_http(&self, default_listen_port: u16) -> Result> { - self.base.base.rpc_http(default_listen_port) - } - - fn rpc_ipc(&self) -> Result> { - self.base.base.rpc_ipc() - } - - fn rpc_ws(&self, default_listen_port: u16) -> Result> { - self.base.base.rpc_ws(default_listen_port) + fn rpc_addr(&self, default_listen_port: u16) -> Result> { + self.base.base.rpc_addr(default_listen_port) } fn prometheus_config( @@ -403,8 +379,8 @@ impl CliConfiguration for RelayChainCli { self.base.base.rpc_methods() } - fn rpc_ws_max_connections(&self) -> Result> { - self.base.base.rpc_ws_max_connections() + fn rpc_max_connections(&self) -> Result { + self.base.base.rpc_max_connections() } fn rpc_cors(&self, is_dev: bool) -> Result>> { diff --git a/node/src/service.rs b/node/src/service.rs index 55436c9aa27..e339c3f5656 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -19,7 +19,7 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. // std -use std::{sync::Arc, time::Duration}; +use std::{default, sync::Arc, time::Duration}; // rpc use jsonrpsee::RpcModule; @@ -255,6 +255,8 @@ where let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); + // TODO there should be more here: + let mut net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = build_network(BuildNetworkParams { @@ -265,6 +267,7 @@ where spawn_handle: task_manager.spawn_handle(), relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, + net_config, }) .await?; diff --git a/pallets/grants/src/mock.rs b/pallets/grants/src/mock.rs index 6b39091b508..f1aff65d008 100644 --- a/pallets/grants/src/mock.rs +++ b/pallets/grants/src/mock.rs @@ -92,6 +92,7 @@ impl pallet_balances::Config for Test { // type HoldIdentifier = [u8; 8]; type MaxHolds = (); type MaxFreezes = (); + type RuntimeHoldReason = (); } ord_parameter_types! { diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index f436ffa86da..f0522a984e7 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -67,6 +67,7 @@ impl frame_system::Config for Test { type OnSetCode = (); type SystemWeightInfo = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; } parameter_types! { pub const MaxLocks: u32 = 50; @@ -85,6 +86,7 @@ impl pallet_balances::Config for Test { // type HoldIdentifier = [u8; 8]; type MaxHolds = (); type MaxFreezes = (); + type RuntimeHoldReason = (); } ord_parameter_types! { diff --git a/pallets/sponsorship/src/mock.rs b/pallets/sponsorship/src/mock.rs index e34ee994c37..f92eae3e957 100644 --- a/pallets/sponsorship/src/mock.rs +++ b/pallets/sponsorship/src/mock.rs @@ -71,6 +71,7 @@ impl frame_system::Config for Test { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = ConstU32<16>; + type Nonce = u32; } impl pallet_balances::Config for Test { From 8a599de2e96e3f3d175e0b19b1149d3aaa443e5f Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 2 Oct 2023 15:07:00 +0900 Subject: [PATCH 24/68] Stub some important functions Fix todos before merge --- node/src/cli.rs | 4 ++-- node/src/command.rs | 11 +++++++---- node/src/service.rs | 6 ++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/node/src/cli.rs b/node/src/cli.rs index 549b9dcad37..55dc08c08c3 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -109,9 +109,9 @@ impl RelayChainCli { ) -> Self { let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec); let chain_id = extension.map(|e| e.relay_chain.clone()); - let base_path = para_config.base_path.as_ref().map(|x| x.path().join("polkadot")); + let base_path = para_config.base_path.path().join("polkadot"); Self { - base_path, + base_path: Some(base_path), chain_id, base: clap::Parser::parse_from(relay_chain_args), } diff --git a/node/src/command.rs b/node/src/command.rs index 3859f30a30b..a57977ae133 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -28,6 +28,7 @@ use sc_cli::{ use sc_service::config::{BasePath, PrometheusConfig}; use sp_core::hexdisplay::HexDisplay; use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; +use sp_runtime::StateVersion; use std::net::SocketAddr; use crate::{ @@ -186,8 +187,9 @@ pub fn run() -> Result<()> { let runner = cli.create_runner(cmd)?; runner.sync_run(|_config| { let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; - let state_version = Cli::native_runtime_version(&spec).state_version(); - cmd.run::(&*spec, state_version) + // let client = Default::default(); + // cmd.run::(&*spec, client) + Ok(()) //TODO FIXME }) } Some(Subcommand::ExportGenesisWasm(cmd)) => { @@ -205,7 +207,8 @@ pub fn run() -> Result<()> { match cmd { BenchmarkCmd::Pallet(cmd) => { if cfg!(feature = "runtime-benchmarks") { - runner.sync_run(|config| cmd.run::(config)) + //TODO runner.sync_run(|config| cmd.run::(config)) + Ok(()) } else { Err("Benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." @@ -268,7 +271,7 @@ pub fn run() -> Result<()> { let parachain_account = AccountIdConversion::::into_account_truncating(&id); - let state_version = Cli::native_runtime_version(&config.chain_spec).state_version(); + let state_version = StateVersion::V1; // TODO Fixme let block: Block = generate_genesis_block(&*config.chain_spec, state_version).map_err(|e| format!("{e:?}"))?; let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode())); diff --git a/node/src/service.rs b/node/src/service.rs index e339c3f5656..c447fd1dedf 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -66,6 +66,12 @@ type ParachainBlockImport = TParachainBlockImport>, ParachainBackend>; pub struct TemplateRuntimeExecutor; +// impl sc_executor::sp_wasm_interface::HostFunctions for TemplateRuntimeExecutor { + +// fn host_functions() -> Vec<&'static (dyn Function + 'static)> { todo!() } +// fn register_static(_: &mut T) -> Result<(), ::Error> where T: HostFunctionRegistry { todo!() } +// } + impl sc_executor::NativeExecutionDispatch for TemplateRuntimeExecutor { #[cfg(feature = "runtime-benchmarks")] type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; From 3354e18f93ec4270c1ad0c7808f2a6526b70aace Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 2 Oct 2023 15:11:08 +0900 Subject: [PATCH 25/68] Ignore one benchmark in xcm_config --- runtimes/eden/src/xcm_config.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtimes/eden/src/xcm_config.rs b/runtimes/eden/src/xcm_config.rs index 13a6e73b699..4b98122f42f 100644 --- a/runtimes/eden/src/xcm_config.rs +++ b/runtimes/eden/src/xcm_config.rs @@ -324,6 +324,10 @@ impl pallet_xcm_benchmarks::generic::Config for Runtime { // Eden doesn't support locking/unlocking assets Err(BenchmarkError::Skip) } + + fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + Err(BenchmarkError::Skip) + } } #[cfg(feature = "runtime-benchmarks")] From 5e198f4c9a0459eda9cb2ce682a4cd6489bdd74f Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 2 Oct 2023 15:54:37 +0900 Subject: [PATCH 26/68] Import BuildStorage --- pallets/grants/src/mock.rs | 2 +- pallets/sponsorship/src/mock.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pallets/grants/src/mock.rs b/pallets/grants/src/mock.rs index f1aff65d008..98349961afe 100644 --- a/pallets/grants/src/mock.rs +++ b/pallets/grants/src/mock.rs @@ -26,7 +26,7 @@ use frame_support::{ord_parameter_types, parameter_types}; use frame_system::EnsureSignedBy; use sp_core::H256; -use sp_runtime::{testing::Header, traits::IdentityLookup}; +use sp_runtime::{testing::Header, traits::IdentityLookup, BuildStorage}; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; diff --git a/pallets/sponsorship/src/mock.rs b/pallets/sponsorship/src/mock.rs index f92eae3e957..f946cb3c794 100644 --- a/pallets/sponsorship/src/mock.rs +++ b/pallets/sponsorship/src/mock.rs @@ -28,6 +28,7 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; From 3d46cc2508b51a5e66a09162c19eba9c4023a30a Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 3 Oct 2023 10:41:55 +0900 Subject: [PATCH 27/68] Build storage test case --- pallets/allocations/src/tests.rs | 2 +- pallets/grants/src/mock.rs | 2 +- pallets/reserve/src/tests.rs | 5 +++-- pallets/sponsorship/src/mock.rs | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pallets/allocations/src/tests.rs b/pallets/allocations/src/tests.rs index 94f330dbb7f..00ae964d7d7 100644 --- a/pallets/allocations/src/tests.rs +++ b/pallets/allocations/src/tests.rs @@ -33,7 +33,7 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BadOrigin, BlakeTwo256, IdentityLookup}, - Perbill, + Perbill, BuildStorage, }; pub(crate) type AccountId = u64; diff --git a/pallets/grants/src/mock.rs b/pallets/grants/src/mock.rs index 98349961afe..1acb87d7777 100644 --- a/pallets/grants/src/mock.rs +++ b/pallets/grants/src/mock.rs @@ -153,7 +153,7 @@ impl ExtBuilder { sp_tracing::try_init_simple(); let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + .build_storage() .unwrap_or_else(|err| { panic!( "new_test_ext:[{:#?}] - FrameSystem GenesisConfig Err:[{:#?}]!!!", diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index f0522a984e7..7765eaf3d75 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -22,7 +22,7 @@ use super::*; use crate::{self as pallet_reserve}; use frame_support::{assert_noop, assert_ok, ord_parameter_types, parameter_types, traits::ConstU64, traits::Currency}; use frame_system::{EnsureSignedBy, RawOrigin}; -use sp_core::H256; +use sp_core::{H256, Blake2Hasher}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, @@ -108,7 +108,8 @@ type TestCurrency = ::Currency; // This function basically just builds a genesis storage key/value store according to // our desired mockup. pub fn new_test_ext() -> sp_io::TestExternalities { - frame_system::GenesisConfig::default().into() + let t:frame_system::GenesisConfig = frame_system::GenesisConfig::default(); + sp_io::TestExternalities::new(t.into()) } #[test] diff --git a/pallets/sponsorship/src/mock.rs b/pallets/sponsorship/src/mock.rs index f946cb3c794..163686e8f10 100644 --- a/pallets/sponsorship/src/mock.rs +++ b/pallets/sponsorship/src/mock.rs @@ -171,7 +171,7 @@ impl pallet_sponsorship::Config for Test { // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { frame_system::GenesisConfig::default() - .build_storage::() + .build_storage() .unwrap() .into() } From 91f94a9474aca109e0af0d52ba7e1471b42b607b Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 11 Oct 2023 15:09:33 +0900 Subject: [PATCH 28/68] Restore uniques pallet --- Cargo.lock | 464 ++++++------ pallets/uniques/Cargo.toml | 50 ++ pallets/uniques/src/benchmarking.rs | 191 +++++ pallets/uniques/src/lib.rs | 869 +++++++++++++++++++++ pallets/uniques/src/tests.rs | 1086 +++++++++++++++++++++++++++ pallets/uniques/src/weights.rs | 401 ++++++++++ 6 files changed, 2843 insertions(+), 218 deletions(-) create mode 100644 pallets/uniques/Cargo.toml create mode 100644 pallets/uniques/src/benchmarking.rs create mode 100644 pallets/uniques/src/lib.rs create mode 100644 pallets/uniques/src/tests.rs create mode 100644 pallets/uniques/src/weights.rs diff --git a/Cargo.lock b/Cargo.lock index 955051bd64c..4f559ad00a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -211,9 +211,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -225,15 +225,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -249,9 +249,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -400,7 +400,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.23", + "rustix 0.37.24", "slab", "socket2 0.4.9", "waker-fn", @@ -423,7 +423,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -434,7 +434,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -569,7 +569,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -697,9 +697,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bounded-collections" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ "log", "parity-scale-codec", @@ -724,9 +724,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.6.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" +checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" dependencies = [ "memchr", "serde", @@ -767,9 +767,9 @@ checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -799,9 +799,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" dependencies = [ "serde", ] @@ -814,7 +814,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.19", + "semver 1.0.20", "serde", "serde_json", "thiserror", @@ -973,9 +973,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.5" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824956d0dca8334758a5b7f7e50518d66ea319330cbceedcf76905c2f6ab30e3" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", "clap_derive", @@ -983,9 +983,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.5" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122ec64120a49b4563ccaedcbea7818d069ed8e9aa6d829b82d8a4128936b2ab" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", @@ -1002,7 +1002,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1013,9 +1013,9 @@ checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "coarsetime" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99280f81a35511dda7d44f7c943491b41d3ac6fd0b54aea92498bec8612a2423" +checksum = "a73ef0d00d14301df35d0f13f5ea32344de6b00837485c358458f1e7f2d27db4" dependencies = [ "libc", "once_cell", @@ -1691,7 +1691,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1990,14 +1990,14 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "cxx" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe98ba1789d56fb3db3bee5e032774d4f421b685de7ba703643584ba24effbe" +checksum = "292b4841d939b20ba44fff686a35808b0ab31a3256e3629917d9aedd43eb7b3a" dependencies = [ "cc", "cxxbridge-flags", @@ -2007,9 +2007,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ce20f6b8433da4841b1dadfb9468709868022d829d5ca1f2ffbda928455ea3" +checksum = "8e7e35cf85fd4e90dcaba251f3ee95e08fb6f9d66e5c0588816f16a6ab939b40" dependencies = [ "cc", "codespan-reporting", @@ -2017,24 +2017,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "cxxbridge-flags" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20888d9e1d2298e2ff473cee30efe7d5036e437857ab68bbfea84c74dba91da2" +checksum = "d7030aff1908ba2b7eb639466df50792b2a3fdf02bea9557c4ee1a531975554b" [[package]] name = "cxxbridge-macro" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" +checksum = "79418ecb0c2322a7926a5fa5a9660535432b5b3588b947e1eb484cc509edbe3c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2304,7 +2304,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2328,7 +2328,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.37", + "syn 2.0.38", "termcolor", "walkdir", ] @@ -2398,7 +2398,7 @@ checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der 0.7.8", "digest 0.10.7", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "rfc6979 0.4.0", "signature 2.1.0", "spki 0.7.2", @@ -2445,7 +2445,7 @@ dependencies = [ "ed25519 2.2.2", "rand_core 0.6.4", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "zeroize", ] @@ -2493,9 +2493,9 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct 0.2.0", "crypto-bigint 0.5.3", @@ -2545,7 +2545,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2556,7 +2556,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2586,25 +2586,14 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -2654,7 +2643,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2930,7 +2919,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3049,7 +3038,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3061,7 +3050,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3071,7 +3060,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3151,7 +3140,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.14", + "rustix 0.38.18", "windows-sys 0.48.0", ] @@ -3233,7 +3222,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3244,7 +3233,7 @@ checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", "rustls 0.20.9", - "webpki 0.22.1", + "webpki 0.22.4", ] [[package]] @@ -3492,9 +3481,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" [[package]] name = "heck" @@ -3812,12 +3801,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", ] [[package]] @@ -3939,7 +3928,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.14", + "rustix 0.38.18", "windows-sys 0.48.0", ] @@ -3969,9 +3958,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] @@ -4137,9 +4126,9 @@ checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "once_cell", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -4326,9 +4315,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libloading" @@ -4342,9 +4331,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libp2p" @@ -4481,7 +4470,7 @@ dependencies = [ "multihash", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "zeroize", ] @@ -4506,7 +4495,7 @@ dependencies = [ "log", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "smallvec", "thiserror", "uint", @@ -4564,7 +4553,7 @@ dependencies = [ "once_cell", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "snow", "static_assertions", "thiserror", @@ -4686,10 +4675,10 @@ dependencies = [ "libp2p-core", "libp2p-identity", "rcgen 0.10.0", - "ring", + "ring 0.16.20", "rustls 0.20.9", "thiserror", - "webpki 0.22.1", + "webpki 0.22.4", "x509-parser 0.14.0", "yasna", ] @@ -4892,9 +4881,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" @@ -4977,7 +4966,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -4991,18 +4980,18 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -5013,7 +5002,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -5065,9 +5054,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memfd" @@ -5075,7 +5064,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.14", + "rustix 0.38.18", ] [[package]] @@ -5276,7 +5265,7 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "unsigned-varint", ] @@ -5578,9 +5567,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -5782,7 +5771,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -5793,7 +5782,7 @@ checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -6089,7 +6078,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -6410,6 +6399,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-nodle-uniques" +version = "2.3.1" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-uniques", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "support", +] + [[package]] name = "pallet-nomination-pools" version = "1.0.0" @@ -6724,7 +6732,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -7165,9 +7173,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" +checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" dependencies = [ "memchr", "thiserror", @@ -7176,9 +7184,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" +checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8" dependencies = [ "pest", "pest_generator", @@ -7186,26 +7194,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" +checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "pest_meta" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" +checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d" dependencies = [ "once_cell", "pest", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -7215,7 +7223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.0.2", ] [[package]] @@ -7235,7 +7243,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -8565,14 +8573,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -8664,14 +8672,14 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -8710,7 +8718,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -8817,20 +8825,20 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", "rustls 0.20.9", "slab", "thiserror", "tinyvec", "tracing", - "webpki 0.22.1", + "webpki 0.22.4", ] [[package]] @@ -8961,7 +8969,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", - "ring", + "ring 0.16.20", "time", "x509-parser 0.13.2", "yasna", @@ -8974,7 +8982,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", + "ring 0.16.20", "time", "yasna", ] @@ -9038,7 +9046,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -9055,14 +9063,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.8", - "regex-syntax 0.7.5", + "regex-automata 0.4.1", + "regex-syntax 0.8.0", ] [[package]] @@ -9076,13 +9084,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.5", + "regex-syntax 0.8.0", ] [[package]] @@ -9093,9 +9101,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c3cbb081b9784b07cceb8824c8583f86db4814d172ab043f3c23f7dc600bf83d" [[package]] name = "resolv-conf" @@ -9138,11 +9146,25 @@ dependencies = [ "libc", "once_cell", "spin 0.5.2", - "untrusted", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" +dependencies = [ + "cc", + "getrandom 0.2.10", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rocksdb" version = "0.21.0" @@ -9434,7 +9456,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.19", + "semver 1.0.20", ] [[package]] @@ -9462,9 +9484,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "4279d76516df406a8bd37e7dff53fd37d1a093f997a3c34a5c21658c126db06d" dependencies = [ "bitflags 1.3.2", "errno", @@ -9476,14 +9498,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.14" +version = "0.38.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" +checksum = "5a74ee2d7c2581cd139b42447d7d9389b889bdaad3a73f1ebb16f2a3237bb19c" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.7", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] @@ -9495,7 +9517,7 @@ checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.1", "log", - "ring", + "ring 0.16.20", "sct 0.6.1", "webpki 0.21.4", ] @@ -9507,9 +9529,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct 0.7.0", - "webpki 0.22.1", + "webpki 0.22.4", ] [[package]] @@ -9519,7 +9541,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", - "ring", + "ring 0.16.20", "rustls-webpki 0.101.6", "sct 0.7.0", ] @@ -9551,8 +9573,8 @@ version = "0.100.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -9561,8 +9583,8 @@ version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -9719,7 +9741,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -10642,7 +10664,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -10784,8 +10806,8 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -10794,8 +10816,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -10908,9 +10930,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -10938,7 +10960,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -11012,9 +11034,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -11033,9 +11055,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -11153,9 +11175,9 @@ dependencies = [ "chacha20poly1305", "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring", + "ring 0.16.20", "rustc_version 0.4.0", - "sha2 0.10.7", + "sha2 0.10.8", "subtle", ] @@ -11228,7 +11250,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -11453,7 +11475,7 @@ dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "twox-hash", ] @@ -11465,7 +11487,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -11484,7 +11506,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -11691,7 +11713,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -11876,7 +11898,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12044,7 +12066,7 @@ dependencies = [ "lazy_static", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "subtle", "thiserror", "tokio", @@ -12186,9 +12208,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -12249,7 +12271,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.14", + "rustix 0.38.18", "windows-sys 0.48.0", ] @@ -12270,22 +12292,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12387,7 +12409,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -12430,9 +12452,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", @@ -12455,7 +12477,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12542,7 +12564,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -12611,7 +12633,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12654,7 +12676,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12828,7 +12850,7 @@ dependencies = [ "log", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "stun", "thiserror", "tokio", @@ -12942,6 +12964,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.4.1" @@ -13059,7 +13087,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -13093,7 +13121,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -13279,7 +13307,7 @@ dependencies = [ "log", "rustix 0.36.15", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "toml 0.5.11", "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", @@ -13439,18 +13467,18 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] name = "webpki" -version = "0.22.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.3", + "untrusted 0.9.0", ] [[package]] @@ -13459,7 +13487,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.1", + "webpki 0.22.4", ] [[package]] @@ -13493,14 +13521,14 @@ dependencies = [ "rand 0.8.5", "rcgen 0.9.3", "regex", - "ring", + "ring 0.16.20", "rtcp", "rtp", "rustls 0.19.1", "sdp", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "stun", "thiserror", "time", @@ -13557,12 +13585,12 @@ dependencies = [ "rand 0.8.5", "rand_core 0.6.4", "rcgen 0.10.0", - "ring", + "ring 0.16.20", "rustls 0.19.1", "sec1 0.3.0", "serde", "sha1", - "sha2 0.10.7", + "sha2 0.10.8", "signature 1.6.4", "subtle", "thiserror", @@ -13801,14 +13829,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.14", + "rustix 0.38.18", ] [[package]] name = "wide" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +checksum = "ebecebefc38ff1860b4bc47550bbfa63af5746061cf0d29fcd7fa63171602598" dependencies = [ "bytemuck", "safe_arch", @@ -14037,9 +14065,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" dependencies = [ "memchr", ] @@ -14099,7 +14127,7 @@ dependencies = [ "lazy_static", "nom", "oid-registry 0.4.0", - "ring", + "ring 0.16.20", "rusticata-macros", "thiserror", "time", @@ -14189,7 +14217,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -14232,7 +14260,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml new file mode 100644 index 00000000000..9acd1e045ed --- /dev/null +++ b/pallets/uniques/Cargo.toml @@ -0,0 +1,50 @@ +[package] +name = "pallet-nodle-uniques" +version = "2.3.1" +authors = ["Nodle "] +edition = "2021" + +[features] +default = ["std"] +std = [ + "codec/std", + "serde", + "scale-info/std", + "frame-support/std", + "frame-benchmarking/std", + "frame-system/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", + "pallet-uniques/std", + "pallet-balances/std", +] +try-runtime = [ + "frame-support/try-runtime", + "pallet-uniques/try-runtime" +] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "pallet-uniques/runtime-benchmarks", +] + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.152", optional = true, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = [ + "derive", +] } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +support = { path = "../../support", default-features = false } + +[dev-dependencies] +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs new file mode 100644 index 00000000000..d2726a4c01b --- /dev/null +++ b/pallets/uniques/src/benchmarking.rs @@ -0,0 +1,191 @@ +/* + * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain + * Copyright (C) 2020-2022 Nodle International + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +//! Nodle uniques pallet benchmarking. + +#![cfg(feature = "runtime-benchmarks")] + +use super::*; +use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; +use frame_support::{assert_ok, traits::Get, BoundedVec}; +use frame_system::RawOrigin as SystemOrigin; +use pallet_uniques::{BenchmarkHelper, DestroyWitness}; +use sp_runtime::traits::Bounded; +use sp_std::prelude::*; + +use crate::Pallet as Uniques; +const SEED: u32 = 0; + +fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { + let collection_owner: T::AccountId = account("collection_owner", 0, SEED); + let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); + let collection_id = >::Helper::collection(0); + (collection_id, collection_owner, collection_owner_lookup) +} + +fn create_collection, I: 'static>( + extra_deposit_limit: BalanceOf, +) -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); + assert_ok!(Uniques::::create_with_extra_deposit_limit( + SystemOrigin::Signed(collection_owner.clone()).into(), + collection_id, + collection_owner_lookup.clone(), + extra_deposit_limit + )); + (collection_id, collection_owner, collection_owner_lookup) +} +fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { + let (.., collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + assert!(Uniques::::set_collection_metadata( + SystemOrigin::Signed(caller.clone()).into(), + >::Helper::collection(0), + vec![0; T::StringLimit::get() as usize].try_into().unwrap(), + false, + ) + .is_ok()); + (caller, caller_lookup) +} +fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { + let (.., collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + assert!(Uniques::::set_metadata( + SystemOrigin::Signed(caller.clone()).into(), + >::Helper::collection(0), + item, + vec![0; T::StringLimit::get() as usize].try_into().unwrap(), + false, + ) + .is_ok()); + (caller, caller_lookup) +} +fn add_item_attribute, I: 'static>( + item: T::ItemId, +) -> (BoundedVec, T::AccountId, AccountIdLookupOf) { + let (.., collection_owner, collection_owner_lookup) = get_config::(); + + let key: BoundedVec<_, _> = vec![0; T::KeyLimit::get() as usize].try_into().unwrap(); + assert!(Uniques::::set_attribute( + SystemOrigin::Signed(collection_owner.clone()).into(), + >::Helper::collection(0), + Some(item), + key.clone(), + vec![0; T::ValueLimit::get() as usize].try_into().unwrap(), + ) + .is_ok()); + (key, collection_owner, collection_owner_lookup) +} +fn mint_item_with_extra_deposit, I: 'static>( + index: u16, + deposit: BalanceOf, +) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + let item = T::Helper::item(index); + assert!(Uniques::::mint_with_extra_deposit( + SystemOrigin::Signed(collection_owner.clone()).into(), + collection_id, + item, + collection_owner_lookup.clone(), + deposit, + ) + .is_ok()); + (item, collection_owner, collection_owner_lookup) +} + +fn assert_last_event, I: 'static>(system_event: ::RuntimeEvent) { + let events = frame_system::Pallet::::events(); + // compare to the last event record + let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; + assert_eq!(event, &system_event); +} + +benchmarks_instance_pallet! { + destroy { + let n in 0 .. 1_000; + let m in 0 .. 1_000; + let a in 0 .. 1_000; + + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); + + add_collection_metadata::(); + + for i in 0..n { + mint_item_with_extra_deposit::(i as u16, T::Currency::minimum_balance()); + } + for i in 0..m { + add_item_metadata::(T::Helper::item(i as u16)); + } + for i in 0..a { + add_item_attribute::(T::Helper::item(i as u16)); + } + let witness = DestroyWitness{ + items: n, + item_metadatas: m, + attributes: a, + }; + }: _(SystemOrigin::Signed(collection_owner), collection_id, witness) + + mint_with_extra_deposit { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); + let item = T::Helper::item(0); + let deposit = 5u32.into(); + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, collection_owner_lookup, deposit) + + burn { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); + let (item, ..) = mint_item_with_extra_deposit::(0, T::Currency::minimum_balance()); + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, Some(collection_owner_lookup)) + + create_with_extra_deposit_limit { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, collection_owner_lookup, BalanceOf::::max_value()) + verify { + let event: >::RuntimeEvent = pallet_uniques::Event::Created { collection: >::Helper::collection(0), creator: collection_owner.clone(), owner: collection_owner }.into(); + assert_last_event::(event.into()); + } + + transfer_ownership { + let (collection, collection_owner, _) = create_collection::(BalanceOf::::max_value()); + let target: T::AccountId = account("target", 0, SEED); + let target_lookup = T::Lookup::unlookup(target.clone()); + T::Currency::make_free_balance_be(&target, T::Currency::minimum_balance()); + let origin = SystemOrigin::Signed(target.clone()).into(); + Uniques::::set_accept_ownership(origin, Some(collection))?; + }: _(SystemOrigin::Signed(collection_owner), collection, target_lookup) + verify { + let event: >::RuntimeEvent = pallet_uniques::Event::OwnerChanged { collection, new_owner: target }.into(); + assert_last_event::(event.into()); + } + + update_extra_deposit_limit { + let (collection, collection_owner, _) = create_collection::(BalanceOf::::max_value()); + }: _(SystemOrigin::Signed(collection_owner), collection, BalanceOf::::min_value()) + verify { + let event: >::RuntimeEvent = Event::ExtraDepositLimitUpdated { collection, limit: BalanceOf::::min_value() }.into(); + assert_last_event::(event.into()); + } + + impl_benchmark_test_suite!(Uniques, crate::tests::new_test_ext(), crate::tests::Test); +} diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs new file mode 100644 index 00000000000..ac3b7f3c52c --- /dev/null +++ b/pallets/uniques/src/lib.rs @@ -0,0 +1,869 @@ +/* + * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain + * Copyright (C) 2020-2022 Nodle International + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#![cfg_attr(not(feature = "std"), no_std)] + +//! Handle the ability to notify other pallets that they should stop all + +use frame_support::traits::Currency; +use sp_runtime::traits::{StaticLookup, Zero}; +use support::LimitedBalance; + +pub use pallet::*; +pub use weights::WeightInfo as NodleWeightInfo; + +pub mod weights; + +mod benchmarking; +#[cfg(test)] +mod tests; + +type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; +pub type BalanceOf = + <>::Currency as Currency<::AccountId>>::Balance; + +#[frame_support::pallet] +pub mod pallet { + use super::*; + use frame_support::{ + pallet_prelude::*, + traits::{BalanceStatus::Reserved, ExistenceRequirement, ReservableCurrency}, + transactional, + }; + use frame_system::pallet_prelude::*; + use pallet_uniques::{DestroyWitness, WeightInfo as UniquesWeightInfo}; + use sp_runtime::DispatchResult; + use sp_std::vec::Vec; + + #[pallet::config] + pub trait Config: frame_system::Config + pallet_uniques::Config { + /// The overarching event type. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + + /// Weight information for extrinsics specific to this pallet. + type WeightInfo: NodleWeightInfo; + } + + #[pallet::pallet] + pub struct Pallet(PhantomData<(T, I)>); + + #[pallet::hooks] + impl, I: 'static> Hooks> for Pallet {} + + #[pallet::storage] + /// The extra deposits in existence. + pub(crate) type ItemExtraDeposits, I: 'static = ()> = StorageDoubleMap< + _, + Blake2_128Concat, + T::CollectionId, + Blake2_128Concat, + T::ItemId, + BalanceOf, + OptionQuery, + >; + + #[pallet::storage] + pub(crate) type CollectionExtraDepositDetails, I: 'static = ()> = + StorageMap<_, Blake2_128Concat, T::CollectionId, LimitedBalance>, OptionQuery>; + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event, I: 'static = ()> { + /// A `collection` was created. + ExtraDepositLimitUpdated { + collection: T::CollectionId, + limit: BalanceOf, + }, + } + + #[pallet::error] + pub enum Error { + /// Cannot mint the token most likely due to extra deposit exceeding the collection owner's limit. + FailedToIncreaseTotalExtraDeposit, + /// The owner of collection is not retrievable most likely due to collection not existing. + FailedToRetrieveCollectionOwner, + /// The owner of item is not found due to item not existing. + FailedToRetrieveItemOwner, + /// Permission denied. + PermissionDenied, + /// Cannot update the extra deposit limit most likely due to it going lower than commitment + FailedToUpdateExtraDepositLimit, + } + + #[pallet::call] + impl, I: 'static> Pallet + where T::CollectionId: Copy + { + /// Issue a new collection of non-fungible items from a public origin. + /// + /// This new collection has no items initially and its owner is the origin. + /// + /// The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + /// + /// `ItemDeposit` funds of sender are reserved. + /// + /// Parameters: + /// - `collection`: The identifier of the new collection. This must not be currently in use. + /// - `admin`: The admin of this collection. The admin is the initial address of each + /// member of the collection's admin team. + /// + /// Emits `Created` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(0)] + #[pallet::weight(>::WeightInfo::create())] + pub fn create( + origin: OriginFor, + collection: T::CollectionId, + admin: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::create(origin, collection, admin) + } + /// Issue a new collection of non-fungible items from a privileged origin. + /// + /// This new collection has no items initially. + /// + /// The origin must conform to `ForceOrigin`. + /// + /// Unlike `create`, no funds are reserved. + /// + /// - `collection`: The identifier of the new item. This must not be currently in use. + /// - `owner`: The owner of this collection of items. The owner has full superuser + /// permissions + /// over this item, but may later change and configure the permissions using + /// `transfer_ownership` and `set_team`. + /// + /// Emits `ForceCreated` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(1)] + #[pallet::weight(>::WeightInfo::force_create())] + pub fn force_create( + origin: OriginFor, + collection: T::CollectionId, + owner: AccountIdLookupOf, + free_holding: bool, + ) -> DispatchResult { + pallet_uniques::Pallet::::force_create(origin, collection, owner, free_holding) + } + + /// Destroy a collection of fungible items. + /// + /// The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the + /// owner of the `collection`. + /// + /// - `collection`: The identifier of the collection to be destroyed. + /// - `witness`: Information on the items minted in the collection. This must be + /// correct. + /// + /// Emits `Destroyed` event when successful. + /// + /// Weight: `O(n + m)` where: + /// - `n = witness.items` + /// - `m = witness.item_metadatas` + /// - `a = witness.attributes` + #[pallet::call_index(2)] + #[pallet::weight(>::WeightInfo::destroy( + witness.items, + witness.item_metadatas, + witness.attributes, + ))] + pub fn destroy( + origin: OriginFor, + collection: T::CollectionId, + witness: DestroyWitness, + ) -> DispatchResultWithPostInfo { + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection.clone()) + .ok_or(Error::::FailedToRetrieveCollectionOwner)?; + for (item, extra_deposit) in ItemExtraDeposits::::drain_prefix(collection) { + let item_owner = pallet_uniques::Pallet::::owner(collection, item) + .ok_or(Error::::FailedToRetrieveItemOwner)?; + >::Currency::unreserve(&collection_owner, extra_deposit); + >::Currency::transfer( + &collection_owner, + &item_owner, + extra_deposit, + ExistenceRequirement::AllowDeath, + )?; + } + CollectionExtraDepositDetails::::remove(collection); + pallet_uniques::Pallet::::destroy(origin, collection, witness) + } + + /// Mint an item of a particular collection. + /// + /// The origin must be Signed and the sender must be the Issuer of the `collection`. + /// + /// - `collection`: The collection of the item to be minted. + /// - `item`: The item value of the item to be minted. + /// - `beneficiary`: The initial owner of the minted item. + /// + /// Emits `Issued` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(3)] + #[pallet::weight(>::WeightInfo::mint())] + pub fn mint( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + owner: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::mint(origin, collection, item, owner) + } + + /// Destroy a single item. + /// + /// Origin must be Signed and the signing account must be either: + /// - the Admin of the `collection`; + /// - the Owner of the `item`; + /// + /// - `collection`: The collection of the item to be burned. + /// - `item`: The item of the item to be burned. + /// - `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the + /// item is owned by this value. + /// + /// Emits `Burned` with the actual amount burned. + /// + /// Weight: `O(1)` + /// Modes: `check_owner.is_some()`. + #[pallet::call_index(4)] + #[pallet::weight(>::WeightInfo::burn())] + pub fn burn( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + check_owner: Option>, + ) -> DispatchResult { + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + .ok_or(Error::::FailedToRetrieveCollectionOwner)?; + let item_owner = pallet_uniques::Pallet::::owner(collection, item) + .ok_or(Error::::FailedToRetrieveItemOwner)?; + pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; + let extra_deposit = ItemExtraDeposits::::take(collection, item).unwrap_or_else(Zero::zero); + if !extra_deposit.is_zero() { + >::Currency::unreserve(&collection_owner, extra_deposit); + >::Currency::transfer( + &collection_owner, + &item_owner, + extra_deposit, + ExistenceRequirement::AllowDeath, + ) + } else { + Ok(()) + } + } + + /// Move an item from the sender account to another. + /// + /// This resets the approved account of the item. + /// + /// Origin must be Signed and the signing account must be either: + /// - the Admin of the `collection`; + /// - the Owner of the `item`; + /// - the approved delegate for the `item` (in this case, the approval is reset). + /// + /// Arguments: + /// - `collection`: The collection of the item to be transferred. + /// - `item`: The item of the item to be transferred. + /// - `dest`: The account to receive ownership of the item. + /// + /// Emits `Transferred`. + /// + /// Weight: `O(1)` + #[pallet::call_index(5)] + #[pallet::weight(>::WeightInfo::transfer())] + pub fn transfer( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + dest: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::transfer(origin, collection, item, dest) + } + + /// Reevaluate the deposits on some items. + /// + /// Origin must be Signed and the sender should be the Owner of the `collection`. + /// + /// - `collection`: The collection to be frozen. + /// - `items`: The items of the collection whose deposits will be reevaluated. + /// + /// NOTE: This exists as a best-effort function. Any items which are unknown or + /// in the case that the owner account does not have reservable funds to pay for a + /// deposit increase are ignored. Generally the owner isn't going to call this on items + /// whose existing deposit is less than the refreshed deposit as it would only cost them, + /// so it's of little consequence. + /// + /// It will still return an error in the case that the collection is unknown of the signer + /// is not permitted to call it. + /// + /// Weight: `O(items.len())` + #[pallet::call_index(6)] + #[pallet::weight(>::WeightInfo::redeposit(items.len() as u32))] + pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { + pallet_uniques::Pallet::::redeposit(origin, collection, items) + } + + /// Disallow further unprivileged transfer of an item. + /// + /// Origin must be Signed and the sender should be the Freezer of the `collection`. + /// + /// - `collection`: The collection of the item to be frozen. + /// - `item`: The item of the item to be frozen. + /// + /// Emits `Frozen`. + /// + /// Weight: `O(1)` + #[pallet::call_index(7)] + #[pallet::weight(>::WeightInfo::freeze())] + pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { + pallet_uniques::Pallet::::freeze(origin, collection, item) + } + + /// Re-allow unprivileged transfer of an item. + /// + /// Origin must be Signed and the sender should be the Freezer of the `collection`. + /// + /// - `collection`: The collection of the item to be thawed. + /// - `item`: The item of the item to be thawed. + /// + /// Emits `Thawed`. + /// + /// Weight: `O(1)` + #[pallet::call_index(8)] + #[pallet::weight(>::WeightInfo::thaw())] + pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { + pallet_uniques::Pallet::::thaw(origin, collection, item) + } + + /// Disallow further unprivileged transfers for a whole collection. + /// + /// Origin must be Signed and the sender should be the Freezer of the `collection`. + /// + /// - `collection`: The collection to be frozen. + /// + /// Emits `CollectionFrozen`. + /// + /// Weight: `O(1)` + #[pallet::call_index(9)] + #[pallet::weight(>::WeightInfo::freeze_collection())] + pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { + pallet_uniques::Pallet::::freeze_collection(origin, collection) + } + + /// Re-allow unprivileged transfers for a whole collection. + /// + /// Origin must be Signed and the sender should be the Admin of the `collection`. + /// + /// - `collection`: The collection to be thawed. + /// + /// Emits `CollectionThawed`. + /// + /// Weight: `O(1)` + #[pallet::call_index(10)] + #[pallet::weight(>::WeightInfo::thaw_collection())] + pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { + pallet_uniques::Pallet::::thaw_collection(origin, collection) + } + + /// Change the Owner of a collection. + /// + /// Origin must be Signed and the sender should be the Owner of the `collection`. + /// + /// - `collection`: The collection whose owner should be changed. + /// - `owner`: The new Owner of this collection. They must have called + /// `set_accept_ownership` with `collection` in order for this operation to succeed. + /// + /// Emits `OwnerChanged`. + /// + /// Weight: `O(1)` + #[pallet::call_index(11)] + #[pallet::weight(>::WeightInfo::transfer_ownership())] + pub fn transfer_ownership( + origin: OriginFor, + collection: T::CollectionId, + owner: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::transfer_ownership(origin.clone(), collection, owner.clone())?; + let old_owner = ensure_signed(origin)?; + let new_owner = T::Lookup::lookup(owner)?; + if old_owner != new_owner { + let total_extra_deposit = CollectionExtraDepositDetails::::get(collection) + .unwrap_or_default() + .balance(); + T::Currency::repatriate_reserved(&old_owner, &new_owner, total_extra_deposit, Reserved)?; + } + Ok(()) + } + + /// Change the Issuer, Admin and Freezer of a collection. + /// + /// Origin must be Signed and the sender should be the Owner of the `collection`. + /// + /// - `collection`: The collection whose team should be changed. + /// - `issuer`: The new Issuer of this collection. + /// - `admin`: The new Admin of this collection. + /// - `freezer`: The new Freezer of this collection. + /// + /// Emits `TeamChanged`. + /// + /// Weight: `O(1)` + #[pallet::call_index(12)] + #[pallet::weight(>::WeightInfo::set_team())] + pub fn set_team( + origin: OriginFor, + collection: T::CollectionId, + issuer: AccountIdLookupOf, + admin: AccountIdLookupOf, + freezer: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_team(origin, collection, issuer, admin, freezer) + } + + /// Approve an item to be transferred by a delegated third-party account. + /// + /// The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be + /// either the owner of the `item` or the admin of the collection. + /// + /// - `collection`: The collection of the item to be approved for delegated transfer. + /// - `item`: The item of the item to be approved for delegated transfer. + /// - `delegate`: The account to delegate permission to transfer the item. + /// + /// Important NOTE: The `approved` account gets reset after each transfer. + /// + /// Emits `ApprovedTransfer` on success. + /// + /// Weight: `O(1)` + #[pallet::call_index(13)] + #[pallet::weight(>::WeightInfo::approve_transfer())] + pub fn approve_transfer( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + delegate: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::approve_transfer(origin, collection, item, delegate) + } + + /// Cancel the prior approval for the transfer of an item by a delegate. + /// + /// Origin must be either: + /// - the `Force` origin; + /// - `Signed` with the signer being the Admin of the `collection`; + /// - `Signed` with the signer being the Owner of the `item`; + /// + /// Arguments: + /// - `collection`: The collection of the item of whose approval will be cancelled. + /// - `item`: The item of the item of whose approval will be cancelled. + /// - `maybe_check_delegate`: If `Some` will ensure that the given account is the one to + /// which permission of transfer is delegated. + /// + /// Emits `ApprovalCancelled` on success. + /// + /// Weight: `O(1)` + #[pallet::call_index(14)] + #[pallet::weight(>::WeightInfo::cancel_approval())] + pub fn cancel_approval( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + maybe_check_delegate: Option>, + ) -> DispatchResult { + pallet_uniques::Pallet::::cancel_approval(origin, collection, item, maybe_check_delegate) + } + + /// Alter the attributes of a given item. + /// + /// Origin must be `ForceOrigin`. + /// + /// - `collection`: The identifier of the item. + /// - `owner`: The new Owner of this item. + /// - `issuer`: The new Issuer of this item. + /// - `admin`: The new Admin of this item. + /// - `freezer`: The new Freezer of this item. + /// - `free_holding`: Whether a deposit is taken for holding an item of this collection. + /// - `is_frozen`: Whether this collection is frozen except for permissioned/admin + /// instructions. + /// + /// Emits `ItemStatusChanged` with the identity of the item. + /// + /// Weight: `O(1)` + #[pallet::call_index(15)] + #[pallet::weight(>::WeightInfo::force_item_status())] + #[allow(clippy::too_many_arguments)] + pub fn force_item_status( + origin: OriginFor, + collection: T::CollectionId, + owner: AccountIdLookupOf, + issuer: AccountIdLookupOf, + admin: AccountIdLookupOf, + freezer: AccountIdLookupOf, + free_holding: bool, + is_frozen: bool, + ) -> DispatchResult { + pallet_uniques::Pallet::::force_item_status( + origin, + collection, + owner, + issuer, + admin, + freezer, + free_holding, + is_frozen, + ) + } + + /// Set an attribute for a collection or item. + /// + /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the + /// `collection`. + /// + /// If the origin is Signed, then funds of signer are reserved according to the formula: + /// `MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into + /// account any already reserved funds. + /// + /// - `collection`: The identifier of the collection whose item's metadata to set. + /// - `maybe_item`: The identifier of the item whose metadata to set. + /// - `key`: The key of the attribute. + /// - `value`: The value to which to set the attribute. + /// + /// Emits `AttributeSet`. + /// + /// Weight: `O(1)` + #[pallet::call_index(16)] + #[pallet::weight(>::WeightInfo::set_attribute())] + pub fn set_attribute( + origin: OriginFor, + collection: T::CollectionId, + maybe_item: Option, + key: BoundedVec, + value: BoundedVec, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_attribute(origin, collection, maybe_item, key, value) + } + + /// Clear an attribute for a collection or item. + /// + /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the + /// `collection`. + /// + /// Any deposit is freed for the collection's owner. + /// + /// - `collection`: The identifier of the collection whose item's metadata to clear. + /// - `maybe_item`: The identifier of the item whose metadata to clear. + /// - `key`: The key of the attribute. + /// + /// Emits `AttributeCleared`. + /// + /// Weight: `O(1)` + #[pallet::call_index(17)] + #[pallet::weight(>::WeightInfo::clear_attribute())] + pub fn clear_attribute( + origin: OriginFor, + collection: T::CollectionId, + maybe_item: Option, + key: BoundedVec, + ) -> DispatchResult { + pallet_uniques::Pallet::::clear_attribute(origin, collection, maybe_item, key) + } + + /// Set the metadata for an item. + /// + /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the + /// `collection`. + /// + /// If the origin is Signed, then funds of signer are reserved according to the formula: + /// `MetadataDepositBase + DepositPerByte * data.len` taking into + /// account any already reserved funds. + /// + /// - `collection`: The identifier of the collection whose item's metadata to set. + /// - `item`: The identifier of the item whose metadata to set. + /// - `data`: The general information of this item. Limited in length by `StringLimit`. + /// - `is_frozen`: Whether the metadata should be frozen against further changes. + /// + /// Emits `MetadataSet`. + /// + /// Weight: `O(1)` + #[pallet::call_index(18)] + #[pallet::weight(>::WeightInfo::set_metadata())] + pub fn set_metadata( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + data: BoundedVec, + is_frozen: bool, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_metadata(origin, collection, item, data, is_frozen) + } + + /// Clear the metadata for an item. + /// + /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the + /// `item`. + /// + /// Any deposit is freed for the collection's owner. + /// + /// - `collection`: The identifier of the collection whose item's metadata to clear. + /// - `item`: The identifier of the item whose metadata to clear. + /// + /// Emits `MetadataCleared`. + /// + /// Weight: `O(1)` + #[pallet::call_index(19)] + #[pallet::weight(>::WeightInfo::clear_metadata())] + pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { + pallet_uniques::Pallet::::clear_metadata(origin, collection, item) + } + + /// Set the metadata for a collection. + /// + /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of + /// the `collection`. + /// + /// If the origin is `Signed`, then funds of signer are reserved according to the formula: + /// `MetadataDepositBase + DepositPerByte * data.len` taking into + /// account any already reserved funds. + /// + /// - `collection`: The identifier of the item whose metadata to update. + /// - `data`: The general information of this item. Limited in length by `StringLimit`. + /// - `is_frozen`: Whether the metadata should be frozen against further changes. + /// + /// Emits `CollectionMetadataSet`. + /// + /// Weight: `O(1)` + #[pallet::call_index(20)] + #[pallet::weight(>::WeightInfo::set_collection_metadata())] + pub fn set_collection_metadata( + origin: OriginFor, + collection: T::CollectionId, + data: BoundedVec, + is_frozen: bool, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_collection_metadata(origin, collection, data, is_frozen) + } + + /// Clear the metadata for a collection. + /// + /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of + /// the `collection`. + /// + /// Any deposit is freed for the collection's owner. + /// + /// - `collection`: The identifier of the collection whose metadata to clear. + /// + /// Emits `CollectionMetadataCleared`. + /// + /// Weight: `O(1)` + #[pallet::call_index(21)] + #[pallet::weight(>::WeightInfo::clear_collection_metadata())] + pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { + pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) + } + + /// Set (or reset) the acceptance of ownership for a particular account. + /// + /// Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a + /// provider reference. + /// + /// - `maybe_collection`: The identifier of the collection whose ownership the signer is + /// willing to accept, or if `None`, an indication that the signer is willing to accept no + /// ownership transferal. + /// + /// Emits `OwnershipAcceptanceChanged`. + #[pallet::call_index(22)] + #[pallet::weight(>::WeightInfo::set_accept_ownership())] + pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { + pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) + } + + /// Set the maximum amount of items a collection could have. + /// + /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of + /// the `collection`. + /// + /// Note: This function can only succeed once per collection. + /// + /// - `collection`: The identifier of the collection to change. + /// - `max_supply`: The maximum amount of items a collection could have. + /// + /// Emits `CollectionMaxSupplySet` event when successful. + #[pallet::call_index(23)] + #[pallet::weight(>::WeightInfo::set_collection_max_supply())] + pub fn set_collection_max_supply( + origin: OriginFor, + collection: T::CollectionId, + max_supply: u32, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_collection_max_supply(origin, collection, max_supply) + } + + /// Set (or reset) the price for an item. + /// + /// Origin must be Signed and must be the owner of the asset `item`. + /// + /// - `collection`: The collection of the item. + /// - `item`: The item to set the price for. + /// - `price`: The price for the item. Pass `None`, to reset the price. + /// - `buyer`: Restricts the buy operation to a specific account. + /// + /// Emits `ItemPriceSet` on success if the price is not `None`. + /// Emits `ItemPriceRemoved` on success if the price is `None`. + #[pallet::call_index(24)] + #[pallet::weight(>::WeightInfo::set_price())] + pub fn set_price( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + price: Option>, + whitelisted_buyer: Option>, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_price(origin, collection, item, price, whitelisted_buyer) + } + + /// Allows to buy an item if it's up for sale. + /// + /// Origin must be Signed and must not be the owner of the `item`. + /// + /// - `collection`: The collection of the item. + /// - `item`: The item the sender wants to buy. + /// - `bid_price`: The price the sender is willing to pay. + /// + /// Emits `ItemBought` on success. + #[pallet::call_index(25)] + #[pallet::weight(>::WeightInfo::buy_item())] + #[transactional] + pub fn buy_item( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + bid_price: BalanceOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::buy_item(origin, collection, item, bid_price) + } + + /// Issue a new collection of non-fungible items from a public origin. + /// + /// This new collection has no items initially and its owner is the origin. + /// + /// The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + /// + /// `ItemDeposit` funds of sender are reserved. + /// + /// Parameters: + /// - `collection`: The identifier of the new collection. This must not be currently in use. + /// - `admin`: The admin of this collection. The admin is the initial address of each + /// member of the collection's admin team. + /// - `extra_deposit_limit`: The cap on the total amount of funds that an admin/issuer can + /// reserve from the collection owner (origin of this call) while minting NFTs with extra + /// deposit. + /// + /// Emits `Created` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(26)] + #[pallet::weight(>::WeightInfo::create_with_extra_deposit_limit())] + #[transactional] + pub fn create_with_extra_deposit_limit( + origin: OriginFor, + collection: T::CollectionId, + admin: AccountIdLookupOf, + limit: BalanceOf, + ) -> DispatchResult { + // Since the extrinsic is transactional the following call only succeeds if the + // collection is also created successfully. + CollectionExtraDepositDetails::::insert( + collection, + LimitedBalance::>::with_limit(limit), + ); + pallet_uniques::Pallet::::create(origin, collection, admin) + } + + /// Mint an item of a particular collection with extra deposit. + /// + /// The origin must be Signed and the sender must be the Issuer of the `collection`. + /// + /// - `collection`: The collection of the item to be minted. + /// - `item`: The item value of the item to be minted. + /// - `beneficiary`: The initial owner of the minted item. + /// + /// Emits `Issued` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(27)] + #[pallet::weight(>::WeightInfo::mint_with_extra_deposit())] + #[transactional] + pub fn mint_with_extra_deposit( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + owner: AccountIdLookupOf, + deposit: BalanceOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::mint(origin, collection, item, owner)?; + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + .ok_or(Error::::FailedToRetrieveCollectionOwner)?; + let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); + extra_deposit_details + .add(deposit) + .map_err(|_| Error::::FailedToIncreaseTotalExtraDeposit)?; + >::Currency::reserve(&collection_owner, deposit)?; + ItemExtraDeposits::::insert(collection, item, deposit); + CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); + Ok(()) + } + + /// Update extra deposit limit for a collection when it's not against what is already + /// reserved. + /// + /// Only the collection owner can update this limit to a value higher than the total extra + /// deposit for the collection currently. + /// + /// Parameters: + /// - `collection`: The identifier of the collection owned by the origin. + /// - `limit`: The new cap on the total amount of funds that an admin/issuer can + /// reserve from the collection owner (origin of this call) while minting NFTs with extra + /// deposit. + /// + /// Emits `ExtraDepositLimitUpdated` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(28)] + #[pallet::weight(>::WeightInfo::update_extra_deposit_limit())] + #[transactional] + pub fn update_extra_deposit_limit( + origin: OriginFor, + collection: T::CollectionId, + limit: BalanceOf, + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + let owner = pallet_uniques::Pallet::::collection_owner(collection) + .ok_or(Error::::FailedToRetrieveCollectionOwner)?; + ensure!(origin == owner, Error::::PermissionDenied); + + let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); + extra_deposit_details + .update_limit(limit) + .map_err(|_| Error::::FailedToUpdateExtraDepositLimit)?; + CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); + + Self::deposit_event(Event::::ExtraDepositLimitUpdated { collection, limit }); + Ok(()) + } + } +} diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs new file mode 100644 index 00000000000..24e70b2aba3 --- /dev/null +++ b/pallets/uniques/src/tests.rs @@ -0,0 +1,1086 @@ +use super::*; +use crate as pallet_nodle_uniques; + +use frame_support::{ + assert_noop, assert_ok, construct_runtime, parameter_types, + traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, +}; +use pallet_uniques::DestroyWitness; +use sp_core::H256; +use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, +}; + +type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; +type Block = frame_system::mocking::MockBlock; + +construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + Uniques: pallet_nodle_uniques::{Call, Storage, Event}, + Uniques2: pallet_uniques::{Pallet, Call, Storage, Event}, + } +); + +impl frame_system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type DbWeight = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; +} + +impl pallet_balances::Config for Test { + type Balance = u64; + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type MaxLocks = (); + type ExistentialDeposit = ConstU64<1>; + type AccountStore = frame_system::Pallet; + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type WeightInfo = (); + #[doc = " The ID type for holds."] + type HoldIdentifier = [u8; 8]; + #[doc = " The ID type for freezes."] + type FreezeIdentifier = [u8; 8]; + #[doc = " The maximum number of holds that can exist on an account at any time."] + type MaxHolds = (); + #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] + type MaxFreezes = (); +} +parameter_types! { + pub TestCollectionDeposit: u64 = 2; + pub TestItemDeposit: u64 = 1; +} + +impl pallet_uniques::Config for Test { + type RuntimeEvent = RuntimeEvent; + type CollectionId = u32; + type ItemId = u32; + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = frame_system::EnsureRoot; + type Locker = (); + type CollectionDeposit = TestCollectionDeposit; + type ItemDeposit = TestItemDeposit; + type MetadataDepositBase = ConstU64<1>; + type AttributeDepositBase = ConstU64<1>; + type DepositPerByte = ConstU64<1>; + type StringLimit = ConstU32<50>; + type KeyLimit = ConstU32<50>; + type ValueLimit = ConstU32<50>; + type WeightInfo = (); + #[cfg(feature = "runtime-benchmarks")] + type Helper = (); +} +impl Config for Test { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); +} + +macro_rules! bvec { + ($( $x:tt )*) => { + vec![$( $x )*].try_into().unwrap() + } +} +pub(crate) fn new_test_ext() -> sp_io::TestExternalities { + let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| System::set_block_number(1)); + ext +} +#[cfg(test)] +mod test_cases { + use super::*; + use frame_support::traits::Len; + #[test] + fn test_extra_deposit_limit_is_zero_if_not_set_explicitly() { + new_test_ext().execute_with(|| { + let collection_id = 0; + let collection_owner = 1; + let item_id = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, 100); + + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner, + )); + assert_noop!( + Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + 1 + ), + Error::::FailedToIncreaseTotalExtraDeposit + ); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + 0 + )); + assert_eq!( + Balances::reserved_balance(collection_owner), + TestCollectionDeposit::get() + TestItemDeposit::get() + ); + }) + } + + #[test] + fn test_extra_deposit_limit_is_set_per_collection() { + new_test_ext().execute_with(|| { + let extra_deposit_limits_per_collection = [(0, 53), (1, 143), (2, 0), (3, 1), (4, 71)]; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + let mut total_extra_deposit_limit = 0; + for (collection, extra_deposit_limit) in extra_deposit_limits_per_collection { + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + assert_noop!( + Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit_limit + 1 + ), + Error::::FailedToIncreaseTotalExtraDeposit + ); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit_limit + )); + total_extra_deposit_limit += extra_deposit_limit; + } + + assert_eq!( + Balances::reserved_balance(collection_owner), + (TestCollectionDeposit::get() + TestItemDeposit::get()) + * (extra_deposit_limits_per_collection.len() as u64) + + total_extra_deposit_limit + ); + }) + } + + #[test] + fn test_destroying_one_collection_does_not_impact_others() { + new_test_ext().execute_with(|| { + let extra_deposit_limits_per_collection = [(0, 53), (1, 143), (2, 0), (3, 1), (4, 71)]; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + for (collection, extra_deposit_limit) in extra_deposit_limits_per_collection { + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + } + + let witness = DestroyWitness { + items: 0, + item_metadatas: 0, + attributes: 0, + }; + assert_ok!(Uniques::destroy(RuntimeOrigin::signed(collection_owner), 1, witness)); + + // remaining collections after 1 us destroyed are 0, 2, 3, 4 + let remaining_collections_and_limits = [(0, 53), (2, 0), (3, 1), (4, 71)]; + + for (collection, extra_deposit_limit) in remaining_collections_and_limits { + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit_limit + )); + } + + assert_noop!( + Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), 1, item, item_owner, 1), + pallet_uniques::Error::::UnknownCollection + ); + }) + } + + #[test] + fn test_extra_deposit_limit_is_maintained_when_minting_several_items() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let collection = 0; + let collection_owner = 1; + // The deposits below sum up to 100. + let items_and_owners_and_deposits = [(0, 2, 53), (1, 3, 35), (2, 4, 0), (3, 5, 12)]; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + for (item, item_owner, deposit) in items_and_owners_and_deposits { + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + deposit + )); + } + + assert_noop!( + Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), collection, 4, 6, 1), + Error::::FailedToIncreaseTotalExtraDeposit + ); + }) + } + + #[test] + fn test_extra_deposit_limit_is_updatable_when_over_or_equal_previous_total() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let collection = 0; + let collection_owner = 1; + // The deposits below sum up to 100. + let items_and_owners_and_deposits = [(0, 2, 53), (1, 3, 35), (2, 4, 0)]; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + for (item, item_owner, deposit) in items_and_owners_and_deposits { + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + deposit + )); + } + let extra_deposit_total = CollectionExtraDepositDetails::::get(collection) + .unwrap_or_default() + .balance(); + assert_noop!( + Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + extra_deposit_total - 1 + ), + Error::::FailedToUpdateExtraDepositLimit + ); + + assert_ok!(Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + extra_deposit_total + )); + + assert_noop!( + Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), collection, 3, 5, 1), + Error::::FailedToIncreaseTotalExtraDeposit + ); + }) + } + + #[test] + fn test_only_collection_owner_can_update_extra_deposit_limit() { + new_test_ext().execute_with(|| { + let collection_id = 0; + let collection_owner = 1; + let collection_admin = 2; + + let item_owner = 3; + + Balances::make_free_balance_be(&collection_owner, 100); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_admin, + 20 + )); + + assert_noop!( + Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_admin), collection_id, 30), + Error::::PermissionDenied + ); + assert_noop!( + Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(item_owner), collection_id, 30), + Error::::PermissionDenied + ); + + assert_ok!(Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + 30 + )); + }) + } + + #[test] + fn test_updating_extra_deposit_limit_fails_when_collection_not_exist() { + new_test_ext().execute_with(|| { + let collection_id = 0; + let collection_owner = 1; + let collection_admin = 2; + + Balances::make_free_balance_be(&collection_owner, 100); + + assert_noop!( + Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_owner), collection_id, 30), + Error::::FailedToRetrieveCollectionOwner + ); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_admin, + 20 + )); + + assert_noop!( + Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_owner), collection_id + 1, 30), + Error::::FailedToRetrieveCollectionOwner + ); + + assert_ok!(Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + 30 + )); + }) + } + + #[test] + fn test_extra_deposit_is_updatable_for_collections_without_previous_extra_deposit_details() { + new_test_ext().execute_with(|| { + let collection_id = 7; + let collection_owner = 1; + let collection_admin = 2; + + Balances::make_free_balance_be(&collection_owner, 100); + + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_admin, + )); + + let limit = 30; + assert_ok!(Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + limit + )); + + assert_eq!( + CollectionExtraDepositDetails::::get(collection_id) + .unwrap() + .limit(), + limit + ); + }) + } + + #[test] + fn test_transfer_ownership_repatriates_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = extra_deposit_limit - 1; + + let collection_id = 0; + let collection_old_owner = 1; + let collection_new_owner = 2; + + let old_owner_reserved_balance = extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get(); + let old_owner_free_balance = 2 * old_owner_reserved_balance; + let new_owner_free_balance = old_owner_free_balance - 1; + + let item_id = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_old_owner, old_owner_free_balance); + Balances::make_free_balance_be(&collection_new_owner, new_owner_free_balance); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_old_owner), + collection_id, + collection_old_owner, + extra_deposit_limit + )); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_old_owner), + collection_id, + item_id, + item_owner, + extra_deposit + )); + assert_eq!( + Balances::reserved_balance(collection_old_owner), + old_owner_reserved_balance + ); + + assert_ok!(Uniques::set_accept_ownership( + RuntimeOrigin::signed(collection_new_owner), + Some(collection_id), + )); + assert_ok!(Uniques::transfer_ownership( + RuntimeOrigin::signed(collection_old_owner), + collection_id, + collection_new_owner + )); + + assert_eq!(Balances::reserved_balance(collection_old_owner), 0); + assert_eq!( + Balances::free_balance(collection_old_owner), + old_owner_free_balance - old_owner_reserved_balance + ); + assert_eq!( + Balances::reserved_balance(collection_new_owner), + old_owner_reserved_balance + ); + assert_eq!(Balances::free_balance(collection_new_owner), new_owner_free_balance); + }) + } + + #[test] + fn test_transfer_ownership_to_self() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = extra_deposit_limit - 1; + + let collection_id = 0; + let collection_owner = 1; + + let owner_reserved_balance = extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get(); + let owner_free_balance = 2 * owner_reserved_balance; + + let item_id = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, owner_free_balance); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner, + extra_deposit_limit + )); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + extra_deposit + )); + assert_eq!(Balances::reserved_balance(collection_owner), owner_reserved_balance); + + assert_ok!(Uniques::set_accept_ownership( + RuntimeOrigin::signed(collection_owner), + Some(collection_id), + )); + assert_ok!(Uniques::transfer_ownership( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner + )); + + assert_eq!(Balances::reserved_balance(collection_owner), owner_reserved_balance); + assert_eq!( + Balances::free_balance(collection_owner), + owner_free_balance - owner_reserved_balance + ); + }) + } + + #[test] + fn test_mint_with_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let item_id2 = 12; + let collection_owner_id = 1; + let item_owner = 42; + Balances::make_free_balance_be(&collection_owner_id, 100); + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + collection_owner_id, + 100 + )); + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + ); + assert_ok!(Uniques::set_collection_metadata( + RuntimeOrigin::signed(collection_owner_id), + 0, + bvec![0, 0], + false + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id2, + item_owner, + extra_deposit + )); + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + 2 * TestItemDeposit::get() + 2 * extra_deposit + 3 + ); + }) + } + + #[test] + fn test_burn_when_extra_deposit_is_zero() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let collection = 0; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + 0 + )); + + assert_ok!(Uniques::burn(RuntimeOrigin::signed(item_owner), collection, item, None)); + }) + } + + #[test] + fn test_burn_goes_ahead_despite_partial_unreserve() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = 20; + let collection = 0; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, 2 * extra_deposit_limit); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit + )); + + assert_ok!(Balances::force_unreserve( + RuntimeOrigin::root(), + collection_owner, + extra_deposit + )); + + assert_ok!(Uniques::burn(RuntimeOrigin::signed(item_owner), collection, item, None)); + }) + } + + #[test] + fn test_destroy_despite_partial_unreserve() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = 20; + let collection = 0; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, 2 * extra_deposit_limit); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit + )); + + assert_ok!(Balances::force_unreserve( + RuntimeOrigin::root(), + collection_owner, + extra_deposit + )); + + let witness = DestroyWitness { + items: 1, + item_metadatas: 0, + attributes: 0, + }; + assert_ok!(Uniques::destroy( + RuntimeOrigin::signed(collection_owner), + collection, + witness + )); + }) + } + + #[test] + fn test_destroy_removes_extra_deposit_details() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = 20; + let collection = 0; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, 3 * extra_deposit_limit); + + assert!(!CollectionExtraDepositDetails::::contains_key(collection)); + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + assert_eq!( + CollectionExtraDepositDetails::::get(collection).unwrap().limit(), + extra_deposit_limit + ); + + assert!(ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit + )); + assert!(!ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); + assert_eq!( + CollectionExtraDepositDetails::::get(collection) + .unwrap() + .balance(), + extra_deposit + ); + + let witness = DestroyWitness { + items: 1, + item_metadatas: 0, + attributes: 0, + }; + assert_ok!(Uniques::destroy( + RuntimeOrigin::signed(collection_owner), + collection, + witness + )); + assert!(!CollectionExtraDepositDetails::::contains_key(collection)); + assert!(ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); + + // Recreate the collection with higher limit + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + 1 + )); + assert_eq!( + CollectionExtraDepositDetails::::get(collection).unwrap().limit(), + extra_deposit_limit + 1 + ); + assert_eq!( + CollectionExtraDepositDetails::::get(collection) + .unwrap() + .balance(), + 0 + ); + }) + } + + #[test] + fn test_mint_and_burn_with_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let collection_owner_id = 1; + let item_owner = 42; + let init_balance = 100; + Balances::make_free_balance_be(&collection_owner_id, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + collection_owner_id, + 100 + )); + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + ); + assert_ok!(Uniques::set_collection_metadata( + RuntimeOrigin::signed(collection_owner_id), + 0, + bvec![0, 0], + false + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + + assert_ok!(Uniques::burn( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id, + None + )); + + // check if extra deposit is freed as well as the item deposit + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + 3 + ); + // check that the owner of the collection does not recover the reserved amount of the burnt item + assert_eq!( + Balances::free_balance(collection_owner_id), + init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) + ); + // extra deposit transferred to the item owner free balance + assert_eq!(Balances::free_balance(item_owner), init_balance + extra_deposit); + }) + } + + #[test] + fn test_mint_and_burn_wrong_origin_with_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let collection_owner_id = 1; + let not_collection_owner_id = 255; + let item_owner = 42; + let init_balance = 100; + Balances::make_free_balance_be(&collection_owner_id, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + collection_owner_id, + 100 + )); + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + ); + assert_ok!(Uniques::set_collection_metadata( + RuntimeOrigin::signed(1), + 0, + bvec![0, 0], + false + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + + assert_noop!( + Uniques::burn( + RuntimeOrigin::signed(not_collection_owner_id), + collection_id, + item_id, + None + ), + pallet_uniques::Error::::NoPermission + ); + + // reserved balance should not have changed + assert_eq!( + Balances::reserved_balance(collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + }) + } + + #[test] + fn test_destroy_collection() { + new_test_ext().execute_with(|| { + let collection_id = 0; + let items = [10, 12, 15]; + let extra_deposits = [20, 30, 40]; + let collection_owner = 1; + let owners = [42, 43]; + let init_balance = 100; + + let total_extra_deposit = extra_deposits.into_iter().reduce(|a, b| a + b).unwrap(); + + Balances::make_free_balance_be(&collection_owner, init_balance); + Balances::make_free_balance_be(&owners[0], init_balance); + Balances::make_free_balance_be(&owners[1], init_balance); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner, + 100 + )); + assert_eq!( + Balances::reserved_balance(collection_owner), + TestCollectionDeposit::get() + ); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + items[0], + owners[0], + extra_deposits[0] + )); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + items[1], + owners[0], + extra_deposits[1] + )); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + items[2], + owners[1], + extra_deposits[2] + )); + + assert_eq!( + Balances::reserved_balance(collection_owner), + total_extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get() * items.len() as u64 + ); + assert_eq!( + ItemExtraDeposits::::iter_prefix(collection_id).count(), + items.len() + ); + + let witness = DestroyWitness { + items: items.len() as u32, + item_metadatas: 0, + attributes: 0, + }; + assert_ok!(Uniques::destroy( + RuntimeOrigin::signed(collection_owner), + collection_id, + witness + )); + + assert_eq!(ItemExtraDeposits::::iter_prefix(collection_id).count(), 0); + assert_eq!(Balances::reserved_balance(collection_owner), 0); + assert_eq!( + Balances::free_balance(collection_owner), + init_balance - total_extra_deposit + ); + assert_eq!( + Balances::free_balance(owners[0]), + init_balance + extra_deposits[0] + extra_deposits[1] + ); + assert_eq!(Balances::free_balance(owners[1]), init_balance + extra_deposits[2]); + }) + } + + #[test] + fn test_no_storage_change_happens_if_destroy_fails() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let collection_owner = 1; + let item_owner = 42; + let init_balance = 100; + + Balances::make_free_balance_be(&collection_owner, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner, + 100 + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + // This wrong witness should make the destroy fail + let witness = DestroyWitness { + items: 2, + item_metadatas: 0, + attributes: 0, + }; + + assert_noop!( + Uniques::destroy(RuntimeOrigin::signed(1), collection_id, witness), + pallet_uniques::Error::::BadWitness + ); + + assert_eq!( + ItemExtraDeposits::::get(collection_id, item_id).unwrap(), + extra_deposit + ); + }) + } + + #[test] + fn test_no_storage_change_happens_if_burn_fails() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let collection_owner = 1; + let non_owner = 2; + let item_owner = 42; + let init_balance = 100; + + Balances::make_free_balance_be(&collection_owner, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner, + 100 + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_noop!( + Uniques::burn(RuntimeOrigin::signed(non_owner), collection_id, item_id, None), + pallet_uniques::Error::::NoPermission + ); + + assert_eq!( + ItemExtraDeposits::::get(collection_id, item_id).unwrap(), + extra_deposit + ); + }) + } +} diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs new file mode 100644 index 00000000000..2a4ba2ad6c8 --- /dev/null +++ b/pallets/uniques/src/weights.rs @@ -0,0 +1,401 @@ +/* + * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain + * Copyright (C) 2020-2022 Nodle International + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +//! Autogenerated weights for pallet_nodle_uniques +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-08-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-66242306`, CPU: `AMD EPYC 7B13` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/nodle-parachain +// benchmark +// pallet +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_nodle_uniques +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --template=./.maintain/internal_pallet_weights.hbs +// --output=temp_weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}}; +use core::marker::PhantomData; + +/// Weight functions needed for pallet_nodle_uniques. +pub trait WeightInfo { + fn destroy(n: u32, m: u32, a: u32, ) -> Weight; + fn mint_with_extra_deposit() -> Weight; + fn burn() -> Weight; + fn create_with_extra_deposit_limit() -> Weight; + fn transfer_ownership() -> Weight; + fn update_extra_deposit_limit() -> Weight; +} + +/// Weight functions for `pallet_nodle_uniques`. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:1001 w:1000) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1001 w:1000) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1000) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. + fn destroy(n: u32, m: u32, a: u32, ) -> Weight { + // Minimum execution time: 3_419_681 nanoseconds. + Weight::from_parts(3_431_080_000_u64, 0) + // Standard Error: 32_660 + .saturating_add(Weight::from_parts(38_598_337_u64, 0).saturating_mul(n as u64)) + // Standard Error: 32_660 + .saturating_add(Weight::from_parts(333_521_u64, 0).saturating_mul(m as u64)) + // Standard Error: 32_660 + .saturating_add(Weight::from_parts(270_245_u64, 0).saturating_mul(a as u64)) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a as u64))) + .saturating_add(T::DbWeight::get().writes(8_u64)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m as u64))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a as u64))) + } + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:0 w:1) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + fn mint_with_extra_deposit() -> Weight { + // Minimum execution time: 99_300 nanoseconds. + Weight::from_parts(101_730_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques ItemExtraDeposits (r:1 w:1) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + fn burn() -> Weight { + // Minimum execution time: 97_760 nanoseconds. + Weight::from_parts(99_120_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn create_with_extra_deposit_limit() -> Weight { + // Minimum execution time: 59_440 nanoseconds. + Weight::from_parts(60_520_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) + } + // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) + // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:2 w:2) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:0) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:2) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + fn transfer_ownership() -> Weight { + // Minimum execution time: 90_020 nanoseconds. + Weight::from_parts(91_620_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn update_extra_deposit_limit() -> Weight { + // Minimum execution time: 32_170 nanoseconds. + Weight::from_parts(32_890_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} + +impl WeightInfo for () { + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:1001 w:1000) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1001 w:1000) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1000) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. + fn destroy(n: u32, m: u32, a: u32, ) -> Weight { + // Minimum execution time: 3_419_681 nanoseconds. + Weight::from_parts(3_431_080_000_u64, 0) + // Standard Error: 32_660 + .saturating_add(Weight::from_parts(38_598_337_u64, 0).saturating_mul(n as u64)) + // Standard Error: 32_660 + .saturating_add(Weight::from_parts(333_521_u64, 0).saturating_mul(m as u64)) + // Standard Error: 32_660 + .saturating_add(Weight::from_parts(270_245_u64, 0).saturating_mul(a as u64)) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n as u64))) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m as u64))) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a as u64))) + .saturating_add(RocksDbWeight::get().writes(8_u64)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n as u64))) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(m as u64))) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a as u64))) + } + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:0 w:1) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + fn mint_with_extra_deposit() -> Weight { + // Minimum execution time: 99_300 nanoseconds. + Weight::from_parts(101_730_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(9_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques ItemExtraDeposits (r:1 w:1) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + fn burn() -> Weight { + // Minimum execution time: 97_760 nanoseconds. + Weight::from_parts(99_120_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn create_with_extra_deposit_limit() -> Weight { + // Minimum execution time: 59_440 nanoseconds. + Weight::from_parts(60_520_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(RocksDbWeight::get().writes(6_u64)) + } + // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) + // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:2 w:2) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:0) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:2) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + fn transfer_ownership() -> Weight { + // Minimum execution time: 90_020 nanoseconds. + Weight::from_parts(91_620_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(9_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn update_extra_deposit_limit() -> Weight { + // Minimum execution time: 32_170 nanoseconds. + Weight::from_parts(32_890_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + } +} From 75c24b4604083788d208357587df72ec93908c25 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 11 Oct 2023 15:10:09 +0900 Subject: [PATCH 29/68] Auto reformat --- pallets/allocations/src/tests.rs | 2 +- pallets/reserve/src/tests.rs | 4 ++-- pallets/sponsorship/src/mock.rs | 5 +---- pallets/uniques/src/lib.rs | 5 +++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pallets/allocations/src/tests.rs b/pallets/allocations/src/tests.rs index 00ae964d7d7..268efa30867 100644 --- a/pallets/allocations/src/tests.rs +++ b/pallets/allocations/src/tests.rs @@ -33,7 +33,7 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BadOrigin, BlakeTwo256, IdentityLookup}, - Perbill, BuildStorage, + BuildStorage, Perbill, }; pub(crate) type AccountId = u64; diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index 7765eaf3d75..b146b8534d5 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -22,7 +22,7 @@ use super::*; use crate::{self as pallet_reserve}; use frame_support::{assert_noop, assert_ok, ord_parameter_types, parameter_types, traits::ConstU64, traits::Currency}; use frame_system::{EnsureSignedBy, RawOrigin}; -use sp_core::{H256, Blake2Hasher}; +use sp_core::{Blake2Hasher, H256}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, @@ -108,7 +108,7 @@ type TestCurrency = ::Currency; // This function basically just builds a genesis storage key/value store according to // our desired mockup. pub fn new_test_ext() -> sp_io::TestExternalities { - let t:frame_system::GenesisConfig = frame_system::GenesisConfig::default(); + let t: frame_system::GenesisConfig = frame_system::GenesisConfig::default(); sp_io::TestExternalities::new(t.into()) } diff --git a/pallets/sponsorship/src/mock.rs b/pallets/sponsorship/src/mock.rs index 163686e8f10..5f918aa5b1a 100644 --- a/pallets/sponsorship/src/mock.rs +++ b/pallets/sponsorship/src/mock.rs @@ -170,8 +170,5 @@ impl pallet_sponsorship::Config for Test { // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - frame_system::GenesisConfig::default() - .build_storage() - .unwrap() - .into() + frame_system::GenesisConfig::default().build_storage().unwrap().into() } diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index ac3b7f3c52c..5ab92783009 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -107,8 +107,9 @@ pub mod pallet { #[pallet::call] impl, I: 'static> Pallet - where T::CollectionId: Copy - { + where + T::CollectionId: Copy, + { /// Issue a new collection of non-fungible items from a public origin. /// /// This new collection has no items initially and its owner is the origin. From fc96f5d758c2c02f18cb24dc95c5e94584da4251 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 13 Oct 2023 14:56:33 +0900 Subject: [PATCH 30/68] Uniques test --- pallets/uniques/src/tests.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 24e70b2aba3..2dbcbfa01be 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -16,12 +16,8 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + pub enum Test { + System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, Uniques: pallet_nodle_uniques::{Call, Storage, Event}, Uniques2: pallet_uniques::{Pallet, Call, Storage, Event}, @@ -34,13 +30,11 @@ impl frame_system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU64<250>; type DbWeight = (); @@ -53,6 +47,7 @@ impl frame_system::Config for Test { type SS58Prefix = (); type OnSetCode = (); type MaxConsumers = ConstU32<16>; + type Nonce = u32; } impl pallet_balances::Config for Test { @@ -65,14 +60,15 @@ impl pallet_balances::Config for Test { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - #[doc = " The ID type for holds."] - type HoldIdentifier = [u8; 8]; + // #[doc = " The ID type for holds."] + // type HoldIdentifier = [u8; 8]; #[doc = " The ID type for freezes."] type FreezeIdentifier = [u8; 8]; #[doc = " The maximum number of holds that can exist on an account at any time."] type MaxHolds = (); #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] type MaxFreezes = (); + type RuntimeHoldReason = (); } parameter_types! { pub TestCollectionDeposit: u64 = 2; From 55fcf5283fe3301fcfa84a50e27bfaad0622a85c Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 16 Oct 2023 15:20:35 +0900 Subject: [PATCH 31/68] Remove warnings and errors --- node/src/service.rs | 2 +- pallets/allocations/src/tests.rs | 3 +-- pallets/grants/src/mock.rs | 2 +- pallets/reserve/src/tests.rs | 3 +-- pallets/uniques/src/lib.rs | 2 +- pallets/uniques/src/tests.rs | 4 ++-- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/node/src/service.rs b/node/src/service.rs index c447fd1dedf..fd53d1b74c4 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -262,7 +262,7 @@ where let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); // TODO there should be more here: - let mut net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); + let net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = build_network(BuildNetworkParams { diff --git a/pallets/allocations/src/tests.rs b/pallets/allocations/src/tests.rs index 268efa30867..856afa80fec 100644 --- a/pallets/allocations/src/tests.rs +++ b/pallets/allocations/src/tests.rs @@ -31,7 +31,6 @@ use frame_system::EnsureSignedBy; use lazy_static::lazy_static; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BadOrigin, BlakeTwo256, IdentityLookup}, BuildStorage, Perbill, }; @@ -168,7 +167,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { sp_tracing::try_init_simple(); let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + .build_storage() .unwrap_or_else(|err| { panic!( "new_test_ext:[{:#?}] - FrameSystem GenesisConfig Err:[{:#?}]!!!", diff --git a/pallets/grants/src/mock.rs b/pallets/grants/src/mock.rs index 1acb87d7777..1a28a3fc163 100644 --- a/pallets/grants/src/mock.rs +++ b/pallets/grants/src/mock.rs @@ -26,7 +26,7 @@ use frame_support::{ord_parameter_types, parameter_types}; use frame_system::EnsureSignedBy; use sp_core::H256; -use sp_runtime::{testing::Header, traits::IdentityLookup, BuildStorage}; +use sp_runtime::{traits::IdentityLookup, BuildStorage}; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index b146b8534d5..975eb9f14da 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -22,9 +22,8 @@ use super::*; use crate::{self as pallet_reserve}; use frame_support::{assert_noop, assert_ok, ord_parameter_types, parameter_types, traits::ConstU64, traits::Currency}; use frame_system::{EnsureSignedBy, RawOrigin}; -use sp_core::{Blake2Hasher, H256}; +use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, DispatchError::BadOrigin, }; diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 5ab92783009..f7f6b1f9b16 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -189,7 +189,7 @@ pub mod pallet { collection: T::CollectionId, witness: DestroyWitness, ) -> DispatchResultWithPostInfo { - let collection_owner = pallet_uniques::Pallet::::collection_owner(collection.clone()) + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) .ok_or(Error::::FailedToRetrieveCollectionOwner)?; for (item, extra_deposit) in ItemExtraDeposits::::drain_prefix(collection) { let item_owner = pallet_uniques::Pallet::::owner(collection, item) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 2dbcbfa01be..292fe84b2b4 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -10,8 +10,8 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; - type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -106,7 +106,7 @@ macro_rules! bvec { } } pub(crate) fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let t = frame_system::GenesisConfig::default().build_storage().unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); From 023773857903e92c8848b6922baaa6c30617fea9 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 19 Oct 2023 14:56:55 +0900 Subject: [PATCH 32/68] Reintegrate uniques pallet and cleanup CLI --- Cargo.lock | 1 + node/src/command.rs | 29 ++++++++++--- pallets/uniques/src/lib.rs | 71 +++++++++++++++---------------- runtimes/eden/Cargo.toml | 4 ++ runtimes/eden/src/lib.rs | 5 ++- runtimes/eden/src/pallets_util.rs | 7 ++- 6 files changed, 73 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f559ad00a6..babfb72085c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9377,6 +9377,7 @@ dependencies = [ "pallet-mandate", "pallet-membership", "pallet-multisig", + "pallet-nodle-uniques", "pallet-offences", "pallet-preimage", "pallet-reserve", diff --git a/node/src/command.rs b/node/src/command.rs index a57977ae133..97fed7c4456 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -185,11 +185,29 @@ pub fn run() -> Result<()> { } Some(Subcommand::ExportGenesisState(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.sync_run(|_config| { + runner.sync_run(|config| { let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; - // let client = Default::default(); - // cmd.run::(&*spec, client) - Ok(()) //TODO FIXME + // let telemetry = config + // .telemetry_endpoints + // .clone() + // .filter(|x| !x.is_empty()) + // .map(|endpoints| -> Result<_, sc_telemetry::Error> { + // let worker = TelemetryWorker::new(16)?; + // let telemetry = worker.handle().new_telemetry(endpoints); + // Ok((worker, telemetry)) + // }) + // .transpose()?; + + // let (client, backend, keystore_container, task_manager) = + // sc_service::new_full_parts::( + // config, + // telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), + // executor, + // )?; + let partials = new_partial(&config, parachain_build_import_queue)?; + + cmd.run(&*config.chain_spec, &*partials.client) + // cmd.run(&*config.chain_spec, client) }) } Some(Subcommand::ExportGenesisWasm(cmd)) => { @@ -207,8 +225,7 @@ pub fn run() -> Result<()> { match cmd { BenchmarkCmd::Pallet(cmd) => { if cfg!(feature = "runtime-benchmarks") { - //TODO runner.sync_run(|config| cmd.run::(config)) - Ok(()) + runner.sync_run(|config| cmd.run::(config)) } else { Err("Benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index f7f6b1f9b16..e2f70724536 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -106,10 +106,7 @@ pub mod pallet { } #[pallet::call] - impl, I: 'static> Pallet - where - T::CollectionId: Copy, - { + impl, I: 'static> Pallet { /// Issue a new collection of non-fungible items from a public origin. /// /// This new collection has no items initially and its owner is the origin. @@ -133,7 +130,7 @@ pub mod pallet { collection: T::CollectionId, admin: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::create(origin, collection, admin) + pallet_uniques::Pallet::::create(origin, collection.clone(), admin) } /// Issue a new collection of non-fungible items from a privileged origin. /// @@ -160,7 +157,7 @@ pub mod pallet { owner: AccountIdLookupOf, free_holding: bool, ) -> DispatchResult { - pallet_uniques::Pallet::::force_create(origin, collection, owner, free_holding) + pallet_uniques::Pallet::::force_create(origin, collection.clone(), owner, free_holding) } /// Destroy a collection of fungible items. @@ -189,10 +186,10 @@ pub mod pallet { collection: T::CollectionId, witness: DestroyWitness, ) -> DispatchResultWithPostInfo { - let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection.clone()) .ok_or(Error::::FailedToRetrieveCollectionOwner)?; - for (item, extra_deposit) in ItemExtraDeposits::::drain_prefix(collection) { - let item_owner = pallet_uniques::Pallet::::owner(collection, item) + for (item, extra_deposit) in ItemExtraDeposits::::drain_prefix(collection.clone()) { + let item_owner = pallet_uniques::Pallet::::owner(collection.clone(), item) .ok_or(Error::::FailedToRetrieveItemOwner)?; >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( @@ -202,7 +199,7 @@ pub mod pallet { ExistenceRequirement::AllowDeath, )?; } - CollectionExtraDepositDetails::::remove(collection); + CollectionExtraDepositDetails::::remove(collection.clone()); pallet_uniques::Pallet::::destroy(origin, collection, witness) } @@ -225,7 +222,7 @@ pub mod pallet { item: T::ItemId, owner: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::mint(origin, collection, item, owner) + pallet_uniques::Pallet::::mint(origin, collection.clone(), item, owner) } /// Destroy a single item. @@ -251,12 +248,12 @@ pub mod pallet { item: T::ItemId, check_owner: Option>, ) -> DispatchResult { - let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection.clone()) .ok_or(Error::::FailedToRetrieveCollectionOwner)?; - let item_owner = pallet_uniques::Pallet::::owner(collection, item) + let item_owner = pallet_uniques::Pallet::::owner(collection.clone(), item) .ok_or(Error::::FailedToRetrieveItemOwner)?; - pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; - let extra_deposit = ItemExtraDeposits::::take(collection, item).unwrap_or_else(Zero::zero); + pallet_uniques::Pallet::::burn(origin, collection.clone(), item, check_owner)?; + let extra_deposit = ItemExtraDeposits::::take(collection.clone(), item).unwrap_or_else(Zero::zero); if !extra_deposit.is_zero() { >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( @@ -295,7 +292,7 @@ pub mod pallet { item: T::ItemId, dest: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::transfer(origin, collection, item, dest) + pallet_uniques::Pallet::::transfer(origin, collection.clone(), item, dest) } /// Reevaluate the deposits on some items. @@ -318,7 +315,7 @@ pub mod pallet { #[pallet::call_index(6)] #[pallet::weight(>::WeightInfo::redeposit(items.len() as u32))] pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { - pallet_uniques::Pallet::::redeposit(origin, collection, items) + pallet_uniques::Pallet::::redeposit(origin, collection.clone(), items) } /// Disallow further unprivileged transfer of an item. @@ -334,7 +331,7 @@ pub mod pallet { #[pallet::call_index(7)] #[pallet::weight(>::WeightInfo::freeze())] pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::freeze(origin, collection, item) + pallet_uniques::Pallet::::freeze(origin, collection.clone(), item) } /// Re-allow unprivileged transfer of an item. @@ -350,7 +347,7 @@ pub mod pallet { #[pallet::call_index(8)] #[pallet::weight(>::WeightInfo::thaw())] pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::thaw(origin, collection, item) + pallet_uniques::Pallet::::thaw(origin, collection.clone(), item) } /// Disallow further unprivileged transfers for a whole collection. @@ -365,7 +362,7 @@ pub mod pallet { #[pallet::call_index(9)] #[pallet::weight(>::WeightInfo::freeze_collection())] pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::freeze_collection(origin, collection) + pallet_uniques::Pallet::::freeze_collection(origin, collection.clone()) } /// Re-allow unprivileged transfers for a whole collection. @@ -380,7 +377,7 @@ pub mod pallet { #[pallet::call_index(10)] #[pallet::weight(>::WeightInfo::thaw_collection())] pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::thaw_collection(origin, collection) + pallet_uniques::Pallet::::thaw_collection(origin, collection.clone()) } /// Change the Owner of a collection. @@ -401,11 +398,11 @@ pub mod pallet { collection: T::CollectionId, owner: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::transfer_ownership(origin.clone(), collection, owner.clone())?; + pallet_uniques::Pallet::::transfer_ownership(origin.clone(), collection.clone(), owner.clone())?; let old_owner = ensure_signed(origin)?; let new_owner = T::Lookup::lookup(owner)?; if old_owner != new_owner { - let total_extra_deposit = CollectionExtraDepositDetails::::get(collection) + let total_extra_deposit = CollectionExtraDepositDetails::::get(collection.clone()) .unwrap_or_default() .balance(); T::Currency::repatriate_reserved(&old_owner, &new_owner, total_extra_deposit, Reserved)?; @@ -434,7 +431,7 @@ pub mod pallet { admin: AccountIdLookupOf, freezer: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::set_team(origin, collection, issuer, admin, freezer) + pallet_uniques::Pallet::::set_team(origin, collection.clone(), issuer, admin, freezer) } /// Approve an item to be transferred by a delegated third-party account. @@ -610,7 +607,7 @@ pub mod pallet { data: BoundedVec, is_frozen: bool, ) -> DispatchResult { - pallet_uniques::Pallet::::set_metadata(origin, collection, item, data, is_frozen) + pallet_uniques::Pallet::::set_metadata(origin, collection.clone(), item, data, is_frozen) } /// Clear the metadata for an item. @@ -629,7 +626,7 @@ pub mod pallet { #[pallet::call_index(19)] #[pallet::weight(>::WeightInfo::clear_metadata())] pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::clear_metadata(origin, collection, item) + pallet_uniques::Pallet::::clear_metadata(origin, collection.clone(), item) } /// Set the metadata for a collection. @@ -674,7 +671,7 @@ pub mod pallet { #[pallet::call_index(21)] #[pallet::weight(>::WeightInfo::clear_collection_metadata())] pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) + pallet_uniques::Pallet::::clear_collection_metadata(origin, collection.clone()) } /// Set (or reset) the acceptance of ownership for a particular account. @@ -789,7 +786,7 @@ pub mod pallet { // Since the extrinsic is transactional the following call only succeeds if the // collection is also created successfully. CollectionExtraDepositDetails::::insert( - collection, + collection.clone(), LimitedBalance::>::with_limit(limit), ); pallet_uniques::Pallet::::create(origin, collection, admin) @@ -816,16 +813,17 @@ pub mod pallet { owner: AccountIdLookupOf, deposit: BalanceOf, ) -> DispatchResult { - pallet_uniques::Pallet::::mint(origin, collection, item, owner)?; - let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + pallet_uniques::Pallet::::mint(origin, collection.clone(), item, owner)?; + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection.clone()) .ok_or(Error::::FailedToRetrieveCollectionOwner)?; - let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); + let mut extra_deposit_details = + CollectionExtraDepositDetails::::get(collection.clone()).unwrap_or_default(); extra_deposit_details .add(deposit) .map_err(|_| Error::::FailedToIncreaseTotalExtraDeposit)?; >::Currency::reserve(&collection_owner, deposit)?; - ItemExtraDeposits::::insert(collection, item, deposit); - CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); + ItemExtraDeposits::::insert(collection.clone(), item, deposit); + CollectionExtraDepositDetails::::insert(collection.clone(), extra_deposit_details); Ok(()) } @@ -853,15 +851,16 @@ pub mod pallet { limit: BalanceOf, ) -> DispatchResult { let origin = ensure_signed(origin)?; - let owner = pallet_uniques::Pallet::::collection_owner(collection) + let owner = pallet_uniques::Pallet::::collection_owner(collection.clone()) .ok_or(Error::::FailedToRetrieveCollectionOwner)?; ensure!(origin == owner, Error::::PermissionDenied); - let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); + let mut extra_deposit_details = + CollectionExtraDepositDetails::::get(collection.clone()).unwrap_or_default(); extra_deposit_details .update_limit(limit) .map_err(|_| Error::::FailedToUpdateExtraDepositLimit)?; - CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); + CollectionExtraDepositDetails::::insert(collection.clone(), extra_deposit_details); Self::deposit_event(Event::::ExtraDepositLimitUpdated { collection, limit }); Ok(()) diff --git a/runtimes/eden/Cargo.toml b/runtimes/eden/Cargo.toml index 9665a6e0410..a0c22ef0c47 100644 --- a/runtimes/eden/Cargo.toml +++ b/runtimes/eden/Cargo.toml @@ -24,6 +24,7 @@ std = [ "pallet-mandate/std", "pallet-membership/std", "pallet-multisig/std", + "pallet-nodle-uniques/std", "pallet-sponsorship/std", "pallet-offences/std", "pallet-insecure-randomness-collective-flip/std", @@ -93,6 +94,7 @@ runtime-benchmarks = [ "pallet-preimage/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-uniques/runtime-benchmarks", + "pallet-nodle-uniques/runtime-benchmarks", "pallet-sponsorship/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", @@ -121,6 +123,7 @@ try-runtime = [ "pallet-membership/try-runtime", "pallet-multisig/try-runtime", "pallet-sponsorship/try-runtime", + "pallet-nodle-uniques/try-runtime", "pallet-offences/try-runtime", "pallet-insecure-randomness-collective-flip/try-runtime", "pallet-reserve/try-runtime", @@ -226,6 +229,7 @@ pallet-reserve = { default-features = false, path = "../../pallets/reserve" } pallet-grants = { default-features = false, path = "../../pallets/grants" } pallet-mandate = { default-features = false, path = "../../pallets/mandate" } pallet-sponsorship = { default-features = false, path = "../../pallets/sponsorship" } +pallet-nodle-uniques = { default-features = false, path = "../../pallets/uniques" } orml-xtokens = { git = "https://github.com/NodleCode/open-runtime-module-library.git", branch = "iso/polkadot-v1.0.0", default-features = false } orml-traits = { git = "https://github.com/NodleCode/open-runtime-module-library.git", branch = "iso/polkadot-v1.0.0", default-features = false } [build-dependencies] diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index b074790b4ea..36308aa03a6 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -107,8 +107,9 @@ construct_runtime! { // Neat things Utility: pallet_utility = 40, Multisig: pallet_multisig = 41, - Uniques: pallet_uniques = 42, + Uniques: pallet_uniques::{Pallet, Storage, Event} = 42, Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 43, + NodleUniques: pallet_nodle_uniques = 44, Sponsorship: pallet_sponsorship = 45, // Nodle Stack @@ -373,6 +374,7 @@ sp_api::impl_runtime_apis! { list_benchmark!(list, extra, pallet_reserve, CompanyReserve); list_benchmark!(list, extra, pallet_grants, Vesting); list_benchmark!(list, extra, pallet_uniques, Uniques); + list_benchmark!(list, extra, pallet_nodle_uniques, NodleUniques); list_benchmark!(list, extra, pallet_sponsorship, Sponsorship); list_benchmark!(list, extra, pallet_utility, Utility); list_benchmark!(list, extra, pallet_allocations, Allocations); @@ -415,6 +417,7 @@ sp_api::impl_runtime_apis! { add_benchmark!(params, batches, pallet_reserve, CompanyReserve); add_benchmark!(params, batches, pallet_grants, Vesting); add_benchmark!(params, batches, pallet_uniques, Uniques); + add_benchmark!(params, batches, pallet_nodle_uniques, NodleUniques); add_benchmark!(params, batches, pallet_sponsorship, Sponsorship); add_benchmark!(params, batches, pallet_utility, Utility); add_benchmark!(params, batches, pallet_allocations, Allocations); diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 6542720e3b5..92a05774710 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -150,7 +150,7 @@ impl InstanceFilter for SponsorshipType { fn filter(&self, c: &RuntimeCall) -> bool { match self { SponsorshipType::AnySafe => !matches!(c, RuntimeCall::Utility { .. }), - SponsorshipType::Uniques => matches!(c, RuntimeCall::Uniques { .. }), + SponsorshipType::Uniques => matches!(c, RuntimeCall::NodleUniques { .. }), } } fn is_superset(&self, o: &Self) -> bool { @@ -172,6 +172,11 @@ impl pallet_sponsorship::Config for Runtime { type WeightInfo = pallet_sponsorship::weights::SubstrateWeight; } +impl pallet_nodle_uniques::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = pallet_nodle_uniques::weights::SubstrateWeight; +} + parameter_types! { pub const DepositPerItem: Balance = constants::deposit(1, 0); pub const DepositPerByte: Balance = constants::deposit(0, 1); From 2f6dba6be36307c0cc40da6d5148c0ba83ad064b Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 19 Oct 2023 14:58:15 +0900 Subject: [PATCH 33/68] Cleanup --- node/src/command.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/node/src/command.rs b/node/src/command.rs index 97fed7c4456..03ac6044e8c 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -186,28 +186,8 @@ pub fn run() -> Result<()> { Some(Subcommand::ExportGenesisState(cmd)) => { let runner = cli.create_runner(cmd)?; runner.sync_run(|config| { - let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; - // let telemetry = config - // .telemetry_endpoints - // .clone() - // .filter(|x| !x.is_empty()) - // .map(|endpoints| -> Result<_, sc_telemetry::Error> { - // let worker = TelemetryWorker::new(16)?; - // let telemetry = worker.handle().new_telemetry(endpoints); - // Ok((worker, telemetry)) - // }) - // .transpose()?; - - // let (client, backend, keystore_container, task_manager) = - // sc_service::new_full_parts::( - // config, - // telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - // executor, - // )?; let partials = new_partial(&config, parachain_build_import_queue)?; - cmd.run(&*config.chain_spec, &*partials.client) - // cmd.run(&*config.chain_spec, client) }) } Some(Subcommand::ExportGenesisWasm(cmd)) => { From 68f6683576fe68f6bd2460f2b4b6ffd0bc84283a Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 19 Oct 2023 15:40:09 +0900 Subject: [PATCH 34/68] RuntimeGenesisConfig --- node/src/chain_spec.rs | 14 +++++++------- node/src/command.rs | 4 ++-- node/src/service.rs | 2 +- pallets/allocations/src/tests.rs | 5 +---- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 69f643c7189..7926e2f743a 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -23,7 +23,7 @@ use cumulus_primitives_core::ParaId; use primitives::{AccountId, Balance, Signature}; use runtime_eden::{ constants::{EXISTENTIAL_DEPOSIT, NODL}, - AuraId, BalancesConfig, CollatorSelectionConfig, GenesisConfig, ParachainInfoConfig, PolkadotXcmConfig, + AuraId, BalancesConfig, CollatorSelectionConfig, ParachainInfoConfig, PolkadotXcmConfig, RuntimeGenesisConfig, SessionConfig, SessionKeys, SystemConfig, TechnicalMembershipConfig, WASM_BINARY, }; use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; @@ -37,7 +37,7 @@ use sp_runtime::{ const SAFE_XCM_VERSION: u32 = xcm::latest::VERSION; /// Specialized `ChainSpec` for the normal parachain runtime. -pub type ChainSpec = sc_service::GenericChainSpec; +pub type ChainSpec = sc_service::GenericChainSpec; /// Helper function to generate a crypto pair from seed pub fn get_public_from_seed(seed: &str) -> ::Public { @@ -87,13 +87,13 @@ pub fn eden_session_keys(keys: AuraId) -> SessionKeys { SessionKeys { aura: keys } } -/// Helper function to create GenesisConfig for testing +/// Helper function to create RuntimeGenesisConfig for testing fn eden_testnet_genesis( root_key: AccountId, collators: Vec<(AccountId, AuraId)>, endowed_accounts: Option>, id: ParaId, -) -> GenesisConfig { +) -> RuntimeGenesisConfig { let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(|| { vec![ get_account_id_from_seed::("Alice"), @@ -111,7 +111,7 @@ fn eden_testnet_genesis( const ENDOWMENT: Balance = 10_000 * NODL; - GenesisConfig { + RuntimeGenesisConfig { // Core system: SystemConfig { code: WASM_BINARY @@ -174,7 +174,7 @@ fn eden_testnet_genesis( } } -fn development_config_genesis(id: ParaId) -> GenesisConfig { +fn development_config_genesis(id: ParaId) -> RuntimeGenesisConfig { eden_testnet_genesis( get_account_id_from_seed::("Alice"), vec![ @@ -218,7 +218,7 @@ pub fn development_config(id: ParaId) -> ChainSpec { ) } -fn local_config_genesis(id: ParaId) -> GenesisConfig { +fn local_config_genesis(id: ParaId) -> RuntimeGenesisConfig { eden_testnet_genesis( get_account_id_from_seed::("Alice"), vec![ diff --git a/node/src/command.rs b/node/src/command.rs index 03ac6044e8c..36c02901b40 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -23,7 +23,7 @@ use log::info; use runtime_eden::{Block, RuntimeApi}; use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, NetworkParams, Result, - RuntimeVersion, SharedParams, SubstrateCli, + SharedParams, SubstrateCli, }; use sc_service::config::{BasePath, PrometheusConfig}; use sp_core::hexdisplay::HexDisplay; @@ -34,7 +34,7 @@ use std::net::SocketAddr; use crate::{ chain_spec, cli::{Cli, RelayChainCli, Subcommand}, - service::{new_partial, parachain_build_import_queue, TemplateRuntimeExecutor}, + service::{new_partial, parachain_build_import_queue}, }; // default to Nodle parachain id diff --git a/node/src/service.rs b/node/src/service.rs index fd53d1b74c4..4407b69aaee 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -19,7 +19,7 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. // std -use std::{default, sync::Arc, time::Duration}; +use std::{sync::Arc, time::Duration}; // rpc use jsonrpsee::RpcModule; diff --git a/pallets/allocations/src/tests.rs b/pallets/allocations/src/tests.rs index 856afa80fec..9caf4d1f149 100644 --- a/pallets/allocations/src/tests.rs +++ b/pallets/allocations/src/tests.rs @@ -21,10 +21,7 @@ use super::*; use crate::{self as pallet_allocations}; use frame_support::{ - assert_noop, assert_ok, bounded_vec, - dispatch::Pays, - ord_parameter_types, parameter_types, - traits::{ConstU32, GenesisBuild}, + assert_noop, assert_ok, bounded_vec, dispatch::Pays, ord_parameter_types, parameter_types, traits::ConstU32, PalletId, }; use frame_system::EnsureSignedBy; From 4bd744bff8d6fbdac51ccb8a2268513b07503f30 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 19 Oct 2023 15:52:36 +0900 Subject: [PATCH 35/68] Buildstorage --- pallets/allocations/src/tests.rs | 3 +-- pallets/grants/src/mock.rs | 3 +-- pallets/reserve/src/tests.rs | 4 +++- pallets/sponsorship/src/mock.rs | 13 +++++-------- pallets/uniques/src/tests.rs | 4 +--- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/pallets/allocations/src/tests.rs b/pallets/allocations/src/tests.rs index 9caf4d1f149..f31fd0793ae 100644 --- a/pallets/allocations/src/tests.rs +++ b/pallets/allocations/src/tests.rs @@ -34,7 +34,6 @@ use sp_runtime::{ pub(crate) type AccountId = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( @@ -163,7 +162,7 @@ type Errors = Error; pub fn new_test_ext() -> sp_io::TestExternalities { sp_tracing::try_init_simple(); - let mut storage = frame_system::GenesisConfig::default() + let mut storage = frame_system::GenesisConfig::::default() .build_storage() .unwrap_or_else(|err| { panic!( diff --git a/pallets/grants/src/mock.rs b/pallets/grants/src/mock.rs index 1a28a3fc163..252a3fad82f 100644 --- a/pallets/grants/src/mock.rs +++ b/pallets/grants/src/mock.rs @@ -28,7 +28,6 @@ use frame_system::EnsureSignedBy; use sp_core::H256; use sp_runtime::{traits::IdentityLookup, BuildStorage}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( @@ -152,7 +151,7 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { sp_tracing::try_init_simple(); - let mut storage = frame_system::GenesisConfig::default() + let mut storage = frame_system::GenesisConfig::::default() .build_storage() .unwrap_or_else(|err| { panic!( diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index 975eb9f14da..c7fcae9931b 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -25,6 +25,7 @@ use frame_system::{EnsureSignedBy, RawOrigin}; use sp_core::H256; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, DispatchError::BadOrigin, }; use sp_std::prelude::Box; @@ -107,7 +108,8 @@ type TestCurrency = ::Currency; // This function basically just builds a genesis storage key/value store according to // our desired mockup. pub fn new_test_ext() -> sp_io::TestExternalities { - let t: frame_system::GenesisConfig = frame_system::GenesisConfig::default(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); + sp_io::TestExternalities::new(t.into()) } diff --git a/pallets/sponsorship/src/mock.rs b/pallets/sponsorship/src/mock.rs index 5f918aa5b1a..99d6a11ccef 100644 --- a/pallets/sponsorship/src/mock.rs +++ b/pallets/sponsorship/src/mock.rs @@ -26,21 +26,15 @@ use frame_support::{ use pallet_transaction_payment::CurrencyAdapter; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Uniques: pallet_uniques, @@ -170,5 +164,8 @@ impl pallet_sponsorship::Config for Test { // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - frame_system::GenesisConfig::default().build_storage().unwrap().into() + frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into() } diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 292fe84b2b4..2e9713dbf8d 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -8,11 +8,9 @@ use frame_support::{ use pallet_uniques::DestroyWitness; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( @@ -106,7 +104,7 @@ macro_rules! bvec { } } pub(crate) fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default().build_storage().unwrap(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); From b8c4d0a4c802072df8abed9b8e88072951d0bbae Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 19 Oct 2023 16:40:24 +0900 Subject: [PATCH 36/68] Collections are no longer Copy --- pallets/uniques/src/benchmarking.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index d2726a4c01b..f00d4a8f3f3 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -35,7 +35,7 @@ fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, Acc let collection_owner: T::AccountId = account("collection_owner", 0, SEED); let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); let collection_id = >::Helper::collection(0); - (collection_id, collection_owner, collection_owner_lookup) + (collection_id.clone(), collection_owner, collection_owner_lookup) } fn create_collection, I: 'static>( @@ -45,11 +45,11 @@ fn create_collection, I: 'static>( T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); assert_ok!(Uniques::::create_with_extra_deposit_limit( SystemOrigin::Signed(collection_owner.clone()).into(), - collection_id, + collection_id.clone(), collection_owner_lookup.clone(), extra_deposit_limit )); - (collection_id, collection_owner, collection_owner_lookup) + (collection_id.clone(), collection_owner, collection_owner_lookup) } fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { let (.., collection_owner, collection_owner_lookup) = get_config::(); @@ -104,7 +104,7 @@ fn mint_item_with_extra_deposit, I: 'static>( let item = T::Helper::item(index); assert!(Uniques::::mint_with_extra_deposit( SystemOrigin::Signed(collection_owner.clone()).into(), - collection_id, + collection_id.clone(), item, collection_owner_lookup.clone(), deposit, @@ -144,23 +144,23 @@ benchmarks_instance_pallet! { item_metadatas: m, attributes: a, }; - }: _(SystemOrigin::Signed(collection_owner), collection_id, witness) + }: _(SystemOrigin::Signed(collection_owner), collection_id.clone(), witness) mint_with_extra_deposit { let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); let item = T::Helper::item(0); let deposit = 5u32.into(); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, collection_owner_lookup, deposit) + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), item, collection_owner_lookup, deposit) burn { let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); let (item, ..) = mint_item_with_extra_deposit::(0, T::Currency::minimum_balance()); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, Some(collection_owner_lookup)) + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), item, Some(collection_owner_lookup)) create_with_extra_deposit_limit { let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, collection_owner_lookup, BalanceOf::::max_value()) + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), collection_owner_lookup, BalanceOf::::max_value()) verify { let event: >::RuntimeEvent = pallet_uniques::Event::Created { collection: >::Helper::collection(0), creator: collection_owner.clone(), owner: collection_owner }.into(); assert_last_event::(event.into()); @@ -172,8 +172,8 @@ benchmarks_instance_pallet! { let target_lookup = T::Lookup::unlookup(target.clone()); T::Currency::make_free_balance_be(&target, T::Currency::minimum_balance()); let origin = SystemOrigin::Signed(target.clone()).into(); - Uniques::::set_accept_ownership(origin, Some(collection))?; - }: _(SystemOrigin::Signed(collection_owner), collection, target_lookup) + Uniques::::set_accept_ownership(origin, Some(collection.clone()))?; + }: _(SystemOrigin::Signed(collection_owner), collection.clone(), target_lookup) verify { let event: >::RuntimeEvent = pallet_uniques::Event::OwnerChanged { collection, new_owner: target }.into(); assert_last_event::(event.into()); @@ -181,7 +181,7 @@ benchmarks_instance_pallet! { update_extra_deposit_limit { let (collection, collection_owner, _) = create_collection::(BalanceOf::::max_value()); - }: _(SystemOrigin::Signed(collection_owner), collection, BalanceOf::::min_value()) + }: _(SystemOrigin::Signed(collection_owner), collection.clone(), BalanceOf::::min_value()) verify { let event: >::RuntimeEvent = Event::ExtraDepositLimitUpdated { collection, limit: BalanceOf::::min_value() }.into(); assert_last_event::(event.into()); From f938e0381a4f7a53290bde419b91fdd93ea19d51 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 20 Oct 2023 10:17:28 +0900 Subject: [PATCH 37/68] Try to add some migration --- runtimes/eden/src/lib.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 36308aa03a6..6713d16c03a 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -64,6 +64,7 @@ mod version; mod weights; mod xcm_config; + pub use pallets_consensus::SessionKeys; #[cfg(feature = "std")] pub use version::native_version; @@ -153,10 +154,17 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1,); /// Executive: handles dispatch to the various modules. -pub type Executive = - frame_executive::Executive, Runtime, AllPalletsWithSystem>; +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + Migrations + >; #[cfg(feature = "runtime-benchmarks")] pub type XcmGenericBenchmarks = pallet_xcm_benchmarks::generic::Pallet; #[cfg(feature = "runtime-benchmarks")] From 5a16cfc4cf5277d433934a2aa3469d8c7f64b72e Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 23 Oct 2023 10:21:59 +0900 Subject: [PATCH 38/68] Update migrations --- Cargo.lock | 341 ++++++++++++++++++++------------------- runtimes/eden/src/lib.rs | 36 ++++- 2 files changed, 206 insertions(+), 171 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index babfb72085c..55fae63c223 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,9 +400,9 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.24", + "rustix 0.37.26", "slab", - "socket2 0.4.9", + "socket2 0.4.10", "waker-fn", ] @@ -428,9 +428,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", @@ -580,9 +580,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -1041,12 +1041,12 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "7.0.1" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] @@ -1164,9 +1164,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" dependencies = [ "libc", ] @@ -1995,9 +1995,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "292b4841d939b20ba44fff686a35808b0ab31a3256e3629917d9aedd43eb7b3a" +checksum = "c390c123d671cc547244943ecad81bdaab756c6ea332d9ca9c1f48d952a24895" dependencies = [ "cc", "cxxbridge-flags", @@ -2007,9 +2007,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e7e35cf85fd4e90dcaba251f3ee95e08fb6f9d66e5c0588816f16a6ab939b40" +checksum = "00d3d3ac9ffb900304edf51ca719187c779f4001bb544f26c4511d621de905cf" dependencies = [ "cc", "codespan-reporting", @@ -2022,15 +2022,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7030aff1908ba2b7eb639466df50792b2a3fdf02bea9557c4ee1a531975554b" +checksum = "94415827ecfea0f0c74c8cad7d1a86ddb3f05354d6a6ddeda0adee5e875d2939" [[package]] name = "cxxbridge-macro" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79418ecb0c2322a7926a5fa5a9660535432b5b3588b947e1eb484cc509edbe3c" +checksum = "e33dbbe9f5621c9247f97ec14213b04f350bff4b6cebefe834c60055db266ecf" dependencies = [ "proc-macro2", "quote", @@ -2149,9 +2149,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +dependencies = [ + "powerfmt", +] [[package]] name = "derivative" @@ -2415,9 +2418,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8 0.10.2", "signature 2.1.0", @@ -2442,7 +2445,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ "curve25519-dalek 4.1.1", - "ed25519 2.2.2", + "ed25519 2.2.3", "rand_core 0.6.4", "serde", "sha2 0.10.8", @@ -2791,9 +2794,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-sys", @@ -3140,7 +3143,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.18", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -3481,9 +3484,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" [[package]] name = "heck" @@ -3656,7 +3659,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -3682,16 +3685,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -3742,9 +3745,9 @@ dependencies = [ [[package]] name = "if-watch" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" +checksum = "bbb892e5777fe09e16f3d44de7802f4daa7267ecbe8c466f19d94e25bb0c303e" dependencies = [ "async-io", "core-foundation", @@ -3756,7 +3759,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows 0.34.0", + "windows", ] [[package]] @@ -3806,7 +3809,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.1", + "hashbrown 0.14.2", ] [[package]] @@ -3909,7 +3912,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.4", + "socket2 0.5.5", "widestring", "windows-sys 0.48.0", "winreg", @@ -3917,9 +3920,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" @@ -3928,7 +3931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.18", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -4518,7 +4521,7 @@ dependencies = [ "log", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "trust-dns-proto", "void", @@ -4660,7 +4663,7 @@ dependencies = [ "libc", "libp2p-core", "log", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", ] @@ -4887,9 +4890,9 @@ checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -5064,7 +5067,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.18", + "rustix 0.38.20", ] [[package]] @@ -6136,7 +6139,7 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] @@ -7000,9 +7003,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab512a34b3c2c5e465731cc7668edf79208bbe520be03484eeb05e63ed221735" +checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" dependencies = [ "blake2", "crc32fast", @@ -7059,9 +7062,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -7081,7 +7084,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -7100,13 +7103,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -7910,7 +7913,7 @@ dependencies = [ "rand 0.8.5", "sc-authority-discovery", "sc-network", - "strum", + "strum 0.24.1", "thiserror", "tracing-gum", ] @@ -8520,6 +8523,12 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -9005,6 +9014,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -9063,14 +9081,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.0" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.1", - "regex-syntax 0.8.0", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -9084,13 +9102,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.0", + "regex-syntax 0.8.2", ] [[package]] @@ -9101,9 +9119,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3cbb081b9784b07cceb8824c8583f86db4814d172ab043f3c23f7dc600bf83d" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "resolv-conf" @@ -9153,9 +9171,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.3" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" dependencies = [ "cc", "getrandom 0.2.10", @@ -9471,9 +9489,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.15" +version = "0.36.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" +checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab" dependencies = [ "bitflags 1.3.2", "errno", @@ -9485,9 +9503,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.24" +version = "0.37.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4279d76516df406a8bd37e7dff53fd37d1a093f997a3c34a5c21658c126db06d" +checksum = "84f3f8f960ed3b5a59055428714943298bf3fa2d4a1d53135084e0544829d995" dependencies = [ "bitflags 1.3.2", "errno", @@ -9499,11 +9517,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.18" +version = "0.38.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a74ee2d7c2581cd139b42447d7d9389b889bdaad3a73f1ebb16f2a3237bb19c" +checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys 0.4.10", @@ -10141,7 +10159,7 @@ dependencies = [ "cfg-if", "libc", "log", - "rustix 0.36.15", + "rustix 0.36.16", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -10727,9 +10745,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -10741,9 +10759,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10946,18 +10964,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", @@ -11184,9 +11202,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -11194,9 +11212,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys 0.48.0", @@ -11390,7 +11408,7 @@ dependencies = [ "sp-mmr-primitives", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] @@ -11568,7 +11586,7 @@ dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] @@ -11950,7 +11968,7 @@ checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" dependencies = [ "lazy_static", "maplit", - "strum", + "strum 0.24.1", ] [[package]] @@ -12040,9 +12058,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" @@ -12056,6 +12080,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.38", +] + [[package]] name = "stun" version = "0.4.4" @@ -12165,7 +12202,7 @@ dependencies = [ "filetime", "parity-wasm", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", "toml 0.7.8", "walkdir", @@ -12259,9 +12296,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tempfile" @@ -12272,7 +12309,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.18", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -12293,18 +12330,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", @@ -12372,12 +12409,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -12465,7 +12503,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.5.4", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] @@ -12589,7 +12627,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "bytes", "futures-core", "futures-util", @@ -12615,11 +12653,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite 0.2.13", "tracing-attributes", @@ -12628,9 +12665,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", @@ -12639,9 +12676,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -12764,7 +12801,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tinyvec", "tokio", @@ -12990,9 +13027,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "getrandom 0.2.10", ] @@ -13159,8 +13196,8 @@ checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -13306,7 +13343,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.15", + "rustix 0.36.16", "serde", "sha2 0.10.8", "toml 0.5.11", @@ -13402,7 +13439,7 @@ checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ "object 0.30.4", "once_cell", - "rustix 0.36.15", + "rustix 0.36.16", ] [[package]] @@ -13433,7 +13470,7 @@ dependencies = [ "memoffset 0.8.0", "paste", "rand 0.8.5", - "rustix 0.36.15", + "rustix 0.36.16", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -13478,7 +13515,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.3", + "ring 0.17.5", "untrusted 0.9.0", ] @@ -13633,7 +13670,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" dependencies = [ "log", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tokio", "webrtc-util", @@ -13830,14 +13867,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.18", + "rustix 0.38.20", ] [[package]] name = "wide" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebecebefc38ff1860b4bc47550bbfa63af5746061cf0d29fcd7fa63171602598" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" dependencies = [ "bytemuck", "safe_arch", @@ -13882,22 +13919,19 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.34.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows-core", + "windows-targets 0.48.5", ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets 0.48.5", ] @@ -13962,12 +13996,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -[[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -13980,12 +14008,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -[[package]] -name = "windows_i686_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -13998,12 +14020,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -[[package]] -name = "windows_i686_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -14016,12 +14032,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -[[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -14046,12 +14056,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -[[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -14066,9 +14070,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" dependencies = [ "memchr", ] @@ -14304,11 +14308,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 6713d16c03a..d9b75c0bac5 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -154,8 +154,40 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; -pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1,); +pub type Migrations = ( + // pallet_collator_selection::migration::v1::MigrateToV1, + // pallet_balances::migration::ResetInactive, + // pallet_balances::migration::MigrateToTrackInactive, + // pallet_xcm::migration::v1::MigrateToV1, + // pallet_collective::migrations::v4, + // pallet_membership::migrations::v4, + // pallet_scheduler::migration::v1::MigrateToV1, + // pallet_scheduler::migration::v2::MigrateToV4, + // pallet_scheduler::migration::v3::MigrateToV4, + // pallet_scheduler::migration::v4::CleanupAgendas, + + pallet_multisig::migrations::v1::MigrateToV1, + pallet_collator_selection::migration::v1::MigrateToV1, + + // TODO begin + // [2023-10-23T05:32:53Z INFO remote-ext] initialized state externalities with storage root 0x953ab4b56c3cbb2d920e4d8fbf4d0c8303159c267cd05c6b9149ae579a055737 and state_version V0 + // [2023-10-23T05:32:53Z INFO try-runtime::cli] Original runtime [Name: RuntimeString::Owned("nodle-para")] [Version: 23] [Code hash: 0xae58...e0f9] + // [2023-10-23T05:32:53Z INFO try-runtime::cli] New runtime [Name: RuntimeString::Owned("nodle-para")] [Version: 25] [Code hash: 0x5733...c563] + // [2023-10-23T05:32:53Z INFO try_runtime_core::commands::on_runtime_upgrade] 🔬 Running TryRuntime_on_runtime_upgrade with checks: PreAndPost + // [2023-10-23T05:32:54Z ERROR frame_support::storage] (key, value) failed to decode at [216, 243, 20, 183, 244, 230, 176, 149, 240, 248, 238, 70, 86, 164, 72, 37, 85, 177, 174, 142, 206, 213, 82, 47, 60, 64, 73, 188, 132, 237, 164, 168, 87, 175, 119, 5, 201, 47, 28, 155, 36, 186, 153, 42, 108, 45, 60, 199, 99, 26, 228, 85, 227, 226, 235, 228, 70, 138, 224, 133, 251, 109, 155, 122]: Error + // [2023-10-23T05:32:54Z ERROR frame_support::storage] (key, value) failed to decode at [216, 243, 20, 183, 244, 230, 176, 149, 240, 248, 238, 70, 86, 164, 72, 37, 85, 177, 174, 142, 206, 213, 82, 47, 60, 64, 73, 188, 132, 237, 164, 168, 253, 156, 18, 0, 89, 147, 179, 179, 32, 25, 39, 231, 154, 117, 245, 241, 8, 178, 44, 237, 221, 168, 89, 130, 78, 220, 92, 140, 60, 127, 229, 168]: Error + // [2023-10-23T05:32:54Z ERROR runtime] panicked at 'v0 storage corrupted', /home/simson/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/preimage/src/migration.rs:89:49 + // TODO fails: + // pallet_preimage::migration::v1::Migration, + + + pallet_xcm::migration::v1::MigrateToV1, +); + +// pub type Migrations = ( +// pallet_balances::migration::MigrateToTrackInactive::AccountStore> +// ); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -448,7 +480,7 @@ sp_api::impl_runtime_apis! { // have a backtrace here. If any of the pre/post migration checks fail, we shall stop // right here and right now. log::debug!("on_runtime_upgrade"); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); + let weight = Executive::try_runtime_upgrade(checks).unwrap_or_default(); (weight, constants::RuntimeBlockWeights::get().max_block) } From 7dd1f9583903fb93dd279bd0b69f19387c90c031 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 24 Oct 2023 11:53:37 +0900 Subject: [PATCH 39/68] Add migrations for data without chaning storage --- runtimes/eden/src/lib.rs | 27 +++++++----- runtimes/eden/src/migrations.rs | 78 +++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 runtimes/eden/src/migrations.rs diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index d9b75c0bac5..b0afb015553 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -64,6 +64,7 @@ mod version; mod weights; mod xcm_config; +mod migrations; pub use pallets_consensus::SessionKeys; #[cfg(feature = "std")] @@ -161,14 +162,13 @@ pub type Migrations = ( // pallet_xcm::migration::v1::MigrateToV1, // pallet_collective::migrations::v4, // pallet_membership::migrations::v4, - // pallet_scheduler::migration::v1::MigrateToV1, - // pallet_scheduler::migration::v2::MigrateToV4, + // pallet_scheduler::migration::v3::MigrateToV4, // pallet_scheduler::migration::v4::CleanupAgendas, - pallet_multisig::migrations::v1::MigrateToV1, - pallet_collator_selection::migration::v1::MigrateToV1, - + // pallet_multisig::migrations::v1::MigrateToV1, + // pallet_collator_selection::migration::v1::MigrateToV1, + // TODO begin // [2023-10-23T05:32:53Z INFO remote-ext] initialized state externalities with storage root 0x953ab4b56c3cbb2d920e4d8fbf4d0c8303159c267cd05c6b9149ae579a055737 and state_version V0 // [2023-10-23T05:32:53Z INFO try-runtime::cli] Original runtime [Name: RuntimeString::Owned("nodle-para")] [Version: 23] [Code hash: 0xae58...e0f9] @@ -176,13 +176,16 @@ pub type Migrations = ( // [2023-10-23T05:32:53Z INFO try_runtime_core::commands::on_runtime_upgrade] 🔬 Running TryRuntime_on_runtime_upgrade with checks: PreAndPost // [2023-10-23T05:32:54Z ERROR frame_support::storage] (key, value) failed to decode at [216, 243, 20, 183, 244, 230, 176, 149, 240, 248, 238, 70, 86, 164, 72, 37, 85, 177, 174, 142, 206, 213, 82, 47, 60, 64, 73, 188, 132, 237, 164, 168, 87, 175, 119, 5, 201, 47, 28, 155, 36, 186, 153, 42, 108, 45, 60, 199, 99, 26, 228, 85, 227, 226, 235, 228, 70, 138, 224, 133, 251, 109, 155, 122]: Error // [2023-10-23T05:32:54Z ERROR frame_support::storage] (key, value) failed to decode at [216, 243, 20, 183, 244, 230, 176, 149, 240, 248, 238, 70, 86, 164, 72, 37, 85, 177, 174, 142, 206, 213, 82, 47, 60, 64, 73, 188, 132, 237, 164, 168, 253, 156, 18, 0, 89, 147, 179, 179, 32, 25, 39, 231, 154, 117, 245, 241, 8, 178, 44, 237, 221, 168, 89, 130, 78, 220, 92, 140, 60, 127, 229, 168]: Error - // [2023-10-23T05:32:54Z ERROR runtime] panicked at 'v0 storage corrupted', /home/simson/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/preimage/src/migration.rs:89:49 - // TODO fails: + // [2023-10-23T05:32:54Z ERROR runtime] panicked at 'v0 storage corrupted', /home/simson/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/preimage/src/migration.rs:89:49 + // TODO fails: // pallet_preimage::migration::v1::Migration, - - pallet_xcm::migration::v1::MigrateToV1, - + // pallet_xcm::migration::v1::MigrateToV1, + // pallet_contracts::migration::v10::Migration, + // pallet_contracts::migration::v11::Migration, + // pallet_contracts::migration::v12::Migration, + // pallet_contracts::Migration, + migrations::MultiMigration, ); // pub type Migrations = ( @@ -195,8 +198,8 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations - >; + Migrations, +>; #[cfg(feature = "runtime-benchmarks")] pub type XcmGenericBenchmarks = pallet_xcm_benchmarks::generic::Pallet; #[cfg(feature = "runtime-benchmarks")] diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs new file mode 100644 index 00000000000..1447c70fb03 --- /dev/null +++ b/runtimes/eden/src/migrations.rs @@ -0,0 +1,78 @@ +use core::marker::PhantomData; + +use crate::Runtime; +use frame_support::{ + migration, + traits::{OnRuntimeUpgrade, PalletInfoAccess, StorageVersion}, + weights::Weight, +}; + +#[cfg(feature = "try-runtime")] +use { + codec::{Decode, Encode}, + frame_support::Blake2_128Concat, + pallet_uniques::CollectionDetails, + primitives::{AccountId, Balance}, + sp_runtime::TryRuntimeError, + sp_std::prelude::*, +}; + +// #[cfg(feature = "try-runtime")] +// type CollectionId = u32; + +// #[cfg(feature = "try-runtime")] +// const UNIQUES_CLASS_PREFIX: &[u8] = b"Class"; + +// const NEW_UNIQUES_PALLET_NAME: &[u8] = b"SubstrateUniques"; +// const OLD_UNIQUES_PALLET_NAME: &[u8] = b"Uniques"; + +pub struct MultiMigration(sp_std::marker::PhantomData); + +impl OnRuntimeUpgrade for MultiMigration +where + T: pallet_scheduler::Config + + pallet_balances::Config + + pallet_membership::Config + + pallet_collective::Config, +{ + fn on_runtime_upgrade() -> Weight { + // Pallets with no data to migrate, just update storage version block + StorageVersion::new(4).put::>(); + StorageVersion::new(4).put::>(); + StorageVersion::new(4).put::>(); + + StorageVersion::new(1).put::>(); + + ::BlockWeights::get().max_block + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + // let collection_details = migration::storage_key_iter::< + // CollectionId, + // CollectionDetails, + // Blake2_128Concat, + // >(OLD_UNIQUES_PALLET_NAME, UNIQUES_CLASS_PREFIX) + // .collect::)>>(); + Ok(vec![]) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), TryRuntimeError> { + // let previous_collection_details: Vec<(CollectionId, CollectionDetails)> = + // Decode::decode(&mut state.as_slice()).map_err(|_| "Unable to decode previous collection details")?; + + // let current_collection_details = migration::storage_key_iter::< + // CollectionId, + // CollectionDetails, + // Blake2_128Concat, + // >(NEW_UNIQUES_PALLET_NAME, UNIQUES_CLASS_PREFIX) + // .collect::>(); + + // if current_collection_details != previous_collection_details { + // return Err("Pallet Uniques Migration: Collection details do not match"); + // } + + Ok(()) + } +} From dacefac505b0662d6b55b0fe0eeb693dc48973ee Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 24 Oct 2023 19:09:02 +0900 Subject: [PATCH 40/68] Update runtimes/eden/src/lib.rs --- runtimes/eden/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index b0afb015553..fd424dc05f2 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -483,7 +483,7 @@ sp_api::impl_runtime_apis! { // have a backtrace here. If any of the pre/post migration checks fail, we shall stop // right here and right now. log::debug!("on_runtime_upgrade"); - let weight = Executive::try_runtime_upgrade(checks).unwrap_or_default(); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, constants::RuntimeBlockWeights::get().max_block) } From 9cab18982dc4ceea3f4a8e0fd2a5a27e37220a7a Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 25 Oct 2023 10:59:04 +0900 Subject: [PATCH 41/68] Null migration for all updated pallets. --- runtimes/eden/src/migrations.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 1447c70fb03..f1f82ec83a4 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -33,8 +33,18 @@ where T: pallet_scheduler::Config + pallet_balances::Config + pallet_membership::Config - + pallet_collective::Config, -{ + + pallet_collective::Config + + pallet_collator_selection::Config + + pallet_xcm::Config + + pallet_preimage::Config + + pallet_multisig::Config + + pallet_contracts::Config + + + + + + { fn on_runtime_upgrade() -> Weight { // Pallets with no data to migrate, just update storage version block StorageVersion::new(4).put::>(); @@ -42,8 +52,14 @@ where StorageVersion::new(4).put::>(); StorageVersion::new(1).put::>(); + StorageVersion::new(1).put::>(); + StorageVersion::new(1).put::>(); + StorageVersion::new(1).put::>(); + StorageVersion::new(1).put::>(); + StorageVersion::new(12).put::>(); + - ::BlockWeights::get().max_block + ::BlockWeights::get().base_block } #[cfg(feature = "try-runtime")] From d569f2fcf1b95734c3de2ab9e7e228f61dcfec4c Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 26 Oct 2023 10:08:57 +0900 Subject: [PATCH 42/68] Auto format --- pallets/reserve/src/tests.rs | 2 +- runtimes/eden/src/migrations.rs | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index c7fcae9931b..6c852e6cbe0 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -110,7 +110,7 @@ type TestCurrency = ::Currency; pub fn new_test_ext() -> sp_io::TestExternalities { let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - sp_io::TestExternalities::new(t.into()) + sp_io::TestExternalities::new(t) } #[test] diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index f1f82ec83a4..2b70f1140f4 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -1,9 +1,6 @@ -use core::marker::PhantomData; - use crate::Runtime; use frame_support::{ - migration, - traits::{OnRuntimeUpgrade, PalletInfoAccess, StorageVersion}, + traits::{OnRuntimeUpgrade, StorageVersion}, weights::Weight, }; @@ -39,12 +36,7 @@ where + pallet_preimage::Config + pallet_multisig::Config + pallet_contracts::Config - - - - - - { +{ fn on_runtime_upgrade() -> Weight { // Pallets with no data to migrate, just update storage version block StorageVersion::new(4).put::>(); @@ -58,7 +50,6 @@ where StorageVersion::new(1).put::>(); StorageVersion::new(12).put::>(); - ::BlockWeights::get().base_block } From 5baa9a33ebf5c5b18ceaa9f946723c803dac6a8b Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 26 Oct 2023 10:49:33 +0900 Subject: [PATCH 43/68] Clippy warnings --- pallets/reserve/src/lib.rs | 1 - runtimes/eden/src/migrations.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index 79975f93d9f..365a862b731 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -49,7 +49,6 @@ type NegativeImbalanceOf = pub mod pallet { use super::*; use frame_support::{dispatch::PostDispatchInfo, pallet_prelude::*}; - use frame_system::pallet_prelude::*; #[pallet::config] pub trait Config: frame_system::Config { diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 2b70f1140f4..90bd93f7e5f 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -35,7 +35,7 @@ where + pallet_xcm::Config + pallet_preimage::Config + pallet_multisig::Config - + pallet_contracts::Config + + pallet_contracts::Config, { fn on_runtime_upgrade() -> Weight { // Pallets with no data to migrate, just update storage version block From 05c5c6435355e26acd7563e8e188f15b1397fef7 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 31 Oct 2023 10:14:16 +0900 Subject: [PATCH 44/68] Update after review --- pallets/reserve/src/tests.rs | 2 -- pallets/sponsorship/src/mock.rs | 1 - pallets/uniques/src/benchmarking.rs | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pallets/reserve/src/tests.rs b/pallets/reserve/src/tests.rs index 4fd35f920d2..20d5d6c7cdb 100644 --- a/pallets/reserve/src/tests.rs +++ b/pallets/reserve/src/tests.rs @@ -30,7 +30,6 @@ use sp_runtime::{ }; use sp_std::prelude::Box; -// type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( @@ -83,7 +82,6 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; type WeightInfo = (); type FreezeIdentifier = [u8; 8]; - // type HoldIdentifier = [u8; 8]; type MaxHolds = (); type MaxFreezes = (); type RuntimeHoldReason = (); diff --git a/pallets/sponsorship/src/mock.rs b/pallets/sponsorship/src/mock.rs index 99d6a11ccef..43819e6c712 100644 --- a/pallets/sponsorship/src/mock.rs +++ b/pallets/sponsorship/src/mock.rs @@ -82,7 +82,6 @@ impl pallet_balances::Config for Test { type FreezeIdentifier = (); type MaxFreezes = (); type MaxHolds = (); - #[doc = " The overarching hold reason."] type RuntimeHoldReason = (); } diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index f00d4a8f3f3..85f495116c7 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -35,7 +35,7 @@ fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, Acc let collection_owner: T::AccountId = account("collection_owner", 0, SEED); let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); let collection_id = >::Helper::collection(0); - (collection_id.clone(), collection_owner, collection_owner_lookup) + (collection_id, collection_owner, collection_owner_lookup) } fn create_collection, I: 'static>( From 15ac86030b20b6566414b54f122ae9018e9c7bd5 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 31 Oct 2023 10:54:39 +0900 Subject: [PATCH 45/68] CI save snapshot --- .github/workflows/ci.yml | 7 ++++++- pallets/uniques/src/benchmarking.rs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69356b2aa86..d10380623e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,4 +140,9 @@ jobs: url: ${{ env.try-runtime-uri}}${{ secrets.DWELLIR_API_KEY}} snap: snapshots/eden-snapshot-full runtime: try_runtime/runtime_eden.wasm - checks: all \ No newline at end of file + checks: all + - name: Upload snap artifact + uses: actions/upload-artifact@v2 + with: + name: edensnap + path: snapshots/eden-snapshot-full \ No newline at end of file diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 85f495116c7..de6b43f1d6f 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -49,7 +49,7 @@ fn create_collection, I: 'static>( collection_owner_lookup.clone(), extra_deposit_limit )); - (collection_id.clone(), collection_owner, collection_owner_lookup) + (collection_id, collection_owner, collection_owner_lookup) } fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { let (.., collection_owner, collection_owner_lookup) = get_config::(); From cc9ff58a943041b0021311b02e067ae00ff53b5b Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 31 Oct 2023 12:50:13 +0900 Subject: [PATCH 46/68] Use action 0.3.3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d10380623e4..26d6f761c1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,7 @@ jobs: install -d snapshots date > snapshots/created_at - name: Run try-runtime - uses: NodleCode/action-try-runtime@v0.3.0 + uses: NodleCode/action-try-runtime@v0.3.3 with: url: ${{ env.try-runtime-uri}}${{ secrets.DWELLIR_API_KEY}} snap: snapshots/eden-snapshot-full From b54ec8f2b62ee3c6414809d70e2d231552a66c72 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 1 Nov 2023 08:14:09 +0900 Subject: [PATCH 47/68] GH actions --- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/devcontainer.yml | 4 ++-- .github/workflows/doc.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/srtool.yml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26d6f761c1a..07a01158626 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: lints: runs-on: ubuntu-latest-8-cores steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup sccache uses: mozilla-actions/sccache-action@v0.0.3 - uses: actions-rust-lang/setup-rust-toolchain@v1 @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest-8-cores steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ env.toolchain }} @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-latest-4-cores steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ env.toolchain }} @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest-8-cores steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install protobuf-compiler run: | sudo apt-get install protobuf-compiler @@ -135,7 +135,7 @@ jobs: install -d snapshots date > snapshots/created_at - name: Run try-runtime - uses: NodleCode/action-try-runtime@v0.3.3 + uses: NodleCode/action-try-runtime@v0.3.5 with: url: ${{ env.try-runtime-uri}}${{ secrets.DWELLIR_API_KEY}} snap: snapshots/eden-snapshot-full @@ -145,4 +145,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: edensnap - path: snapshots/eden-snapshot-full \ No newline at end of file + path: snapshots/eden-snapshot-full diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index 201b984d3e5..546c5b1d7e0 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Login to GHCR uses: docker/login-action@v2 @@ -27,4 +27,4 @@ jobs: with: imageName: ghcr.io/nodlecode/devcontainer-chain cacheFrom: ghcr.io/nodlecode/devcontainer-chain - push: always \ No newline at end of file + push: always diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 8ffa2c3fd65..3bd29862049 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -13,7 +13,7 @@ jobs: autodoc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: rustup show - name: Install protobuf-compiler run: | diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e929c5b9029..688c7689f6a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Docker meta id: meta diff --git a/.github/workflows/srtool.yml b/.github/workflows/srtool.yml index a84091f74f1..b294c851832 100644 --- a/.github/workflows/srtool.yml +++ b/.github/workflows/srtool.yml @@ -13,7 +13,7 @@ jobs: runtime: ["eden"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Srtool build id: srtool_build uses: chevdor/srtool-actions@v0.8.0 From 49cc7f09d7cd5e4181b3d9d9c595bab0c3bab77b Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 3 Nov 2023 15:15:30 +1300 Subject: [PATCH 48/68] chore: clean up and remove redundant clones --- node/src/command.rs | 14 ++------- node/src/service.rs | 22 -------------- pallets/allocations/src/tests.rs | 3 -- pallets/grants/src/mock.rs | 2 -- pallets/uniques/src/lib.rs | 32 ++++++++++----------- pallets/uniques/src/tests.rs | 5 ---- runtimes/eden/src/migrations.rs | 40 ++------------------------ runtimes/eden/src/pallets_consensus.rs | 15 ---------- runtimes/eden/src/pallets_system.rs | 5 +--- runtimes/eden/src/xcm_config.rs | 2 -- 10 files changed, 21 insertions(+), 119 deletions(-) diff --git a/node/src/command.rs b/node/src/command.rs index 36c02901b40..d7181b6830b 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -15,8 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -use codec::Encode; -use cumulus_client_cli::generate_genesis_block; use cumulus_primitives_core::ParaId; use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; use log::info; @@ -26,9 +24,7 @@ use sc_cli::{ SharedParams, SubstrateCli, }; use sc_service::config::{BasePath, PrometheusConfig}; -use sp_core::hexdisplay::HexDisplay; -use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; -use sp_runtime::StateVersion; +use sp_runtime::traits::AccountIdConversion; use std::net::SocketAddr; use crate::{ @@ -266,12 +262,7 @@ pub fn run() -> Result<()> { let id = ParaId::from(para_id); let parachain_account = - AccountIdConversion::::into_account_truncating(&id); - - let state_version = StateVersion::V1; // TODO Fixme - let block: Block = - generate_genesis_block(&*config.chain_spec, state_version).map_err(|e| format!("{e:?}"))?; - let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode())); + AccountIdConversion::::into_account_truncating(&id); let tokio_handle = config.tokio_handle.clone(); let polkadot_config = SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle) @@ -279,7 +270,6 @@ pub fn run() -> Result<()> { info!("Parachain id: {:?}", id); info!("Parachain Account: {}", parachain_account); - info!("Parachain genesis state: {}", genesis_state); info!( "Is collating: {}", if config.role.is_authority() { "yes" } else { "no" } diff --git a/node/src/service.rs b/node/src/service.rs index 4407b69aaee..d5b7229b424 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -65,28 +65,6 @@ type ParachainBackend = TFullBackend; type ParachainBlockImport = TParachainBlockImport>, ParachainBackend>; -pub struct TemplateRuntimeExecutor; -// impl sc_executor::sp_wasm_interface::HostFunctions for TemplateRuntimeExecutor { - -// fn host_functions() -> Vec<&'static (dyn Function + 'static)> { todo!() } -// fn register_static(_: &mut T) -> Result<(), ::Error> where T: HostFunctionRegistry { todo!() } -// } - -impl sc_executor::NativeExecutionDispatch for TemplateRuntimeExecutor { - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - runtime_eden::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - runtime_eden::native_version() - } -} - /// Starts a `ServiceBuilder` for a full service. /// /// Use this macro if you don't actually need the full service, but just the builder in order to diff --git a/pallets/allocations/src/tests.rs b/pallets/allocations/src/tests.rs index f31fd0793ae..b200879c0ae 100644 --- a/pallets/allocations/src/tests.rs +++ b/pallets/allocations/src/tests.rs @@ -87,13 +87,10 @@ impl pallet_balances::Config for Test { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = [u8; 8]; - // type HoldIdentifier = [u8; 8]; type MaxHolds = (); type MaxFreezes = (); - type WeightInfo = (); - #[doc = " The overarching hold reason."] type RuntimeHoldReason = (); } diff --git a/pallets/grants/src/mock.rs b/pallets/grants/src/mock.rs index 252a3fad82f..4e6cd9692bd 100644 --- a/pallets/grants/src/mock.rs +++ b/pallets/grants/src/mock.rs @@ -66,7 +66,6 @@ impl frame_system::Config for Test { type OnSetCode = (); type SystemWeightInfo = (); type MaxConsumers = frame_support::traits::ConstU32<16>; - #[doc = " This stores the number of previous transactions associated with a sender account."] type Nonce = u32; } @@ -88,7 +87,6 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; type WeightInfo = (); type FreezeIdentifier = [u8; 8]; - // type HoldIdentifier = [u8; 8]; type MaxHolds = (); type MaxFreezes = (); type RuntimeHoldReason = (); diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index e2f70724536..f6b76669f78 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -130,7 +130,7 @@ pub mod pallet { collection: T::CollectionId, admin: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::create(origin, collection.clone(), admin) + pallet_uniques::Pallet::::create(origin, collection, admin) } /// Issue a new collection of non-fungible items from a privileged origin. /// @@ -157,7 +157,7 @@ pub mod pallet { owner: AccountIdLookupOf, free_holding: bool, ) -> DispatchResult { - pallet_uniques::Pallet::::force_create(origin, collection.clone(), owner, free_holding) + pallet_uniques::Pallet::::force_create(origin, collection, owner, free_holding) } /// Destroy a collection of fungible items. @@ -222,7 +222,7 @@ pub mod pallet { item: T::ItemId, owner: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::mint(origin, collection.clone(), item, owner) + pallet_uniques::Pallet::::mint(origin, collection, item, owner) } /// Destroy a single item. @@ -253,7 +253,7 @@ pub mod pallet { let item_owner = pallet_uniques::Pallet::::owner(collection.clone(), item) .ok_or(Error::::FailedToRetrieveItemOwner)?; pallet_uniques::Pallet::::burn(origin, collection.clone(), item, check_owner)?; - let extra_deposit = ItemExtraDeposits::::take(collection.clone(), item).unwrap_or_else(Zero::zero); + let extra_deposit = ItemExtraDeposits::::take(collection, item).unwrap_or_else(Zero::zero); if !extra_deposit.is_zero() { >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( @@ -292,7 +292,7 @@ pub mod pallet { item: T::ItemId, dest: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::transfer(origin, collection.clone(), item, dest) + pallet_uniques::Pallet::::transfer(origin, collection, item, dest) } /// Reevaluate the deposits on some items. @@ -315,7 +315,7 @@ pub mod pallet { #[pallet::call_index(6)] #[pallet::weight(>::WeightInfo::redeposit(items.len() as u32))] pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { - pallet_uniques::Pallet::::redeposit(origin, collection.clone(), items) + pallet_uniques::Pallet::::redeposit(origin, collection, items) } /// Disallow further unprivileged transfer of an item. @@ -331,7 +331,7 @@ pub mod pallet { #[pallet::call_index(7)] #[pallet::weight(>::WeightInfo::freeze())] pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::freeze(origin, collection.clone(), item) + pallet_uniques::Pallet::::freeze(origin, collection, item) } /// Re-allow unprivileged transfer of an item. @@ -347,7 +347,7 @@ pub mod pallet { #[pallet::call_index(8)] #[pallet::weight(>::WeightInfo::thaw())] pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::thaw(origin, collection.clone(), item) + pallet_uniques::Pallet::::thaw(origin, collection, item) } /// Disallow further unprivileged transfers for a whole collection. @@ -362,7 +362,7 @@ pub mod pallet { #[pallet::call_index(9)] #[pallet::weight(>::WeightInfo::freeze_collection())] pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::freeze_collection(origin, collection.clone()) + pallet_uniques::Pallet::::freeze_collection(origin, collection) } /// Re-allow unprivileged transfers for a whole collection. @@ -377,7 +377,7 @@ pub mod pallet { #[pallet::call_index(10)] #[pallet::weight(>::WeightInfo::thaw_collection())] pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::thaw_collection(origin, collection.clone()) + pallet_uniques::Pallet::::thaw_collection(origin, collection) } /// Change the Owner of a collection. @@ -402,7 +402,7 @@ pub mod pallet { let old_owner = ensure_signed(origin)?; let new_owner = T::Lookup::lookup(owner)?; if old_owner != new_owner { - let total_extra_deposit = CollectionExtraDepositDetails::::get(collection.clone()) + let total_extra_deposit = CollectionExtraDepositDetails::::get(collection) .unwrap_or_default() .balance(); T::Currency::repatriate_reserved(&old_owner, &new_owner, total_extra_deposit, Reserved)?; @@ -431,7 +431,7 @@ pub mod pallet { admin: AccountIdLookupOf, freezer: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::set_team(origin, collection.clone(), issuer, admin, freezer) + pallet_uniques::Pallet::::set_team(origin, collection, issuer, admin, freezer) } /// Approve an item to be transferred by a delegated third-party account. @@ -607,7 +607,7 @@ pub mod pallet { data: BoundedVec, is_frozen: bool, ) -> DispatchResult { - pallet_uniques::Pallet::::set_metadata(origin, collection.clone(), item, data, is_frozen) + pallet_uniques::Pallet::::set_metadata(origin, collection, item, data, is_frozen) } /// Clear the metadata for an item. @@ -626,7 +626,7 @@ pub mod pallet { #[pallet::call_index(19)] #[pallet::weight(>::WeightInfo::clear_metadata())] pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::clear_metadata(origin, collection.clone(), item) + pallet_uniques::Pallet::::clear_metadata(origin, collection, item) } /// Set the metadata for a collection. @@ -671,7 +671,7 @@ pub mod pallet { #[pallet::call_index(21)] #[pallet::weight(>::WeightInfo::clear_collection_metadata())] pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::clear_collection_metadata(origin, collection.clone()) + pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) } /// Set (or reset) the acceptance of ownership for a particular account. @@ -823,7 +823,7 @@ pub mod pallet { .map_err(|_| Error::::FailedToIncreaseTotalExtraDeposit)?; >::Currency::reserve(&collection_owner, deposit)?; ItemExtraDeposits::::insert(collection.clone(), item, deposit); - CollectionExtraDepositDetails::::insert(collection.clone(), extra_deposit_details); + CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); Ok(()) } diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 2e9713dbf8d..fce0a5a2f3e 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -58,13 +58,8 @@ impl pallet_balances::Config for Test { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - // #[doc = " The ID type for holds."] - // type HoldIdentifier = [u8; 8]; - #[doc = " The ID type for freezes."] type FreezeIdentifier = [u8; 8]; - #[doc = " The maximum number of holds that can exist on an account at any time."] type MaxHolds = (); - #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] type MaxFreezes = (); type RuntimeHoldReason = (); } diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 90bd93f7e5f..89f4ed3cf41 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -5,23 +5,7 @@ use frame_support::{ }; #[cfg(feature = "try-runtime")] -use { - codec::{Decode, Encode}, - frame_support::Blake2_128Concat, - pallet_uniques::CollectionDetails, - primitives::{AccountId, Balance}, - sp_runtime::TryRuntimeError, - sp_std::prelude::*, -}; - -// #[cfg(feature = "try-runtime")] -// type CollectionId = u32; - -// #[cfg(feature = "try-runtime")] -// const UNIQUES_CLASS_PREFIX: &[u8] = b"Class"; - -// const NEW_UNIQUES_PALLET_NAME: &[u8] = b"SubstrateUniques"; -// const OLD_UNIQUES_PALLET_NAME: &[u8] = b"Uniques"; +use {sp_runtime::TryRuntimeError, sp_std::prelude::*}; pub struct MultiMigration(sp_std::marker::PhantomData); @@ -55,31 +39,11 @@ where #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, TryRuntimeError> { - // let collection_details = migration::storage_key_iter::< - // CollectionId, - // CollectionDetails, - // Blake2_128Concat, - // >(OLD_UNIQUES_PALLET_NAME, UNIQUES_CLASS_PREFIX) - // .collect::)>>(); Ok(vec![]) } #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), TryRuntimeError> { - // let previous_collection_details: Vec<(CollectionId, CollectionDetails)> = - // Decode::decode(&mut state.as_slice()).map_err(|_| "Unable to decode previous collection details")?; - - // let current_collection_details = migration::storage_key_iter::< - // CollectionId, - // CollectionDetails, - // Blake2_128Concat, - // >(NEW_UNIQUES_PALLET_NAME, UNIQUES_CLASS_PREFIX) - // .collect::>(); - - // if current_collection_details != previous_collection_details { - // return Err("Pallet Uniques Migration: Collection details do not match"); - // } - + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { Ok(()) } } diff --git a/runtimes/eden/src/pallets_consensus.rs b/runtimes/eden/src/pallets_consensus.rs index c0c8e69783e..2827c29dba3 100644 --- a/runtimes/eden/src/pallets_consensus.rs +++ b/runtimes/eden/src/pallets_consensus.rs @@ -61,18 +61,6 @@ impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; - #[doc = " Whether to allow block authors to create multiple blocks per slot."] - #[doc = ""] - #[doc = " If this is `true`, the pallet will allow slots to stay the same across sequential"] - #[doc = " blocks. If this is `false`, the pallet will require that subsequent blocks always have"] - #[doc = " higher slots than previous ones."] - #[doc = ""] - #[doc = " Regardless of the setting of this storage value, the pallet will always enforce the"] - #[doc = " invariant that slots don\\'t move backwards as the chain progresses."] - #[doc = ""] - #[doc = " The typical value for this should be \\'false\\' unless this pallet is being augmented by"] - #[doc = " another pallet which enforces some limitation on the number of blocks authors can create"] - #[doc = " using the same slot."] type AllowMultipleBlocksPerSlot = ConstBool; } @@ -97,8 +85,5 @@ impl pallet_collator_selection::Config for Runtime { type ValidatorIdOf = pallet_collator_selection::IdentityCollator; type ValidatorRegistration = Session; type WeightInfo = crate::weights::pallet_collator_selection::WeightInfo; - #[doc = " Minimum number eligible collators. Should always be greater than zero. This includes"] - #[doc = " Invulnerable collators. This ensures that there will always be one collator who can"] - #[doc = " produce a block."] type MinEligibleCollators = MinEligibleCollators; } diff --git a/runtimes/eden/src/pallets_system.rs b/runtimes/eden/src/pallets_system.rs index 67adb655638..0d1dcdc45d1 100644 --- a/runtimes/eden/src/pallets_system.rs +++ b/runtimes/eden/src/pallets_system.rs @@ -70,10 +70,8 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; - /// The type for storing how many extrinsics an account has signed. type Nonce = crate::Nonce; - #[doc = " The Block type used by the runtime. This is used by `construct_runtime` to retrieve the"] - #[doc = " extrinsics or other block specific data as needed."] + type Block = crate::Block; } @@ -109,7 +107,6 @@ impl pallet_balances::Config for Runtime { type MaxFreezes = ConstU32<0>; type FreezeIdentifier = (); - #[doc = " The overarching hold reason."] type RuntimeHoldReason = (); } diff --git a/runtimes/eden/src/xcm_config.rs b/runtimes/eden/src/xcm_config.rs index 4b98122f42f..60583b9e0cf 100644 --- a/runtimes/eden/src/xcm_config.rs +++ b/runtimes/eden/src/xcm_config.rs @@ -193,10 +193,8 @@ impl pallet_xcm::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; - #[doc = " The maximum number of consumers a single remote lock may have."] type MaxRemoteLockConsumers = ConstU32<0>; - #[doc = " The ID type for local consumers of remote locks."] type RemoteLockConsumerIdentifier = (); } From 41d63fbcaf3402b1a02ab83705ab2d78b255bd08 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 3 Nov 2023 16:39:59 +1300 Subject: [PATCH 49/68] feat(runtime-eden): add pallet_identity --- Cargo.lock | 1 + runtimes/eden/Cargo.toml | 4 ++++ runtimes/eden/src/lib.rs | 3 +++ runtimes/eden/src/pallets_util.rs | 29 ++++++++++++++++++++++++++--- runtimes/eden/src/weights/mod.rs | 1 + 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 55fae63c223..d31b3a2d64e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9390,6 +9390,7 @@ dependencies = [ "pallet-contracts", "pallet-contracts-primitives", "pallet-grants", + "pallet-identity", "pallet-im-online", "pallet-insecure-randomness-collective-flip", "pallet-mandate", diff --git a/runtimes/eden/Cargo.toml b/runtimes/eden/Cargo.toml index a0c22ef0c47..fee9781684e 100644 --- a/runtimes/eden/Cargo.toml +++ b/runtimes/eden/Cargo.toml @@ -42,6 +42,7 @@ std = [ "pallet-contracts-primitives/std", "pallet-contracts/std", "pallet-xcm/std", + "pallet-identity/std", "polkadot-parachain/std", "polkadot-runtime-common/std", "xcm/std", @@ -100,6 +101,7 @@ runtime-benchmarks = [ "pallet-collator-selection/runtime-benchmarks", "pallet-membership/runtime-benchmarks", "pallet-contracts/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", @@ -137,6 +139,7 @@ try-runtime = [ "pallet-aura/try-runtime", "pallet-collator-selection/try-runtime", "pallet-contracts/try-runtime", + "pallet-identity/try-runtime", "cumulus-pallet-aura-ext/try-runtime", "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", @@ -183,6 +186,7 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0", default-features = false } pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" } diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index fd424dc05f2..a2c496bbded 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -113,6 +113,7 @@ construct_runtime! { Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 43, NodleUniques: pallet_nodle_uniques = 44, Sponsorship: pallet_sponsorship = 45, + Identity: pallet_identity::{Pallet, Call, Storage, Event} = 46, // Nodle Stack // EmergencyShutdown: pallet_emergency_shutdown = 50, @@ -423,6 +424,7 @@ sp_api::impl_runtime_apis! { list_benchmark!(list, extra, pallet_allocations, Allocations); list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection); list_benchmark!(list, extra, pallet_contracts, Contracts); + list_benchmark!(list, extra, pallet_identity, Identity); list_benchmark!(list, extra, pallet_membership, TechnicalMembership); list_benchmark!(list, extra, pallet_xcm, PolkadotXcm); list_benchmark!(list, extra, pallet_xcm_benchmarks::generic, XcmGenericBenchmarks); @@ -466,6 +468,7 @@ sp_api::impl_runtime_apis! { add_benchmark!(params, batches, pallet_allocations, Allocations); add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection); add_benchmark!(params, batches, pallet_contracts, Contracts); + add_benchmark!(params, batches, pallet_identity, Identity); add_benchmark!(params, batches, pallet_membership, TechnicalMembership); add_benchmark!(params, batches, pallet_xcm, PolkadotXcm); add_benchmark!(params, batches, pallet_xcm_benchmarks::generic, XcmGenericBenchmarks); diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 92a05774710..d17bf1a524a 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -17,10 +17,10 @@ */ #![allow(clippy::identity_op)] -use crate::constants::deposit; use crate::{ constants, implementations::RelayChainBlockNumberProvider, pallets_governance::MoreThanHalfOfTechComm, Balances, - OriginCaller, Preimage, RandomnessCollectiveFlip, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Timestamp, + DaoReserve, OriginCaller, Preimage, RandomnessCollectiveFlip, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + Timestamp, }; use frame_support::{ pallet_prelude::{Decode, Encode, MaxEncodedLen, RuntimeDebug}, @@ -180,7 +180,7 @@ impl pallet_nodle_uniques::Config for Runtime { parameter_types! { pub const DepositPerItem: Balance = constants::deposit(1, 0); pub const DepositPerByte: Balance = constants::deposit(0, 1); - pub const DefaultDepositLimit: Balance = deposit(1024, 1024 * 1024); + pub const DefaultDepositLimit: Balance = constants::deposit(1024, 1024 * 1024); pub MySchedule: Schedule = Default::default(); } @@ -215,3 +215,26 @@ impl pallet_contracts::Config for Runtime { type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; type Migrations = (); } + +parameter_types! { + pub const BasicDeposit: Balance = 1000 * constants::NODL; // 258 bytes on-chain + pub const FieldDeposit: Balance = 200 * constants::NODL; // 66 bytes on-chain + pub const SubAccountDeposit: Balance = 200 * constants::NODL; // 53 bytes on-chain + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; +} +impl pallet_identity::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BasicDeposit = BasicDeposit; + type FieldDeposit = FieldDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = MaxSubAccounts; + type MaxAdditionalFields = MaxAdditionalFields; + type MaxRegistrars = MaxRegistrars; + type Slashed = DaoReserve; + type ForceOrigin = frame_system::EnsureRoot; + type RegistrarOrigin = frame_system::EnsureRoot; + type WeightInfo = crate::weights::pallet_identity::WeightInfo; +} diff --git a/runtimes/eden/src/weights/mod.rs b/runtimes/eden/src/weights/mod.rs index a420a076e35..5b7d9298308 100644 --- a/runtimes/eden/src/weights/mod.rs +++ b/runtimes/eden/src/weights/mod.rs @@ -2,6 +2,7 @@ pub mod frame_system; pub mod pallet_balances; pub mod pallet_collator_selection; pub mod pallet_contracts; +pub mod pallet_identity; pub mod pallet_membership; pub mod pallet_multisig; pub mod pallet_preimage; From 066994a4bf87d9b76aefc0e858425bfbf1aa5f72 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 3 Nov 2023 16:45:39 +1300 Subject: [PATCH 50/68] fix(runtime-eden): add missing pallet_identity weight file --- runtimes/eden/src/weights/pallet_identity.rs | 346 +++++++++++++++++++ 1 file changed, 346 insertions(+) create mode 100644 runtimes/eden/src/weights/pallet_identity.rs diff --git a/runtimes/eden/src/weights/pallet_identity.rs b/runtimes/eden/src/weights/pallet_identity.rs new file mode 100644 index 00000000000..81768f2f96f --- /dev/null +++ b/runtimes/eden/src/weights/pallet_identity.rs @@ -0,0 +1,346 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for pallet_identity +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-e8ezs4ez-project-145-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/production/substrate +// benchmark +// pallet +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_identity +// --no-storage-info +// --no-median-slopes +// --no-min-squares +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./frame/identity/src/weights.rs +// --header=./HEADER-APACHE2 +// --template=./.maintain/frame-weight-template.hbs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use core::marker::PhantomData; + +/// Weights for pallet_identity using the Substrate node and recommended hardware. +pub struct WeightInfo(PhantomData); +impl pallet_identity::weights::WeightInfo for WeightInfo { + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 19]`. + fn add_registrar(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `32 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 11_683_000 picoseconds. + Weight::from_parts(12_515_830, 2626) + // Standard Error: 2_154 + .saturating_add(Weight::from_parts(147_919, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[0, 100]`. + fn set_identity(r: u32, x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `442 + r * (5 ±0)` + // Estimated: `11003` + // Minimum execution time: 32_949_000 picoseconds. + Weight::from_parts(31_329_634, 11003) + // Standard Error: 4_496 + .saturating_add(Weight::from_parts(203_570, 0).saturating_mul(r.into())) + // Standard Error: 877 + .saturating_add(Weight::from_parts(429_346, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:100 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 100]`. + fn set_subs_new(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `11003 + s * (2589 ±0)` + // Minimum execution time: 9_157_000 picoseconds. + Weight::from_parts(24_917_444, 11003) + // Standard Error: 4_554 + .saturating_add(Weight::from_parts(3_279_868, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `p` is `[0, 100]`. + fn set_subs_old(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `194 + p * (32 ±0)` + // Estimated: `11003` + // Minimum execution time: 9_240_000 picoseconds. + Weight::from_parts(23_326_035, 11003) + // Standard Error: 3_664 + .saturating_add(Weight::from_parts(1_439_873, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. + fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` + // Estimated: `11003` + // Minimum execution time: 55_687_000 picoseconds. + Weight::from_parts(30_695_182, 11003) + // Standard Error: 9_921 + .saturating_add(Weight::from_parts(162_357, 0).saturating_mul(r.into())) + // Standard Error: 1_937 + .saturating_add(Weight::from_parts(1_427_998, 0).saturating_mul(s.into())) + // Standard Error: 1_937 + .saturating_add(Weight::from_parts(247_578, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + } + /// Storage: Identity Registrars (r:1 w:0) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[0, 100]`. + fn request_judgement(r: u32, x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `367 + r * (57 ±0) + x * (66 ±0)` + // Estimated: `11003` + // Minimum execution time: 34_876_000 picoseconds. + Weight::from_parts(32_207_018, 11003) + // Standard Error: 5_247 + .saturating_add(Weight::from_parts(249_156, 0).saturating_mul(r.into())) + // Standard Error: 1_023 + .saturating_add(Weight::from_parts(458_329, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[0, 100]`. + fn cancel_request(r: u32, x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `398 + x * (66 ±0)` + // Estimated: `11003` + // Minimum execution time: 30_689_000 picoseconds. + Weight::from_parts(31_967_170, 11003) + // Standard Error: 5_387 + .saturating_add(Weight::from_parts(42_676, 0).saturating_mul(r.into())) + // Standard Error: 1_051 + .saturating_add(Weight::from_parts(446_213, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 19]`. + fn set_fee(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_357_000 picoseconds. + Weight::from_parts(7_932_950, 2626) + // Standard Error: 1_804 + .saturating_add(Weight::from_parts(132_653, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 19]`. + fn set_account_id(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_437_000 picoseconds. + Weight::from_parts(8_051_889, 2626) + // Standard Error: 1_997 + .saturating_add(Weight::from_parts(129_592, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity Registrars (r:1 w:1) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 19]`. + fn set_fields(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `89 + r * (57 ±0)` + // Estimated: `2626` + // Minimum execution time: 7_385_000 picoseconds. + Weight::from_parts(7_911_589, 2626) + // Standard Error: 1_791 + .saturating_add(Weight::from_parts(125_788, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity Registrars (r:1 w:0) + /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 19]`. + /// The range of component `x` is `[0, 100]`. + fn provide_judgement(r: u32, x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `445 + r * (57 ±0) + x * (66 ±0)` + // Estimated: `11003` + // Minimum execution time: 24_073_000 picoseconds. + Weight::from_parts(17_817_684, 11003) + // Standard Error: 8_612 + .saturating_add(Weight::from_parts(406_251, 0).saturating_mul(r.into())) + // Standard Error: 1_593 + .saturating_add(Weight::from_parts(755_225, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: Identity IdentityOf (r:1 w:1) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:0 w:100) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. + fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` + // Estimated: `11003` + // Minimum execution time: 73_981_000 picoseconds. + Weight::from_parts(51_684_057, 11003) + // Standard Error: 12_662 + .saturating_add(Weight::from_parts(145_285, 0).saturating_mul(r.into())) + // Standard Error: 2_472 + .saturating_add(Weight::from_parts(1_421_039, 0).saturating_mul(s.into())) + // Standard Error: 2_472 + .saturating_add(Weight::from_parts(240_907, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 99]`. + fn add_sub(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `475 + s * (36 ±0)` + // Estimated: `11003` + // Minimum execution time: 29_367_000 picoseconds. + Weight::from_parts(34_214_998, 11003) + // Standard Error: 1_522 + .saturating_add(Weight::from_parts(114_551, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// The range of component `s` is `[1, 100]`. + fn rename_sub(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `591 + s * (3 ±0)` + // Estimated: `11003` + // Minimum execution time: 12_384_000 picoseconds. + Weight::from_parts(14_417_903, 11003) + // Standard Error: 539 + .saturating_add(Weight::from_parts(38_371, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Identity IdentityOf (r:1 w:0) + /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// The range of component `s` is `[1, 100]`. + fn remove_sub(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `638 + s * (35 ±0)` + // Estimated: `11003` + // Minimum execution time: 33_327_000 picoseconds. + Weight::from_parts(36_208_941, 11003) + // Standard Error: 1_240 + .saturating_add(Weight::from_parts(105_805, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Identity SuperOf (r:1 w:1) + /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: Identity SubsOf (r:1 w:1) + /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:0) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 99]`. + fn quit_sub(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `704 + s * (37 ±0)` + // Estimated: `6723` + // Minimum execution time: 23_764_000 picoseconds. + Weight::from_parts(26_407_731, 6723) + // Standard Error: 1_025 + .saturating_add(Weight::from_parts(101_112, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } +} From 5efddd21aa5e2c3403e275c66d4b7d83603b0753 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 6 Nov 2023 11:49:12 +0900 Subject: [PATCH 51/68] Add doc link. --- runtimes/eden/src/lib.rs | 6 +++++- runtimes/eden/src/migrations.rs | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index a2c496bbded..e2f4125298c 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -158,9 +158,13 @@ pub type SignedPayload = generic::SignedPayload; pub type CheckedExtrinsic = generic::CheckedExtrinsic; pub type Migrations = ( // pallet_collator_selection::migration::v1::MigrateToV1, - // pallet_balances::migration::ResetInactive, + + // TODO https://github.com/paritytech/substrate/pull/12813 + // TODO this is related to XCM migration. // pallet_balances::migration::MigrateToTrackInactive, // pallet_xcm::migration::v1::MigrateToV1, + + // pallet_collective::migrations::v4, // pallet_membership::migrations::v4, diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 89f4ed3cf41..d8f0c94d60b 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -27,6 +27,8 @@ where StorageVersion::new(4).put::>(); StorageVersion::new(4).put::>(); + // https://github.com/paritytech/substrate/pull/12813 + // moves funds to inactive if we don't need that this is OK. StorageVersion::new(1).put::>(); StorageVersion::new(1).put::>(); StorageVersion::new(1).put::>(); @@ -34,7 +36,10 @@ where StorageVersion::new(1).put::>(); StorageVersion::new(12).put::>(); - ::BlockWeights::get().base_block + // // let mut x: Weight= ::BlockWeights::get(); + // let x = ::BlockWeights::set_proof_size(45); + // // .set_ref_time(100); + Weight::from_parts(43, 34) } #[cfg(feature = "try-runtime")] From f3d54da30aa240d84e51ef496ade9990f30d2029 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 6 Nov 2023 21:52:16 +0900 Subject: [PATCH 52/68] More research on migrations --- runtimes/eden/src/lib.rs | 15 ++++----------- runtimes/eden/src/migrations.rs | 15 +++++++++++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index e2f4125298c..39a5f356948 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -157,13 +157,14 @@ pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; pub type Migrations = ( - // pallet_collator_selection::migration::v1::MigrateToV1, + pallet_collator_selection::migration::v1::MigrateToV1, // TODO https://github.com/paritytech/substrate/pull/12813 // TODO this is related to XCM migration. // pallet_balances::migration::MigrateToTrackInactive, // pallet_xcm::migration::v1::MigrateToV1, + pallet_multisig::migrations::v1::MigrateToV1, // pallet_collective::migrations::v4, // pallet_membership::migrations::v4, @@ -174,22 +175,14 @@ pub type Migrations = ( // pallet_multisig::migrations::v1::MigrateToV1, // pallet_collator_selection::migration::v1::MigrateToV1, - // TODO begin - // [2023-10-23T05:32:53Z INFO remote-ext] initialized state externalities with storage root 0x953ab4b56c3cbb2d920e4d8fbf4d0c8303159c267cd05c6b9149ae579a055737 and state_version V0 - // [2023-10-23T05:32:53Z INFO try-runtime::cli] Original runtime [Name: RuntimeString::Owned("nodle-para")] [Version: 23] [Code hash: 0xae58...e0f9] - // [2023-10-23T05:32:53Z INFO try-runtime::cli] New runtime [Name: RuntimeString::Owned("nodle-para")] [Version: 25] [Code hash: 0x5733...c563] - // [2023-10-23T05:32:53Z INFO try_runtime_core::commands::on_runtime_upgrade] 🔬 Running TryRuntime_on_runtime_upgrade with checks: PreAndPost - // [2023-10-23T05:32:54Z ERROR frame_support::storage] (key, value) failed to decode at [216, 243, 20, 183, 244, 230, 176, 149, 240, 248, 238, 70, 86, 164, 72, 37, 85, 177, 174, 142, 206, 213, 82, 47, 60, 64, 73, 188, 132, 237, 164, 168, 87, 175, 119, 5, 201, 47, 28, 155, 36, 186, 153, 42, 108, 45, 60, 199, 99, 26, 228, 85, 227, 226, 235, 228, 70, 138, 224, 133, 251, 109, 155, 122]: Error - // [2023-10-23T05:32:54Z ERROR frame_support::storage] (key, value) failed to decode at [216, 243, 20, 183, 244, 230, 176, 149, 240, 248, 238, 70, 86, 164, 72, 37, 85, 177, 174, 142, 206, 213, 82, 47, 60, 64, 73, 188, 132, 237, 164, 168, 253, 156, 18, 0, 89, 147, 179, 179, 32, 25, 39, 231, 154, 117, 245, 241, 8, 178, 44, 237, 221, 168, 89, 130, 78, 220, 92, 140, 60, 127, 229, 168]: Error - // [2023-10-23T05:32:54Z ERROR runtime] panicked at 'v0 storage corrupted', /home/simson/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/preimage/src/migration.rs:89:49 - // TODO fails: - // pallet_preimage::migration::v1::Migration, // pallet_xcm::migration::v1::MigrateToV1, // pallet_contracts::migration::v10::Migration, // pallet_contracts::migration::v11::Migration, // pallet_contracts::migration::v12::Migration, // pallet_contracts::Migration, + + // Run custom migrations migrations::MultiMigration, ); diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index d8f0c94d60b..6af6c7e5181 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -1,4 +1,3 @@ -use crate::Runtime; use frame_support::{ traits::{OnRuntimeUpgrade, StorageVersion}, weights::Weight, @@ -22,18 +21,26 @@ where + pallet_contracts::Config, { fn on_runtime_upgrade() -> Weight { - // Pallets with no data to migrate, just update storage version block + // Pallets with no data to migrate, just update storage version block goes here: + + //TODO check 1 key StorageVersion::new(4).put::>(); + + //TODO check 2 keys StorageVersion::new(4).put::>(); + + //TODO check Found 4 keys (0.19s) StorageVersion::new(4).put::>(); // https://github.com/paritytech/substrate/pull/12813 // moves funds to inactive if we don't need that this is OK. StorageVersion::new(1).put::>(); - StorageVersion::new(1).put::>(); StorageVersion::new(1).put::>(); + + // Size of onchain storage is 0 safe to upgrade storage version StorageVersion::new(1).put::>(); - StorageVersion::new(1).put::>(); + + // TODO check 43 keys StorageVersion::new(12).put::>(); // // let mut x: Weight= ::BlockWeights::get(); From e2a227eae49a47ac008337a5cdfc85898d54da81 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 7 Nov 2023 15:19:30 +0900 Subject: [PATCH 53/68] WIP --- runtimes/eden/src/lib.rs | 3 ++- runtimes/eden/src/migrations.rs | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 39a5f356948..8483e5a14c3 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -167,7 +167,8 @@ pub type Migrations = ( pallet_multisig::migrations::v1::MigrateToV1, // pallet_collective::migrations::v4, - // pallet_membership::migrations::v4, + // >::v4, + // pallet_scheduler::migration::v3::MigrateToV4, // pallet_scheduler::migration::v4::CleanupAgendas, diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 6af6c7e5181..aae1a622fa3 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -1,10 +1,11 @@ use frame_support::{ traits::{OnRuntimeUpgrade, StorageVersion}, - weights::Weight, }; #[cfg(feature = "try-runtime")] use {sp_runtime::TryRuntimeError, sp_std::prelude::*}; +use crate::Runtime; +use frame_support::{traits::Get, weights::{Weight}}; pub struct MultiMigration(sp_std::marker::PhantomData); @@ -26,10 +27,10 @@ where //TODO check 1 key StorageVersion::new(4).put::>(); - //TODO check 2 keys + //TODO TechnicalMembership check 2 keys StorageVersion::new(4).put::>(); - //TODO check Found 4 keys (0.19s) + //TODO TechnicalCommittee:: check Found 4 keys (0.19s) StorageVersion::new(4).put::>(); // https://github.com/paritytech/substrate/pull/12813 @@ -46,7 +47,8 @@ where // // let mut x: Weight= ::BlockWeights::get(); // let x = ::BlockWeights::set_proof_size(45); // // .set_ref_time(100); - Weight::from_parts(43, 34) + Weight::from_parts(430000000, 340000000) + } #[cfg(feature = "try-runtime")] From 4d8e8e757ce0ad2aaba09b4159c0381f59c2d9e8 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 7 Nov 2023 16:27:39 +0900 Subject: [PATCH 54/68] WIP xcm migration --- runtimes/eden/src/lib.rs | 1 - runtimes/eden/src/migrations.rs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 8483e5a14c3..82cd2e0ba5e 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -169,7 +169,6 @@ pub type Migrations = ( // pallet_collective::migrations::v4, // >::v4, - // pallet_scheduler::migration::v3::MigrateToV4, // pallet_scheduler::migration::v4::CleanupAgendas, diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index aae1a622fa3..1b12584590c 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -36,6 +36,8 @@ where // https://github.com/paritytech/substrate/pull/12813 // moves funds to inactive if we don't need that this is OK. StorageVersion::new(1).put::>(); + + // Check is key failed to decode a sign storage is already migrated? StorageVersion::new(1).put::>(); // Size of onchain storage is 0 safe to upgrade storage version From 8f00c5365d8ca1709374869c87f58dbaf6715709 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 9 Nov 2023 15:02:46 +0900 Subject: [PATCH 55/68] XCM migration done --- runtimes/eden/src/lib.rs | 1 - runtimes/eden/src/migrations.rs | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 82cd2e0ba5e..ab2a47f110c 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -162,7 +162,6 @@ pub type Migrations = ( // TODO https://github.com/paritytech/substrate/pull/12813 // TODO this is related to XCM migration. // pallet_balances::migration::MigrateToTrackInactive, - // pallet_xcm::migration::v1::MigrateToV1, pallet_multisig::migrations::v1::MigrateToV1, diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 1b12584590c..7908f3c328d 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -37,7 +37,15 @@ where // moves funds to inactive if we don't need that this is OK. StorageVersion::new(1).put::>(); - // Check is key failed to decode a sign storage is already migrated? + // Two keys already migrated. + // The call to pallet_xcm::migration::v1::MigrateToV1::::on_runtime_upgrade() fails. + // That migration code supposes that the value in the storage is of the old type which is not true, + // because two new values of the new type were inserted in the VersionNotifyTargets map which is + // the subject of that migration. One of the new values are for Moonbeam which got inserted in + // the block 3351853 which is the first block after the parachain restart and the second one is + // for Polkadot which got inserted in 3614349 16 days ago. I believe we don’t need this migration. + // If in the future there was any issue in any XCM interactions with Moonbeam we can force set the + // storage entry for that single value to use proof_size = 65536 (the new default). StorageVersion::new(1).put::>(); // Size of onchain storage is 0 safe to upgrade storage version From 25592c9f6af257a6ea2ddf44682a2292e3a17c5b Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 9 Nov 2023 15:03:23 +0900 Subject: [PATCH 56/68] Auto reformat --- runtimes/eden/src/lib.rs | 6 +----- runtimes/eden/src/migrations.rs | 15 ++++++--------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index ab2a47f110c..56f27b03fe9 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -158,13 +158,10 @@ pub type SignedPayload = generic::SignedPayload; pub type CheckedExtrinsic = generic::CheckedExtrinsic; pub type Migrations = ( pallet_collator_selection::migration::v1::MigrateToV1, - // TODO https://github.com/paritytech/substrate/pull/12813 - // TODO this is related to XCM migration. + // TODO this is related to XCM migration. // pallet_balances::migration::MigrateToTrackInactive, - pallet_multisig::migrations::v1::MigrateToV1, - // pallet_collective::migrations::v4, // >::v4, @@ -174,7 +171,6 @@ pub type Migrations = ( // pallet_multisig::migrations::v1::MigrateToV1, // pallet_collator_selection::migration::v1::MigrateToV1, - // pallet_xcm::migration::v1::MigrateToV1, // pallet_contracts::migration::v10::Migration, // pallet_contracts::migration::v11::Migration, diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 7908f3c328d..833601e1215 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -1,11 +1,9 @@ -use frame_support::{ - traits::{OnRuntimeUpgrade, StorageVersion}, -}; +use frame_support::traits::{OnRuntimeUpgrade, StorageVersion}; +use crate::Runtime; +use frame_support::{traits::Get, weights::Weight}; #[cfg(feature = "try-runtime")] use {sp_runtime::TryRuntimeError, sp_std::prelude::*}; -use crate::Runtime; -use frame_support::{traits::Get, weights::{Weight}}; pub struct MultiMigration(sp_std::marker::PhantomData); @@ -40,10 +38,10 @@ where // Two keys already migrated. // The call to pallet_xcm::migration::v1::MigrateToV1::::on_runtime_upgrade() fails. // That migration code supposes that the value in the storage is of the old type which is not true, - // because two new values of the new type were inserted in the VersionNotifyTargets map which is - // the subject of that migration. One of the new values are for Moonbeam which got inserted in + // because two new values of the new type were inserted in the VersionNotifyTargets map which is + // the subject of that migration. One of the new values are for Moonbeam which got inserted in // the block 3351853 which is the first block after the parachain restart and the second one is - // for Polkadot which got inserted in 3614349 16 days ago. I believe we don’t need this migration. + // for Polkadot which got inserted in 3614349 16 days ago. I believe we don’t need this migration. // If in the future there was any issue in any XCM interactions with Moonbeam we can force set the // storage entry for that single value to use proof_size = 65536 (the new default). StorageVersion::new(1).put::>(); @@ -58,7 +56,6 @@ where // let x = ::BlockWeights::set_proof_size(45); // // .set_ref_time(100); Weight::from_parts(430000000, 340000000) - } #[cfg(feature = "try-runtime")] From 0d8b5e3c831116e259ff3a24119fcdcb070d795d Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 14 Nov 2023 09:54:26 +0900 Subject: [PATCH 57/68] Update CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07a01158626..9d52d9fbccb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,7 @@ jobs: install -d snapshots date > snapshots/created_at - name: Run try-runtime - uses: NodleCode/action-try-runtime@v0.3.5 + uses: NodleCode/action-try-runtime@v0.4.0 with: url: ${{ env.try-runtime-uri}}${{ secrets.DWELLIR_API_KEY}} snap: snapshots/eden-snapshot-full From 92b6411d6674915a16ffe61aa8c893fea9585f35 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 14 Nov 2023 14:03:09 +0900 Subject: [PATCH 58/68] ci.yml --no-idempotency-checks --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d52d9fbccb..700fe1e7656 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,7 +140,7 @@ jobs: url: ${{ env.try-runtime-uri}}${{ secrets.DWELLIR_API_KEY}} snap: snapshots/eden-snapshot-full runtime: try_runtime/runtime_eden.wasm - checks: all + checks: "all --no-idempotency-checks" - name: Upload snap artifact uses: actions/upload-artifact@v2 with: From a2e6acbd8a6c1868f656b74a8afc1a083e6996f1 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 16 Nov 2023 12:17:35 +0900 Subject: [PATCH 59/68] WIP --- runtimes/eden/src/lib.rs | 17 +++++++++++------ runtimes/eden/src/migrations.rs | 4 +++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 56f27b03fe9..87b10cc76ce 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -160,7 +160,9 @@ pub type Migrations = ( pallet_collator_selection::migration::v1::MigrateToV1, // TODO https://github.com/paritytech/substrate/pull/12813 // TODO this is related to XCM migration. - // pallet_balances::migration::MigrateToTrackInactive, + // pallet_balances::migration::MigrateToTrackInactive, + + // Migrate data as designed pallet_multisig::migrations::v1::MigrateToV1, // pallet_collective::migrations::v4, // >::v4, @@ -171,16 +173,17 @@ pub type Migrations = ( // pallet_multisig::migrations::v1::MigrateToV1, // pallet_collator_selection::migration::v1::MigrateToV1, - // pallet_xcm::migration::v1::MigrateToV1, + // Todo investigate contracts 43 keys // pallet_contracts::migration::v10::Migration, // pallet_contracts::migration::v11::Migration, // pallet_contracts::migration::v12::Migration, - // pallet_contracts::Migration, + // pallet_contracts::Migration, // Run custom migrations migrations::MultiMigration, ); - +const TEST_ALL_STEPS: bool = cfg!(feature = "try-runtime"); +// pallet_contracts::Migration::::on_runtime_upgrade(); // pub type Migrations = ( // pallet_balances::migration::MigrateToTrackInactive::AccountStore> // ); @@ -478,8 +481,10 @@ sp_api::impl_runtime_apis! { // have a backtrace here. If any of the pre/post migration checks fail, we shall stop // right here and right now. log::debug!("on_runtime_upgrade"); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); - (weight, constants::RuntimeBlockWeights::get().max_block) + log::info!("Hello: {checks:?}"); + let weight = Executive::try_runtime_upgrade(checks); + log::info!("Hello: {weight:?}"); + (weight.unwrap(), constants::RuntimeBlockWeights::get().max_block) } fn execute_block(block: Block, state_root_check: bool, signature_check: bool, select: frame_support::traits::TryStateSelect) -> Weight { diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 833601e1215..b42d3620417 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -55,16 +55,18 @@ where // // let mut x: Weight= ::BlockWeights::get(); // let x = ::BlockWeights::set_proof_size(45); // // .set_ref_time(100); - Weight::from_parts(430000000, 340000000) + Weight::from_parts(100, 0x10000) } #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, TryRuntimeError> { + log::info!("Pre upgrade"); Ok(vec![]) } #[cfg(feature = "try-runtime")] fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { + log::info!("Post upgrade {_state:?}"); Ok(()) } } From 12a761e9f32741bfdda5231da7607577d32a5ec2 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 16 Nov 2023 15:19:14 +0900 Subject: [PATCH 60/68] Fails on try-runtime build: For https://substrate.stackexchange.com/q/10464/116 run: cargo build --release --features try-runtime --- runtimes/eden/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 87b10cc76ce..e9284bbc5ab 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -174,9 +174,9 @@ pub type Migrations = ( // pallet_collator_selection::migration::v1::MigrateToV1, // Todo investigate contracts 43 keys - // pallet_contracts::migration::v10::Migration, - // pallet_contracts::migration::v11::Migration, - // pallet_contracts::migration::v12::Migration, + pallet_contracts::migration::v10::Migration, + pallet_contracts::migration::v11::Migration, + pallet_contracts::migration::v12::Migration, // pallet_contracts::Migration, // Run custom migrations From 00208cc45ca835bd0f7977c9c2652ac2a47225bd Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 17 Nov 2023 07:55:59 +0900 Subject: [PATCH 61/68] Implement suggsetion from SO --- runtimes/eden/src/lib.rs | 6 ------ runtimes/eden/src/migrations.rs | 3 --- runtimes/eden/src/pallets_util.rs | 8 +++++++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index e9284bbc5ab..2308f33b831 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -173,12 +173,6 @@ pub type Migrations = ( // pallet_multisig::migrations::v1::MigrateToV1, // pallet_collator_selection::migration::v1::MigrateToV1, - // Todo investigate contracts 43 keys - pallet_contracts::migration::v10::Migration, - pallet_contracts::migration::v11::Migration, - pallet_contracts::migration::v12::Migration, - // pallet_contracts::Migration, - // Run custom migrations migrations::MultiMigration, ); diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index b42d3620417..9484e70d933 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -49,9 +49,6 @@ where // Size of onchain storage is 0 safe to upgrade storage version StorageVersion::new(1).put::>(); - // TODO check 43 keys - StorageVersion::new(12).put::>(); - // // let mut x: Weight= ::BlockWeights::get(); // let x = ::BlockWeights::set_proof_size(45); // // .set_ref_time(100); diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index d17bf1a524a..3d0597475ff 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -213,7 +213,13 @@ impl pallet_contracts::Config for Runtime { type MaxStorageKeyLen = ConstU32<128>; type UnsafeUnstableInterface = ConstBool; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; - type Migrations = (); + type Migrations = ( + // Todo investigate contracts 43 keys + pallet_contracts::migration::v10::Migration, + pallet_contracts::migration::v11::Migration, + pallet_contracts::migration::v12::Migration, + // pallet_contracts::Migration, + ); } parameter_types! { From 469c8d0730e873deef25c3eb8355cc572619e5d2 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 17 Nov 2023 09:47:12 +0900 Subject: [PATCH 62/68] Multistep migration --- runtimes/eden/src/lib.rs | 2 ++ runtimes/eden/src/pallets_util.rs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 2308f33b831..0683d83329e 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -172,8 +172,10 @@ pub type Migrations = ( // pallet_multisig::migrations::v1::MigrateToV1, // pallet_collator_selection::migration::v1::MigrateToV1, + pallet_contracts::Migration, // Run custom migrations + migrations::MultiMigration, ); const TEST_ALL_STEPS: bool = cfg!(feature = "try-runtime"); diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 3d0597475ff..52566dd5e97 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -218,7 +218,6 @@ impl pallet_contracts::Config for Runtime { pallet_contracts::migration::v10::Migration, pallet_contracts::migration::v11::Migration, pallet_contracts::migration::v12::Migration, - // pallet_contracts::Migration, ); } From 24b80412fcc1f1215d9030a75248bd21cbc1838c Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 20 Nov 2023 09:28:40 +0900 Subject: [PATCH 63/68] Code cleanup --- runtimes/eden/src/lib.rs | 9 ++------- runtimes/eden/src/pallets_util.rs | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 0683d83329e..6764db3388f 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -172,17 +172,12 @@ pub type Migrations = ( // pallet_multisig::migrations::v1::MigrateToV1, // pallet_collator_selection::migration::v1::MigrateToV1, - pallet_contracts::Migration, - + pallet_contracts::Migration, // Run custom migrations - migrations::MultiMigration, ); const TEST_ALL_STEPS: bool = cfg!(feature = "try-runtime"); -// pallet_contracts::Migration::::on_runtime_upgrade(); -// pub type Migrations = ( -// pallet_balances::migration::MigrateToTrackInactive::AccountStore> -// ); + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 52566dd5e97..818f3dc5938 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -214,7 +214,6 @@ impl pallet_contracts::Config for Runtime { type UnsafeUnstableInterface = ConstBool; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; type Migrations = ( - // Todo investigate contracts 43 keys pallet_contracts::migration::v10::Migration, pallet_contracts::migration::v11::Migration, pallet_contracts::migration::v12::Migration, From 1d291498887ce60d0864bab45374755a3f57727d Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 21 Nov 2023 09:08:08 +0900 Subject: [PATCH 64/68] Try new try-runtime action --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 700fe1e7656..63dbbc0299a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,12 +135,13 @@ jobs: install -d snapshots date > snapshots/created_at - name: Run try-runtime - uses: NodleCode/action-try-runtime@v0.4.0 + uses: NodleCode/action-try-runtime@dev with: url: ${{ env.try-runtime-uri}}${{ secrets.DWELLIR_API_KEY}} snap: snapshots/eden-snapshot-full runtime: try_runtime/runtime_eden.wasm - checks: "all --no-idempotency-checks" + checks: "all" + options: "--no-idempotency-checks" - name: Upload snap artifact uses: actions/upload-artifact@v2 with: From 8f4cd1b5f3eca86ca8084479ac8c18db6c6ec946 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 21 Nov 2023 09:23:23 +0900 Subject: [PATCH 65/68] Update ci.yml Upload artifact version 2 -> 3 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63dbbc0299a..181009e0ee3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: - name: Build runtime run: cargo build --release --features=try-runtime -p runtime-eden - name: Upload runtime artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: try_runtime path: target/release/wbuild/runtime-eden/runtime_eden.wasm @@ -143,7 +143,7 @@ jobs: checks: "all" options: "--no-idempotency-checks" - name: Upload snap artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: edensnap path: snapshots/eden-snapshot-full From 12326c840f774559e97f24f5581b1170ddc98666 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 21 Nov 2023 12:48:58 +0900 Subject: [PATCH 66/68] Update benchmark script --- runtimes/eden/src/lib.rs | 3 +-- runtimes/eden/src/migrations.rs | 3 +-- scripts/run_benchmarks.sh | 3 --- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 6764db3388f..dd2004065f8 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -156,6 +156,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; +const TEST_ALL_STEPS: bool = cfg!(feature = "try-runtime"); pub type Migrations = ( pallet_collator_selection::migration::v1::MigrateToV1, // TODO https://github.com/paritytech/substrate/pull/12813 @@ -176,8 +177,6 @@ pub type Migrations = ( // Run custom migrations migrations::MultiMigration, ); -const TEST_ALL_STEPS: bool = cfg!(feature = "try-runtime"); - /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 9484e70d933..d271854a17b 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -1,7 +1,6 @@ use frame_support::traits::{OnRuntimeUpgrade, StorageVersion}; -use crate::Runtime; -use frame_support::{traits::Get, weights::Weight}; +use frame_support::weights::Weight; #[cfg(feature = "try-runtime")] use {sp_runtime::TryRuntimeError, sp_std::prelude::*}; diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index 782b10cc436..f89fdf5d39f 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -26,7 +26,6 @@ do --repeat=$REPEAT \ --pallet=$PALLET \ '--extrinsic=*' \ - --execution=wasm \ --wasm-execution=compiled \ --template=./.maintain/internal_pallet_weights.hbs \ --output=temp_weights @@ -53,7 +52,6 @@ done --repeat=$REPEAT \ --pallet=pallet_xcm_benchmarks::fungible \ '--extrinsic=*' \ - --execution=wasm \ --wasm-execution=compiled \ --template=./.maintain/xcm.hbs \ --output=runtimes/eden/src/weights @@ -64,7 +62,6 @@ done --repeat=$REPEAT \ --pallet=pallet_xcm_benchmarks::generic \ --extrinsic="$xcm_generic_extrinsic" \ - --execution=wasm \ --wasm-execution=compiled \ --template=./.maintain/xcm.hbs \ --output=runtimes/eden/src/weights From a6f21842e083084c0016e4f079e69bb6cabae103 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 21 Nov 2023 13:22:42 +0900 Subject: [PATCH 67/68] Update script --- scripts/run_benchmarks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index f89fdf5d39f..faae6537b4c 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -39,7 +39,6 @@ do --repeat=$REPEAT \ --pallet=$PALLET \ '--extrinsic=*' \ - --execution=wasm \ --wasm-execution=compiled \ --template=./.maintain/external_pallet_weights.hbs \ --output=runtimes/eden/src/weights From b1416a7eaa932d71e0ef9535b04da1a7ef926c6f Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 21 Nov 2023 13:37:14 +0900 Subject: [PATCH 68/68] Ungenerated doc comments removed --- runtimes/eden/src/version.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/runtimes/eden/src/version.rs b/runtimes/eden/src/version.rs index 5397d04eb40..b371d0a3506 100644 --- a/runtimes/eden/src/version.rs +++ b/runtimes/eden/src/version.rs @@ -33,24 +33,24 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("nodle-para"), impl_name: create_runtime_str!("nodle-para"), - /// `authoring_version` is the version of the authorship interface. An authoring node - /// will not attempt to author blocks unless this is equal to its native runtime. + // `authoring_version` is the version of the authorship interface. An authoring node + // will not attempt to author blocks unless this is equal to its native runtime. authoring_version: 1, - /// Version of the runtime specification. A full-node will not attempt to use its native - /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, - /// `spec_version` and `authoring_version` are the same between Wasm and native. + // Version of the runtime specification. A full-node will not attempt to use its native + // runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, + // `spec_version` and `authoring_version` are the same between Wasm and native. spec_version: 25, - /// Version of the implementation of the specification. Nodes are free to ignore this; it - /// serves only as an indication that the code is different; as long as the other two versions - /// are the same then while the actual code may be different, it is nonetheless required to - /// do the same thing. - /// Non-consensus-breaking optimizations are about the only changes that could be made which - /// would result in only the `impl_version` changing. + // Version of the implementation of the specification. Nodes are free to ignore this; it + // serves only as an indication that the code is different; as long as the other two versions + // are the same then while the actual code may be different, it is nonetheless required to + // do the same thing. + // Non-consensus-breaking optimizations are about the only changes that could be made which + // would result in only the `impl_version` changing. impl_version: 0, - /// Used for hardware wallets. This typically happens when `SignedExtra` changes. + // Used for hardware wallets. This typically happens when `SignedExtra` changes. transaction_version: 9, apis: RUNTIME_API_VERSIONS,