diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c978e1484f8..928acf5decf5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -269,22 +269,6 @@ build-adder-collator: #### stage: build -check-transaction-versions: - image: node:15 - stage: build - <<: *rules-test - <<: *docker-env - <<: *vault-secrets - needs: - - job: test-build-linux-stable - artifacts: true - before_script: - - apt-get -y update; apt-get -y install jq lsof - - npm install --ignore-scripts -g @polkadot/metadata-cmp - - git fetch origin release - script: - - scripts/gitlab/check_extrinsics_ordering.sh - generate-impl-guide: stage: build <<: *rules-test diff --git a/Cargo.lock b/Cargo.lock index 3716934ee922..9ff5d510f977 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -469,7 +469,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#8b04f0ecbd97cfe0199dba444264baafb6d35eca" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#71859649338cff5ebc47003cd2606307b20ec87e" dependencies = [ "beefy-primitives", "fnv", @@ -499,7 +499,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#8b04f0ecbd97cfe0199dba444264baafb6d35eca" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#71859649338cff5ebc47003cd2606307b20ec87e" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -520,14 +520,15 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#8b04f0ecbd97cfe0199dba444264baafb6d35eca" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#71859649338cff5ebc47003cd2606307b20ec87e" [[package]] name = "beefy-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#8b04f0ecbd97cfe0199dba444264baafb6d35eca" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#71859649338cff5ebc47003cd2606307b20ec87e" dependencies = [ "parity-scale-codec", + "scale-info", "sp-api", "sp-application-crypto", "sp-core", @@ -723,6 +724,7 @@ dependencies = [ "finality-grandpa", "frame-support", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-finality-grandpa", @@ -737,6 +739,7 @@ dependencies = [ "bp-runtime", "frame-support", "parity-scale-codec", + "scale-info", "sp-std", ] @@ -750,6 +753,7 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "parity-scale-codec", + "scale-info", "serde", "sp-std", ] @@ -764,6 +768,7 @@ dependencies = [ "frame-system", "hex", "parity-scale-codec", + "scale-info", "sp-api", "sp-core", "sp-runtime", @@ -809,6 +814,7 @@ dependencies = [ "hash-db", "num-traits", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -860,6 +866,7 @@ dependencies = [ "pallet-bridge-messages", "pallet-transaction-payment", "parity-scale-codec", + "scale-info", "sp-core", "sp-runtime", "sp-state-machine", @@ -1867,9 +1874,9 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.14.1" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a1bfdcc776e63e49f741c7ce6116fa1b887e8ac2e3ccb14dd4aa113e54feb9" +checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" dependencies = [ "either", "futures 0.3.17", @@ -1878,6 +1885,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parking_lot 0.11.1", + "scale-info", ] [[package]] @@ -1920,7 +1928,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", ] @@ -1938,7 +1946,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", @@ -1946,6 +1954,7 @@ dependencies = [ "log", "parity-scale-codec", "paste 1.0.5", + "scale-info", "sp-api", "sp-io", "sp-runtime", @@ -1957,7 +1966,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "Inflector", "chrono", @@ -1983,11 +1992,12 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-npos-elections", "sp-std", @@ -1996,11 +2006,12 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -2010,19 +2021,20 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "14.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96616f82e069102b95a72c87de4c84d2f87ef7f0f20630e78ce3824436483110" dependencies = [ + "cfg-if 1.0.0", "parity-scale-codec", + "scale-info", "serde", - "sp-core", - "sp-std", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "bitflags", "frame-metadata", @@ -2032,6 +2044,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "paste 1.0.5", + "scale-info", "serde", "smallvec", "sp-arithmetic", @@ -2048,7 +2061,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2060,7 +2073,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2072,7 +2085,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "proc-macro2", "quote", @@ -2082,42 +2095,46 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ - "frame-metadata", "frame-support", "frame-support-test-pallet", "frame-system", "parity-scale-codec", "pretty_assertions", "rustversion", + "scale-info", "serde", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-state-machine", "sp-std", + "sp-version", "trybuild", ] [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "log", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -2129,12 +2146,13 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-runtime", "sp-std", @@ -2143,7 +2161,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", "sp-api", @@ -2152,7 +2170,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "sp-api", @@ -3181,6 +3199,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "rustc-hex", + "scale-info", "separator", "serde", "serde_derive", @@ -4524,12 +4543,13 @@ checksum = "13370dae44474229701bb69b90b4f4dca6404cb0357a2d50d635f1171dc3aa7b" [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "pallet-session", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-authority-discovery", "sp-runtime", @@ -4539,12 +4559,13 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", + "scale-info", "sp-authorship", "sp-runtime", "sp-std", @@ -4553,7 +4574,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", @@ -4563,6 +4584,7 @@ dependencies = [ "pallet-session", "pallet-timestamp", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-consensus-babe", "sp-consensus-vrf", @@ -4576,13 +4598,14 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] @@ -4590,7 +4613,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#8b04f0ecbd97cfe0199dba444264baafb6d35eca" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#71859649338cff5ebc47003cd2606307b20ec87e" dependencies = [ "beefy-primitives", "frame-support", @@ -4606,7 +4629,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#8b04f0ecbd97cfe0199dba444264baafb6d35eca" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#71859649338cff5ebc47003cd2606307b20ec87e" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -4631,13 +4654,14 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-treasury", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] @@ -4652,6 +4676,7 @@ dependencies = [ "frame-system", "log", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -4673,6 +4698,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", + "scale-info", "serde", "sp-finality-grandpa", "sp-io", @@ -4699,6 +4725,7 @@ dependencies = [ "num-traits", "pallet-balances", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -4709,13 +4736,14 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -4725,12 +4753,13 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", "sp-io", "sp-runtime", @@ -4740,7 +4769,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4749,6 +4778,7 @@ dependencies = [ "log", "parity-scale-codec", "rand 0.7.3", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", @@ -4763,13 +4793,14 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-npos-elections", @@ -4780,12 +4811,13 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-runtime", "sp-std", @@ -4794,7 +4826,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", @@ -4803,6 +4835,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-core", "sp-finality-grandpa", @@ -4816,13 +4849,14 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "enumflags2", "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -4831,7 +4865,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", @@ -4839,6 +4873,7 @@ dependencies = [ "log", "pallet-authorship", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-core", "sp-io", @@ -4850,12 +4885,13 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-keyring", @@ -4866,13 +4902,14 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -4882,7 +4919,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -4890,6 +4927,7 @@ dependencies = [ "frame-system", "pallet-mmr-primitives", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -4899,7 +4937,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", @@ -4915,7 +4953,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4932,12 +4970,13 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -4946,11 +4985,12 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -4959,13 +4999,14 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "log", "pallet-balances", "parity-scale-codec", + "scale-info", "serde", "sp-runtime", "sp-staking", @@ -4975,7 +5016,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4989,6 +5030,7 @@ dependencies = [ "pallet-session", "pallet-staking", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-staking", "sp-std", @@ -4997,12 +5039,13 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5011,11 +5054,12 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5024,13 +5068,14 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5039,7 +5084,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", @@ -5047,6 +5092,7 @@ dependencies = [ "log", "pallet-timestamp", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -5059,7 +5105,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", @@ -5075,12 +5121,13 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "rand_chacha 0.2.2", + "scale-info", "sp-runtime", "sp-std", ] @@ -5088,7 +5135,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5099,6 +5146,7 @@ dependencies = [ "pallet-session", "parity-scale-codec", "rand_chacha 0.2.2", + "scale-info", "serde", "sp-application-crypto", "sp-io", @@ -5110,7 +5158,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -5121,7 +5169,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "log", "sp-arithmetic", @@ -5130,11 +5178,12 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5143,13 +5192,14 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-inherents", "sp-io", "sp-runtime", @@ -5160,7 +5210,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", @@ -5168,6 +5218,7 @@ dependencies = [ "log", "pallet-treasury", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -5178,11 +5229,12 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", "smallvec", "sp-core", @@ -5194,7 +5246,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5211,7 +5263,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5222,7 +5274,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", @@ -5230,6 +5282,7 @@ dependencies = [ "impl-trait-for-tuples", "pallet-balances", "parity-scale-codec", + "scale-info", "serde", "sp-runtime", "sp-std", @@ -5238,12 +5291,13 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -5253,13 +5307,14 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] @@ -5275,6 +5330,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "polkadot-runtime-parachains", + "scale-info", "serde", "sp-core", "sp-io", @@ -5845,6 +5901,7 @@ version = "0.9.9" dependencies = [ "parity-scale-codec", "parity-util-mem", + "scale-info", "sp-core", "sp-runtime", "sp-std", @@ -6456,6 +6513,7 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "polkadot-core-primitives", + "scale-info", "serde", "sp-core", "sp-runtime", @@ -6473,6 +6531,7 @@ dependencies = [ "parity-util-mem", "polkadot-core-primitives", "polkadot-parachain", + "scale-info", "serde", "sp-api", "sp-application-crypto", @@ -6572,6 +6631,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "rustc-hex", + "scale-info", "separator", "serde", "serde_derive", @@ -6604,6 +6664,7 @@ dependencies = [ name = "polkadot-runtime-common" version = "0.9.9" dependencies = [ + "beefy-primitives", "bitvec 0.20.1", "frame-benchmarking", "frame-election-provider-support", @@ -6629,6 +6690,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-parachains", "rustc-hex", + "scale-info", "serde", "serde_derive", "serde_json", @@ -6674,6 +6736,7 @@ dependencies = [ "rand_chacha 0.3.1", "rustc-hex", "sc-keystore", + "scale-info", "serde", "sp-api", "sp-core", @@ -6960,6 +7023,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "rustc-hex", + "scale-info", "serde", "serde_derive", "serde_json", @@ -7131,6 +7195,7 @@ dependencies = [ "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "uint", ] @@ -7598,7 +7663,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "env_logger 0.9.0", "jsonrpsee-proc-macros", @@ -7719,6 +7784,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", + "scale-info", "serde", "serde_derive", "smallvec", @@ -7857,7 +7923,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "log", "sp-core", @@ -7868,7 +7934,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "derive_more", @@ -7895,7 +7961,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -7918,7 +7984,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7934,7 +8000,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7950,7 +8016,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -7961,7 +8027,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "chrono", "fdlimit", @@ -7999,7 +8065,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "fnv", "futures 0.3.17", @@ -8027,7 +8093,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "hash-db", "kvdb", @@ -8052,7 +8118,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "futures 0.3.17", @@ -8076,7 +8142,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "derive_more", @@ -8119,7 +8185,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "derive_more", "futures 0.3.17", @@ -8143,7 +8209,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8156,7 +8222,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "assert_matches", "async-trait", @@ -8190,7 +8256,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "futures 0.3.17", @@ -8216,7 +8282,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "sc-client-api", "sp-authorship", @@ -8227,7 +8293,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "lazy_static", "libsecp256k1 0.6.0", @@ -8253,7 +8319,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "derive_more", "environmental", @@ -8271,7 +8337,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "log", "parity-scale-codec", @@ -8287,7 +8353,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8306,7 +8372,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "derive_more", @@ -8343,7 +8409,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "derive_more", "finality-grandpa", @@ -8367,7 +8433,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "ansi_term 0.12.1", "futures 0.3.17", @@ -8384,7 +8450,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "derive_more", @@ -8399,7 +8465,7 @@ dependencies = [ [[package]] name = "sc-light" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "hash-db", "parity-scale-codec", @@ -8417,7 +8483,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-std", "async-trait", @@ -8468,7 +8534,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -8484,7 +8550,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "bytes 1.0.1", "fnv", @@ -8511,7 +8577,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "libp2p", @@ -8524,7 +8590,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8533,7 +8599,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "hash-db", @@ -8564,7 +8630,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "jsonrpc-core", @@ -8589,7 +8655,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "jsonrpc-core", @@ -8606,7 +8672,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "directories", @@ -8671,7 +8737,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "log", "parity-scale-codec", @@ -8685,7 +8751,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8707,7 +8773,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "chrono", "futures 0.3.17", @@ -8725,7 +8791,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8754,7 +8820,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8765,7 +8831,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "intervalier", @@ -8792,7 +8858,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "derive_more", "futures 0.3.17", @@ -8806,7 +8872,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -8825,6 +8891,7 @@ dependencies = [ "derive_more", "parity-scale-codec", "scale-info-derive", + "serde", ] [[package]] @@ -8992,9 +9059,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.67" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950" +checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" dependencies = [ "itoa", "ryu", @@ -9237,7 +9304,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "hash-db", "log", @@ -9254,7 +9321,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -9266,9 +9333,10 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -9278,11 +9346,12 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", + "scale-info", "serde", "sp-debug-derive", "sp-std", @@ -9292,9 +9361,10 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", + "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", @@ -9304,7 +9374,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "parity-scale-codec", @@ -9316,7 +9386,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", "sp-api", @@ -9328,7 +9398,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "log", @@ -9346,7 +9416,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "futures 0.3.17", @@ -9365,11 +9435,12 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "merlin", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-application-crypto", @@ -9387,9 +9458,10 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-runtime", ] @@ -9397,7 +9469,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9409,7 +9481,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "base58", "blake2-rfc", @@ -9432,6 +9504,7 @@ dependencies = [ "primitive-types", "rand 0.7.3", "regex", + "scale-info", "schnorrkel", "secrecy", "serde", @@ -9453,7 +9526,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -9462,7 +9535,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "proc-macro2", "quote", @@ -9472,7 +9545,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "environmental", "parity-scale-codec", @@ -9483,11 +9556,12 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "finality-grandpa", "log", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-application-crypto", @@ -9500,7 +9574,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9514,7 +9588,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "hash-db", @@ -9539,7 +9613,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "lazy_static", "sp-core", @@ -9550,7 +9624,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "derive_more", @@ -9567,7 +9641,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "zstd", ] @@ -9575,9 +9649,10 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", + "scale-info", "serde", "sp-arithmetic", "sp-core", @@ -9589,7 +9664,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -9600,7 +9675,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "sp-api", "sp-core", @@ -9610,7 +9685,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "backtrace", ] @@ -9618,7 +9693,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "rustc-hash", "serde", @@ -9628,7 +9703,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "either", "hash256-std-hasher", @@ -9638,6 +9713,7 @@ dependencies = [ "parity-util-mem", "paste 1.0.5", "rand 0.7.3", + "scale-info", "serde", "sp-application-crypto", "sp-arithmetic", @@ -9649,7 +9725,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9666,7 +9742,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -9678,7 +9754,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "serde", "serde_json", @@ -9687,9 +9763,10 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", + "scale-info", "sp-api", "sp-core", "sp-runtime", @@ -9700,9 +9777,10 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] @@ -9710,7 +9788,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "hash-db", "log", @@ -9733,12 +9811,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9751,7 +9829,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "log", "sp-core", @@ -9764,7 +9842,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -9780,7 +9858,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "erased-serde", "log", @@ -9798,7 +9876,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "sp-api", "sp-runtime", @@ -9807,11 +9885,12 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-inherents", "sp-runtime", @@ -9822,11 +9901,12 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "hash-db", "memory-db", "parity-scale-codec", + "scale-info", "sp-core", "sp-std", "trie-db", @@ -9836,11 +9916,12 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm 0.42.2", + "scale-info", "serde", "sp-runtime", "sp-std", @@ -9851,7 +9932,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -9862,7 +9943,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10058,7 +10139,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "platforms", ] @@ -10066,7 +10147,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.17", @@ -10088,7 +10169,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-std", "derive_more", @@ -10102,7 +10183,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "async-trait", "futures 0.3.17", @@ -10129,7 +10210,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "futures 0.3.17", "substrate-test-utils-derive", @@ -10139,7 +10220,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -10150,7 +10231,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "ansi_term 0.12.1", "build-helper", @@ -10303,7 +10384,7 @@ dependencies = [ [[package]] name = "test-runner" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "frame-system", "futures 0.3.17", @@ -10710,7 +10791,7 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#644c17eda766f392b787c8c0e01e25748d644b29" +source = "git+https://github.com/paritytech/substrate?branch=master#ba153b9ae050eda022f002d74d76f98d1e339a81" dependencies = [ "log", "parity-scale-codec", @@ -11384,6 +11465,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "rustc-hex", + "scale-info", "serde", "serde_derive", "serde_json", @@ -11515,6 +11597,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "xcm-procedural", ] @@ -11531,6 +11614,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "polkadot-runtime-parachains", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", @@ -11613,6 +11697,7 @@ dependencies = [ "polkadot-core-primitives", "polkadot-parachain", "polkadot-runtime-parachains", + "scale-info", "sp-core", "sp-io", "sp-runtime", diff --git a/bridges/bin/millau/runtime/src/lib.rs b/bridges/bin/millau/runtime/src/lib.rs index 2e14a551db8b..6e561e8719e4 100644 --- a/bridges/bin/millau/runtime/src/lib.rs +++ b/bridges/bin/millau/runtime/src/lib.rs @@ -465,7 +465,7 @@ impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index 62e3fb07b517..bc7a4d8f7073 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -590,7 +590,7 @@ impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } diff --git a/bridges/bin/runtime-common/Cargo.toml b/bridges/bin/runtime-common/Cargo.toml index 07fe8910c21f..928523af0256 100644 --- a/bridges/bin/runtime-common/Cargo.toml +++ b/bridges/bin/runtime-common/Cargo.toml @@ -11,6 +11,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } ed25519-dalek = { version = "1.0", default-features = false, optional = true } hash-db = { version = "0.15.2", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Bridge dependencies @@ -40,10 +41,12 @@ std = [ "codec/std", "frame-support/std", "hash-db/std", + "scale-info/std", "pallet-bridge-dispatch/std", "pallet-bridge-grandpa/std", "pallet-bridge-messages/std", "pallet-transaction-payment/std", + "scale-info/std", "sp-core/std", "sp-runtime/std", "sp-state-machine/std", diff --git a/bridges/bin/runtime-common/src/messages.rs b/bridges/bin/runtime-common/src/messages.rs index 72249e4f4e33..08f766e23686 100644 --- a/bridges/bin/runtime-common/src/messages.rs +++ b/bridges/bin/runtime-common/src/messages.rs @@ -37,6 +37,7 @@ use frame_support::{ RuntimeDebug, }; use hash_db::Hasher; +use scale_info::TypeInfo; use sp_runtime::{ traits::{AtLeast32BitUnsigned, CheckedAdd, CheckedDiv, CheckedMul}, FixedPointNumber, FixedPointOperand, FixedU128, @@ -200,7 +201,7 @@ pub mod source { /// - hash of finalized header; /// - storage proof of inbound lane state; /// - lane id. - #[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug)] + #[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub struct FromBridgedChainMessagesDeliveryProof { /// Hash of the bridge header the proof is for. pub bridged_header_hash: BridgedHeaderHash, @@ -431,7 +432,7 @@ pub mod target { /// - storage proof of messages and (optionally) outbound lane state; /// - lane id; /// - nonces (inclusive range) of messages which are included in this proof. - #[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug)] + #[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub struct FromBridgedChainMessagesProof { /// Hash of the finalized bridged header the proof is for. pub bridged_header_hash: BridgedHeaderHash, diff --git a/bridges/fuzz/storage-proof/Cargo.toml b/bridges/fuzz/storage-proof/Cargo.toml index c5848ebed00e..43e58ddb73e9 100644 --- a/bridges/fuzz/storage-proof/Cargo.toml +++ b/bridges/fuzz/storage-proof/Cargo.toml @@ -9,7 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0" } -finality-grandpa = "0.14.0" +finality-grandpa = "0.14.4" hash-db = "0.15.2" honggfuzz = "0.5.54" log = "0.4.0" diff --git a/bridges/modules/dispatch/Cargo.toml b/bridges/modules/dispatch/Cargo.toml index 6170af272ad9..fb601a70a1e2 100644 --- a/bridges/modules/dispatch/Cargo.toml +++ b/bridges/modules/dispatch/Cargo.toml @@ -8,6 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } log = { version = "0.4.14", default-features = false } # Bridge dependencies @@ -32,9 +33,11 @@ default = ["std"] std = [ "bp-message-dispatch/std", "bp-runtime/std", + "codec/std", "frame-support/std", "frame-system/std", "log/std", + "scale-info/std", "sp-core/std", "sp-runtime/std", "sp-std/std", diff --git a/bridges/modules/dispatch/src/lib.rs b/bridges/modules/dispatch/src/lib.rs index 8d089f330506..00858272365a 100644 --- a/bridges/modules/dispatch/src/lib.rs +++ b/bridges/modules/dispatch/src/lib.rs @@ -399,6 +399,7 @@ mod tests { use super::*; use frame_support::{dispatch::GetDispatchInfo, parameter_types, weights::Weight}; use frame_system::{EventRecord, Phase}; + use scale_info::TypeInfo; use sp_core::H256; use sp_runtime::{ testing::Header, @@ -412,7 +413,7 @@ mod tests { const SOURCE_CHAIN_ID: ChainId = *b"srce"; const TARGET_CHAIN_ID: ChainId = *b"trgt"; - #[derive(Debug, Encode, Decode, Clone, PartialEq, Eq)] + #[derive(Debug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] pub struct TestAccountPublic(AccountId); impl IdentifyAccount for TestAccountPublic { @@ -423,7 +424,7 @@ mod tests { } } - #[derive(Debug, Encode, Decode, Clone, PartialEq, Eq)] + #[derive(Debug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] pub struct TestSignature(AccountId); impl Verify for TestSignature { @@ -516,7 +517,7 @@ mod tests { impl Contains for TestCallFilter { fn contains(call: &Call) -> bool { - !matches!(*call, Call::System(frame_system::Call::fill_block(_))) + !matches!(*call, Call::System(frame_system::Call::fill_block { .. })) } } @@ -569,8 +570,9 @@ mod tests { let id = [0; 4]; const BAD_SPEC_VERSION: SpecVersion = 99; - let mut message = - prepare_root_message(Call::System(>::remark(vec![1, 2, 3]))); + let mut message = prepare_root_message(Call::System(frame_system::Call::::remark { + remark: vec![1, 2, 3], + })); let weight = message.weight; message.spec_version = BAD_SPEC_VERSION; @@ -599,7 +601,7 @@ mod tests { fn should_fail_on_weight_mismatch() { new_test_ext().execute_with(|| { let id = [0; 4]; - let call = Call::System(>::remark(vec![1, 2, 3])); + let call = Call::System(frame_system::Call::::remark { remark: vec![1, 2, 3] }); let call_weight = call.get_dispatch_info().weight; let mut message = prepare_root_message(call); message.weight = 7; @@ -637,7 +639,7 @@ mod tests { let call_origin = CallOrigin::TargetAccount(1, TestAccountPublic(1), TestSignature(99)); let message = prepare_message( call_origin, - Call::System(>::remark(vec![1, 2, 3])), + Call::System(frame_system::Call::::remark { remark: vec![1, 2, 3] }), ); let weight = message.weight; @@ -687,8 +689,9 @@ mod tests { new_test_ext().execute_with(|| { let id = [0; 4]; - let mut message = - prepare_root_message(Call::System(>::remark(vec![1, 2, 3]))); + let mut message = prepare_root_message(Call::System(frame_system::Call::::remark { + remark: vec![1, 2, 3], + })); let weight = message.weight; message.call.0 = vec![]; @@ -716,7 +719,9 @@ mod tests { new_test_ext().execute_with(|| { let id = [0; 4]; - let call = Call::System(>::fill_block(Perbill::from_percent(75))); + let call = Call::System(frame_system::Call::::fill_block { + ratio: Perbill::from_percent(75), + }); let weight = call.get_dispatch_info().weight; let mut message = prepare_root_message(call); message.weight = weight; @@ -745,8 +750,9 @@ mod tests { new_test_ext().execute_with(|| { let id = [0; 4]; - let mut message = - prepare_root_message(Call::System(>::remark(vec![1, 2, 3]))); + let mut message = prepare_root_message(Call::System(frame_system::Call::::remark { + remark: vec![1, 2, 3], + })); let weight = message.weight; message.dispatch_fee_payment = DispatchFeePayment::AtTargetChain; @@ -779,8 +785,9 @@ mod tests { new_test_ext().execute_with(|| { let id = [0; 4]; - let mut message = - prepare_root_message(Call::System(>::remark(vec![1, 2, 3]))); + let mut message = prepare_root_message(Call::System(frame_system::Call::::remark { + remark: vec![1, 2, 3], + })); message.dispatch_fee_payment = DispatchFeePayment::AtTargetChain; System::set_block_number(1); @@ -808,7 +815,7 @@ mod tests { new_test_ext().execute_with(|| { let id = [0; 4]; - let call = Call::System(>::set_heap_pages(1)); + let call = Call::System(frame_system::Call::::set_heap_pages { pages: 1 }); let message = prepare_target_message(call); System::set_block_number(1); @@ -835,7 +842,9 @@ mod tests { fn should_dispatch_bridge_message_from_root_origin() { new_test_ext().execute_with(|| { let id = [0; 4]; - let message = prepare_root_message(Call::System(>::remark(vec![1, 2, 3]))); + let message = prepare_root_message(Call::System(frame_system::Call::::remark { + remark: vec![1, 2, 3], + })); System::set_block_number(1); let result = Dispatch::dispatch(SOURCE_CHAIN_ID, TARGET_CHAIN_ID, id, Ok(message), |_, _| unreachable!()); @@ -862,7 +871,7 @@ mod tests { new_test_ext().execute_with(|| { let id = [0; 4]; - let call = Call::System(>::remark(vec![])); + let call = Call::System(frame_system::Call::::remark { remark: vec![] }); let message = prepare_target_message(call); System::set_block_number(1); @@ -890,7 +899,7 @@ mod tests { new_test_ext().execute_with(|| { let id = [0; 4]; - let call = Call::System(>::remark(vec![])); + let call = Call::System(frame_system::Call::::remark { remark: vec![] }); let message = prepare_source_message(call); System::set_block_number(1); @@ -915,7 +924,7 @@ mod tests { #[test] fn origin_is_checked_when_verifying_sending_message_using_source_root_account() { - let call = Call::System(>::remark(vec![])); + let call = Call::System(frame_system::Call::::remark { remark: vec![] }); let message = prepare_root_message(call); // When message is sent by Root, CallOrigin::SourceRoot is allowed @@ -930,7 +939,7 @@ mod tests { #[test] fn origin_is_checked_when_verifying_sending_message_using_target_account() { - let call = Call::System(>::remark(vec![])); + let call = Call::System(frame_system::Call::::remark { remark: vec![] }); let message = prepare_target_message(call); // When message is sent by Root, CallOrigin::TargetAccount is not allowed @@ -955,7 +964,7 @@ mod tests { #[test] fn origin_is_checked_when_verifying_sending_message_using_source_account() { - let call = Call::System(>::remark(vec![])); + let call = Call::System(frame_system::Call::::remark { remark: vec![] }); let message = prepare_source_message(call); // Sending a message from the expected origin account works diff --git a/bridges/modules/ethereum-contract-builtin/Cargo.toml b/bridges/modules/ethereum-contract-builtin/Cargo.toml index d20b0d0be85b..6177ed3734ca 100644 --- a/bridges/modules/ethereum-contract-builtin/Cargo.toml +++ b/bridges/modules/ethereum-contract-builtin/Cargo.toml @@ -9,7 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0" } ethereum-types = "0.11.0" -finality-grandpa = "0.14.1" +finality-grandpa = "0.14.4" hex = "0.4" log = "0.4.14" diff --git a/bridges/modules/grandpa/Cargo.toml b/bridges/modules/grandpa/Cargo.toml index aa2e33cf447b..0347af07b77c 100644 --- a/bridges/modules/grandpa/Cargo.toml +++ b/bridges/modules/grandpa/Cargo.toml @@ -9,9 +9,10 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -finality-grandpa = { version = "0.14.1", default-features = false } +finality-grandpa = { version = "0.14.4", default-features = false } log = { version = "0.4.14", default-features = false } num-traits = { version = "0.2", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true } # Bridge Dependencies @@ -47,6 +48,7 @@ std = [ "frame-system/std", "log/std", "num-traits/std", + "scale-info/std", "serde", "sp-finality-grandpa/std", "sp-runtime/std", diff --git a/bridges/modules/messages/Cargo.toml b/bridges/modules/messages/Cargo.toml index a26cf65c028b..1d664e421695 100644 --- a/bridges/modules/messages/Cargo.toml +++ b/bridges/modules/messages/Cargo.toml @@ -11,6 +11,7 @@ bitvec = { version = "0.20", default-features = false, features = ["alloc"] } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } log = { version = "0.4.14", default-features = false } num-traits = { version = "0.2", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } # Bridge dependencies @@ -47,6 +48,7 @@ std = [ "frame-system/std", "log/std", "num-traits/std", + "scale-info/std", "serde", "sp-core/std", "sp-runtime/std", diff --git a/bridges/modules/messages/src/mock.rs b/bridges/modules/messages/src/mock.rs index 4fc8d3ed6b17..35358b76f26d 100644 --- a/bridges/modules/messages/src/mock.rs +++ b/bridges/modules/messages/src/mock.rs @@ -32,6 +32,7 @@ use bp_messages::{ use bp_runtime::{messages::MessageDispatchResult, Size}; use codec::{Decode, Encode}; use frame_support::{parameter_types, weights::Weight}; +use scale_info::TypeInfo; use sp_core::H256; use sp_runtime::{ testing::Header as SubstrateHeader, @@ -42,7 +43,7 @@ use std::collections::BTreeMap; pub type AccountId = u64; pub type Balance = u64; -#[derive(Decode, Encode, Clone, Debug, PartialEq, Eq)] +#[derive(Decode, Encode, Clone, Debug, PartialEq, Eq, TypeInfo)] pub struct TestPayload { /// Field that may be used to identify messages. pub id: u64, @@ -138,7 +139,7 @@ parameter_types! { pub storage TokenConversionRate: FixedU128 = 1.into(); } -#[derive(Debug, Clone, Encode, Decode, PartialEq, Eq)] +#[derive(Debug, Clone, Encode, Decode, PartialEq, Eq, TypeInfo)] pub enum TestMessagesParameter { TokenConversionRate(FixedU128), } @@ -211,7 +212,7 @@ pub const PAYLOAD_REJECTED_BY_TARGET_CHAIN: TestPayload = message_payload(1, 50) pub type MessagesByLaneVec = Vec<(LaneId, ProvedLaneMessages>)>; /// Test messages proof. -#[derive(Debug, Encode, Decode, Clone, PartialEq, Eq)] +#[derive(Debug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] pub struct TestMessagesProof { pub result: Result, } @@ -242,7 +243,7 @@ impl From>, ()>> for TestMessagesProof { } /// Messages delivery proof used in tests. -#[derive(Debug, Encode, Decode, Eq, Clone, PartialEq)] +#[derive(Debug, Encode, Decode, Eq, Clone, PartialEq, TypeInfo)] pub struct TestMessagesDeliveryProof(pub Result<(LaneId, InboundLaneData), ()>); impl Size for TestMessagesDeliveryProof { diff --git a/bridges/primitives/chain-millau/Cargo.toml b/bridges/primitives/chain-millau/Cargo.toml index 671bcbd53d00..3628f9092091 100644 --- a/bridges/primitives/chain-millau/Cargo.toml +++ b/bridges/primitives/chain-millau/Cargo.toml @@ -16,7 +16,7 @@ fixed-hash = { version = "0.7.0", default-features = false } hash256-std-hasher = { version = "0.15.2", default-features = false } impl-codec = { version = "0.5.1", default-features = false } impl-serde = { version = "0.3.1", optional = true } -parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } # Substrate Based Dependencies diff --git a/bridges/primitives/header-chain/Cargo.toml b/bridges/primitives/header-chain/Cargo.toml index 844e59865202..e64a54a1ad20 100644 --- a/bridges/primitives/header-chain/Cargo.toml +++ b/bridges/primitives/header-chain/Cargo.toml @@ -8,7 +8,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -finality-grandpa = { version = "0.14.1", default-features = false } +finality-grandpa = { version = "0.14.4", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true } # Substrate Dependencies @@ -28,6 +29,7 @@ default = ["std"] std = [ "codec/std", "finality-grandpa/std", + "scale-info/std", "serde/std", "frame-support/std", "sp-core/std", diff --git a/bridges/primitives/header-chain/src/justification.rs b/bridges/primitives/header-chain/src/justification.rs index cc47070b8ca2..fc7256481068 100644 --- a/bridges/primitives/header-chain/src/justification.rs +++ b/bridges/primitives/header-chain/src/justification.rs @@ -22,6 +22,7 @@ use codec::{Decode, Encode}; use finality_grandpa::voter_set::VoterSet; use frame_support::RuntimeDebug; +use scale_info::TypeInfo; use sp_finality_grandpa::{AuthorityId, AuthoritySignature, SetId}; use sp_runtime::traits::Header as HeaderT; use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet}; @@ -32,7 +33,7 @@ use sp_std::prelude::*; /// /// This particular proof is used to prove that headers on a bridged chain /// (so not our chain) have been finalized correctly. -#[derive(Encode, Decode, RuntimeDebug, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)] pub struct GrandpaJustification { /// The round (voting period) this justification is valid for. pub round: u64, diff --git a/bridges/primitives/header-chain/src/lib.rs b/bridges/primitives/header-chain/src/lib.rs index adac6eb26880..16511e99f79e 100644 --- a/bridges/primitives/header-chain/src/lib.rs +++ b/bridges/primitives/header-chain/src/lib.rs @@ -24,6 +24,7 @@ use core::clone::Clone; use core::cmp::Eq; use core::default::Default; use core::fmt::Debug; +use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_finality_grandpa::{AuthorityList, ConsensusLog, SetId, GRANDPA_ENGINE_ID}; @@ -39,7 +40,7 @@ pub trait Parameter: Codec + EncodeLike + Clone + Eq + Debug {} impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + Debug {} /// A GRANDPA Authority List and ID. -#[derive(Default, Encode, Decode, RuntimeDebug, PartialEq, Clone)] +#[derive(Default, Encode, Decode, RuntimeDebug, PartialEq, Clone, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct AuthoritySet { /// List of GRANDPA authorities for the current round. @@ -58,7 +59,7 @@ impl AuthoritySet { /// Data required for initializing the bridge pallet. /// /// The bridge needs to know where to start its sync from, and this provides that initial context. -#[derive(Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, Clone)] +#[derive(Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, Clone, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct InitializationData { /// The header from which we should start syncing. diff --git a/bridges/primitives/message-dispatch/Cargo.toml b/bridges/primitives/message-dispatch/Cargo.toml index 84fa48553a21..9b24ae86a067 100644 --- a/bridges/primitives/message-dispatch/Cargo.toml +++ b/bridges/primitives/message-dispatch/Cargo.toml @@ -9,6 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] bp-runtime = { path = "../runtime", default-features = false } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Substrate Dependencies @@ -21,5 +22,6 @@ std = [ "bp-runtime/std", "codec/std", "frame-support/std", + "scale-info/std", "sp-std/std", ] diff --git a/bridges/primitives/message-dispatch/src/lib.rs b/bridges/primitives/message-dispatch/src/lib.rs index 859dc5e469ad..b2683674b776 100644 --- a/bridges/primitives/message-dispatch/src/lib.rs +++ b/bridges/primitives/message-dispatch/src/lib.rs @@ -25,6 +25,7 @@ use bp_runtime::{ }; use codec::{Decode, Encode}; use frame_support::RuntimeDebug; +use scale_info::TypeInfo; use sp_std::prelude::*; /// Message dispatch weight. @@ -71,7 +72,7 @@ pub trait MessageDispatch { /// The source chain can (and should) verify that the message can be dispatched on the target chain /// with a particular origin given the source chain's origin. This can be done with the /// `verify_message_origin()` function. -#[derive(RuntimeDebug, Encode, Decode, Clone, PartialEq, Eq)] +#[derive(RuntimeDebug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] pub enum CallOrigin { /// Call is sent by the Root origin on the source chain. On the target chain it is dispatched /// from a derived account. @@ -111,7 +112,7 @@ pub enum CallOrigin { /// Runtime specification version. We only dispatch messages that have the same /// runtime version. Otherwise we risk to misinterpret encoded calls. diff --git a/bridges/primitives/messages/Cargo.toml b/bridges/primitives/messages/Cargo.toml index b5b68220a409..191742005f44 100644 --- a/bridges/primitives/messages/Cargo.toml +++ b/bridges/primitives/messages/Cargo.toml @@ -10,6 +10,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" bitvec = { version = "0.20", default-features = false, features = ["alloc"] } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive", "bit-vec"] } impl-trait-for-tuples = "0.2" +scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } # Bridge dependencies @@ -29,6 +30,7 @@ std = [ "codec/std", "frame-support/std", "frame-system/std", + "scale-info/std", "serde", - "sp-std/std" + "sp-std/std", ] diff --git a/bridges/primitives/messages/src/lib.rs b/bridges/primitives/messages/src/lib.rs index 963543ec3213..344735b53c91 100644 --- a/bridges/primitives/messages/src/lib.rs +++ b/bridges/primitives/messages/src/lib.rs @@ -26,6 +26,7 @@ use bitvec::prelude::*; use bp_runtime::messages::DispatchFeePayment; use codec::{Decode, Encode}; use frame_support::RuntimeDebug; +use scale_info::TypeInfo; use sp_std::{collections::vec_deque::VecDeque, prelude::*}; pub mod source_chain; @@ -35,7 +36,7 @@ pub mod target_chain; pub use frame_support::weights::Weight; /// Messages pallet operating mode. -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] pub enum OperatingMode { /// Normal mode, when all operations are allowed. @@ -81,7 +82,7 @@ pub type MessageId = (LaneId, MessageNonce); pub type MessagePayload = Vec; /// Message key (unique message identifier) as it is stored in the storage. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub struct MessageKey { /// ID of the message lane. pub lane_id: LaneId, @@ -90,7 +91,7 @@ pub struct MessageKey { } /// Message data as it is stored in the storage. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub struct MessageData { /// Message payload. pub payload: MessagePayload, @@ -99,7 +100,7 @@ pub struct MessageData { } /// Message as it is stored in the storage. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub struct Message { /// Message key. pub key: MessageKey, @@ -108,7 +109,7 @@ pub struct Message { } /// Inbound lane data. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] pub struct InboundLaneData { /// Identifiers of relayers and messages that they have delivered to this lane (ordered by message nonce). /// @@ -195,7 +196,7 @@ pub type DispatchResultsBitVec = BitVec; /// /// This struct represents a continuous range of messages that have been delivered by the same relayer /// and whose confirmations are still pending. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] pub struct UnrewardedRelayer { /// Identifier of the relayer. pub relayer: RelayerId, @@ -204,7 +205,7 @@ pub struct UnrewardedRelayer { } /// Delivered messages with their dispatch result. -#[derive(Clone, Default, Encode, Decode, RuntimeDebug, PartialEq, Eq)] +#[derive(Clone, Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo)] pub struct DeliveredMessages { /// Nonce of the first message that has been delivered (inclusive). pub begin: MessageNonce, @@ -254,7 +255,7 @@ impl DeliveredMessages { } /// Gist of `InboundLaneData::relayers` field used by runtime APIs. -#[derive(Clone, Default, Encode, Decode, RuntimeDebug, PartialEq, Eq)] +#[derive(Clone, Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo)] pub struct UnrewardedRelayersState { /// Number of entries in the `InboundLaneData::relayers` set. pub unrewarded_relayer_entries: MessageNonce, @@ -266,7 +267,7 @@ pub struct UnrewardedRelayersState { } /// Outbound lane data. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] pub struct OutboundLaneData { /// Nonce of oldest message that we haven't yet pruned. May point to not-yet-generated message if /// all sent messages are already pruned. diff --git a/bridges/primitives/messages/src/target_chain.rs b/bridges/primitives/messages/src/target_chain.rs index d1b87fd02323..873059763791 100644 --- a/bridges/primitives/messages/src/target_chain.rs +++ b/bridges/primitives/messages/src/target_chain.rs @@ -21,13 +21,14 @@ use crate::{LaneId, Message, MessageData, MessageKey, OutboundLaneData}; use bp_runtime::{messages::MessageDispatchResult, Size}; use codec::{Decode, Encode, Error as CodecError}; use frame_support::{weights::Weight, Parameter, RuntimeDebug}; +use scale_info::TypeInfo; use sp_std::{collections::btree_map::BTreeMap, fmt::Debug, prelude::*}; /// Proved messages from the source chain. pub type ProvedMessages = BTreeMap>; /// Proved messages from single lane of the source chain. -#[derive(RuntimeDebug, Encode, Decode, Clone, PartialEq, Eq)] +#[derive(RuntimeDebug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] pub struct ProvedLaneMessages { /// Optional outbound lane state. pub lane_state: Option, diff --git a/bridges/primitives/polkadot-core/Cargo.toml b/bridges/primitives/polkadot-core/Cargo.toml index 995f948e5d47..5e95c223ce2e 100644 --- a/bridges/primitives/polkadot-core/Cargo.toml +++ b/bridges/primitives/polkadot-core/Cargo.toml @@ -8,6 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Bridge Dependencies @@ -35,6 +36,7 @@ std = [ "frame-support/std", "frame-system/std", "parity-scale-codec/std", + "scale-info/std", "sp-api/std", "sp-core/std", "sp-runtime/std", diff --git a/bridges/primitives/polkadot-core/src/lib.rs b/bridges/primitives/polkadot-core/src/lib.rs index a1619b27bcf4..151e374e6603 100644 --- a/bridges/primitives/polkadot-core/src/lib.rs +++ b/bridges/primitives/polkadot-core/src/lib.rs @@ -213,7 +213,7 @@ pub type AdditionalSigned = (u32, u32, Hash, Hash, (), (), ()); /// A simplified version of signed extensions meant for producing signed transactions /// and signed payload in the client code. -#[derive(PartialEq, Eq, Clone, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, RuntimeDebug, scale_info::TypeInfo)] pub struct SignedExtensions { encode_payload: SignedExtra, additional_signed: AdditionalSigned, @@ -266,7 +266,14 @@ impl SignedExtensions { impl sp_runtime::traits::SignedExtension for SignedExtensions where - Call: parity_scale_codec::Codec + sp_std::fmt::Debug + Sync + Send + Clone + Eq + PartialEq, + Call: parity_scale_codec::Codec + + sp_std::fmt::Debug + + Sync + + Send + + Clone + + Eq + + PartialEq + + scale_info::StaticTypeInfo, Call: Dispatchable, { const IDENTIFIER: &'static str = "Not needed."; diff --git a/bridges/primitives/runtime/Cargo.toml b/bridges/primitives/runtime/Cargo.toml index 17fa96b2c908..cdd47e30d3f8 100644 --- a/bridges/primitives/runtime/Cargo.toml +++ b/bridges/primitives/runtime/Cargo.toml @@ -10,6 +10,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } hash-db = { version = "0.15.2", default-features = false } num-traits = { version = "0.2", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Substrate Dependencies @@ -32,6 +33,7 @@ std = [ "frame-support/std", "hash-db/std", "num-traits/std", + "scale-info/std", "sp-core/std", "sp-io/std", "sp-runtime/std", diff --git a/bridges/primitives/runtime/src/messages.rs b/bridges/primitives/runtime/src/messages.rs index f6e04619c723..3ab867773f9f 100644 --- a/bridges/primitives/runtime/src/messages.rs +++ b/bridges/primitives/runtime/src/messages.rs @@ -18,9 +18,10 @@ use codec::{Decode, Encode}; use frame_support::{weights::Weight, RuntimeDebug}; +use scale_info::TypeInfo; /// Where message dispatch fee is paid? -#[derive(Encode, Decode, RuntimeDebug, Clone, Copy, PartialEq, Eq)] +#[derive(Encode, Decode, RuntimeDebug, Clone, Copy, PartialEq, Eq, TypeInfo)] pub enum DispatchFeePayment { /// The dispacth fee is paid at the source chain. AtSourceChain, @@ -34,7 +35,7 @@ pub enum DispatchFeePayment { } /// Message dispatch result. -#[derive(Encode, Decode, RuntimeDebug, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)] pub struct MessageDispatchResult { /// Dispatch result flag. This flag is relayed back to the source chain and, generally /// speaking, may bring any (that fits in single bit) information from the dispatcher at diff --git a/bridges/primitives/test-utils/Cargo.toml b/bridges/primitives/test-utils/Cargo.toml index fe6a68087873..14d3c031b4c8 100644 --- a/bridges/primitives/test-utils/Cargo.toml +++ b/bridges/primitives/test-utils/Cargo.toml @@ -9,7 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" bp-header-chain = { path = "../header-chain", default-features = false } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } ed25519-dalek = { version = "1.0", default-features = false, features = ["u64_backend"] } -finality-grandpa = { version = "0.14.1", default-features = false } +finality-grandpa = { version = "0.14.4", default-features = false } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/bridges/relays/bin-substrate/Cargo.toml b/bridges/relays/bin-substrate/Cargo.toml index c2f30546f30f..830f592ec4e1 100644 --- a/bridges/relays/bin-substrate/Cargo.toml +++ b/bridges/relays/bin-substrate/Cargo.toml @@ -32,7 +32,7 @@ bp-wococo = { path = "../../primitives/chain-wococo" } bp-runtime = { path = "../../primitives/runtime" } bp-westend = { path = "../../primitives/chain-westend" } bridge-runtime-common = { path = "../../bin/runtime-common" } -finality-grandpa = { version = "0.14.1" } +finality-grandpa = { version = "0.14.1", } finality-relay = { path = "../finality" } headers-relay = { path = "../headers" } messages-relay = { path = "../messages" } diff --git a/core-primitives/Cargo.toml b/core-primitives/Cargo.toml index e40196ec559f..9b469657bde1 100644 --- a/core-primitives/Cargo.toml +++ b/core-primitives/Cargo.toml @@ -8,15 +8,18 @@ edition = "2018" sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = [ "derive" ] } parity-util-mem = { version = "0.10.0", default-features = false, optional = true } [features] default = [ "std" ] std = [ + "scale-info/std", "sp-core/std", "sp-runtime/std", "sp-std/std", + "scale-info/std", "parity-scale-codec/std", "parity-util-mem", ] diff --git a/core-primitives/src/lib.rs b/core-primitives/src/lib.rs index f0313b95d0d1..c00548e57c3c 100644 --- a/core-primitives/src/lib.rs +++ b/core-primitives/src/lib.rs @@ -23,6 +23,7 @@ use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "std")] use parity_util_mem::MallocSizeOf; +use scale_info::TypeInfo; use sp_runtime::{ generic, traits::{IdentifyAccount, Verify}, @@ -64,7 +65,7 @@ pub type Hash = sp_core::H256; /// This type is produced by [`CandidateReceipt::hash`]. /// /// This type makes it easy to enforce that a hash is a candidate hash on the type level. -#[derive(Clone, Copy, Encode, Decode, Hash, Eq, PartialEq, Default, PartialOrd, Ord)] +#[derive(Clone, Copy, Encode, Decode, Hash, Eq, PartialEq, Default, PartialOrd, Ord, TypeInfo)] #[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct CandidateHash(pub Hash); @@ -117,7 +118,7 @@ pub type DownwardMessage = sp_std::vec::Vec; /// A wrapped version of `DownwardMessage`. The difference is that it has attached the block number when /// the message was sent. -#[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq)] +#[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq, TypeInfo)] #[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct InboundDownwardMessage { /// The block number at which these messages were put into the downward message queue. @@ -127,7 +128,7 @@ pub struct InboundDownwardMessage { } /// An HRMP message seen from the perspective of a recipient. -#[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq)] +#[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq, TypeInfo)] #[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct InboundHrmpMessage { /// The block number at which this message was sent. @@ -139,7 +140,7 @@ pub struct InboundHrmpMessage { } /// An HRMP message seen from the perspective of a sender. -#[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq, Eq, Hash)] +#[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq, Eq, Hash, TypeInfo)] #[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct OutboundHrmpMessage { /// The para that will get this message in its downward message queue. diff --git a/node/test/polkadot-simnet/common/src/lib.rs b/node/test/polkadot-simnet/common/src/lib.rs index e35ca7f83b0c..c2d7ac3c67de 100644 --- a/node/test/polkadot-simnet/common/src/lib.rs +++ b/node/test/polkadot-simnet/common/src/lib.rs @@ -138,7 +138,7 @@ where let proposal_hash = { // note the call (pre-image?) of the call. node.submit_extrinsic( - DemocracyCall::note_preimage(call.into().encode()), + DemocracyCall::note_preimage { encoded_proposal: call.into().encode() }, Some(whales[0].clone()), ) .await?; @@ -161,15 +161,16 @@ where // submit external_propose call through council collective { - let external_propose = - DemocracyCall::external_propose_majority(proposal_hash.clone().into()); + let external_propose = DemocracyCall::external_propose_majority { + proposal_hash: proposal_hash.clone().into(), + }; let length = external_propose.using_encoded(|x| x.len()) as u32 + 1; let weight = Weight::MAX / 100_000_000; - let proposal = CouncilCollectiveCall::propose( - council_collective.len() as u32, - Box::new(external_propose.clone().into()), - length, - ); + let proposal = CouncilCollectiveCall::propose { + threshold: council_collective.len() as u32, + proposal: Box::new(external_propose.clone().into()), + length_bound: length, + }; node.submit_extrinsic(proposal.clone(), Some(council_collective[0].clone())) .await?; @@ -191,13 +192,18 @@ where // vote for member in &council_collective[1..] { - let call = CouncilCollectiveCall::vote(hash.clone(), index, true); + let call = CouncilCollectiveCall::vote { proposal: hash.clone(), index, approve: true }; node.submit_extrinsic(call, Some(member.clone())).await?; } node.seal_blocks(1).await; // close vote - let call = CouncilCollectiveCall::close(hash, index, weight, length); + let call = CouncilCollectiveCall::close { + proposal_hash: hash, + index, + proposal_weight_bound: weight, + length_bound: length, + }; node.submit_extrinsic(call, Some(council_collective[0].clone())).await?; node.seal_blocks(1).await; @@ -227,15 +233,18 @@ where // next technical collective must fast track the proposal. { - let fast_track = - DemocracyCall::fast_track(proposal_hash.into(), FastTrackVotingPeriod::get(), 0); + let fast_track = DemocracyCall::fast_track { + proposal_hash: proposal_hash.into(), + voting_period: FastTrackVotingPeriod::get(), + delay: 0, + }; let weight = Weight::MAX / 100_000_000; let length = fast_track.using_encoded(|x| x.len()) as u32 + 1; - let proposal = TechnicalCollectiveCall::propose( - technical_collective.len() as u32, - Box::new(fast_track.into()), - length, - ); + let proposal = TechnicalCollectiveCall::propose { + threshold: technical_collective.len() as u32, + proposal: Box::new(fast_track.into()), + length_bound: length, + }; node.submit_extrinsic(proposal, Some(technical_collective[0].clone())).await?; node.seal_blocks(1).await; @@ -259,13 +268,19 @@ where // vote for member in &technical_collective[1..] { - let call = TechnicalCollectiveCall::vote(hash.clone(), index, true); + let call = + TechnicalCollectiveCall::vote { proposal: hash.clone(), index, approve: true }; node.submit_extrinsic(call, Some(member.clone())).await?; } node.seal_blocks(1).await; // close vote - let call = TechnicalCollectiveCall::close(hash, index, weight, length); + let call = CouncilCollectiveCall::close { + proposal_hash: hash, + index, + proposal_weight_bound: weight, + length_bound: length, + }; node.submit_extrinsic(call, Some(technical_collective[0].clone())).await?; node.seal_blocks(1).await; @@ -309,14 +324,14 @@ where format!("democracy::Event::Started not found in events: {:#?}", node.events()) })?; - let call = DemocracyCall::vote( + let call = DemocracyCall::vote { ref_index, - AccountVote::Standard { + vote: AccountVote::Standard { vote: Vote { aye: true, conviction: Conviction::Locked1x }, // 10 DOTS balance: 10_000_000_000_000, }, - ); + }; for whale in whales { node.submit_extrinsic(call.clone(), Some(whale)).await?; } @@ -404,9 +419,12 @@ mod tests { node.seal_blocks(1).await; // submit extrinsics let alice = MultiSigner::from(Alice.public()).into_account(); - node.submit_extrinsic(system::Call::remark((b"hello world").to_vec()), Some(alice)) - .await - .unwrap(); + node.submit_extrinsic( + system::Call::remark { remark: (b"hello world").to_vec() }, + Some(alice), + ) + .await + .unwrap(); // look ma, I can read state. let _events = node.with_state(|| system::Pallet::::events()); diff --git a/node/test/polkadot-simnet/test/src/main.rs b/node/test/polkadot-simnet/test/src/main.rs index 240167aa54fe..e637c72ba076 100644 --- a/node/test/polkadot-simnet/test/src/main.rs +++ b/node/test/polkadot-simnet/test/src/main.rs @@ -35,7 +35,7 @@ fn main() -> Result<(), Box> { .ok_or("Polkadot development wasm not available")? .to_vec(); // upgrade runtime. - dispatch_with_root(system::Call::set_code(wasm_binary), &node).await?; + dispatch_with_root(system::Call::set_code { code: wasm_binary }, &node).await?; // assert that the runtime has been updated by looking at events let events = node @@ -74,8 +74,11 @@ fn main() -> Result<(), Box> { ); // post upgrade tests, a simple balance transfer - node.submit_extrinsic(balances::Call::transfer(dest.into(), balance), Some(from)) - .await?; + node.submit_extrinsic( + balances::Call::transfer { dest: dest.into(), value: balance }, + Some(from), + ) + .await?; node.seal_blocks(1).await; let events = node diff --git a/node/test/service/src/lib.rs b/node/test/service/src/lib.rs index 447c8afd5d4f..d52b9ecc3284 100644 --- a/node/test/service/src/lib.rs +++ b/node/test/service/src/lib.rs @@ -286,16 +286,16 @@ impl PolkadotTestNode { validation_code: impl Into, genesis_head: impl Into, ) -> Result<(), RpcTransactionError> { - let call = ParasSudoWrapperCall::sudo_schedule_para_initialize( + let call = ParasSudoWrapperCall::sudo_schedule_para_initialize { id, - ParaGenesisArgs { + genesis: ParaGenesisArgs { genesis_head: genesis_head.into(), validation_code: validation_code.into(), parachain: true, }, - ); + }; - self.send_extrinsic(SudoCall::sudo(Box::new(call.into())), Sr25519Keyring::Alice) + self.send_extrinsic(SudoCall::sudo { call: Box::new(call.into()) }, Sr25519Keyring::Alice) .await .map(drop) } @@ -377,10 +377,10 @@ pub fn construct_transfer_extrinsic( dest: sp_keyring::AccountKeyring, value: Balance, ) -> UncheckedExtrinsic { - let function = polkadot_test_runtime::Call::Balances(pallet_balances::Call::transfer( - MultiSigner::from(dest.public()).into_account().into(), + let function = polkadot_test_runtime::Call::Balances(pallet_balances::Call::transfer { + dest: MultiSigner::from(dest.public()).into_account().into(), value, - )); + }); construct_extrinsic(client, function, origin, 0) } diff --git a/node/test/service/tests/call-function.rs b/node/test/service/tests/call-function.rs index 794a9e5c43c3..9a6ea4950ff9 100644 --- a/node/test/service/tests/call-function.rs +++ b/node/test/service/tests/call-function.rs @@ -22,10 +22,10 @@ async fn call_function_actually_work() { let alice = run_validator_node(tokio::runtime::Handle::current(), Alice, || {}, Vec::new(), None); - let function = polkadot_test_runtime::Call::Balances(pallet_balances::Call::transfer( - Default::default(), - 1, - )); + let function = polkadot_test_runtime::Call::Balances(pallet_balances::Call::transfer { + dest: Default::default(), + value: 1, + }); let output = alice.send_extrinsic(function, Bob).await.unwrap(); let res = output.result.expect("return value expected"); diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index e4ff85cc20ec..97ce76d38f0f 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -11,6 +11,7 @@ edition = "2018" # various unnecessary Substrate-specific endpoints. parity-scale-codec = { version = "2.0.0", default-features = false, features = [ "derive" ] } parity-util-mem = { version = "0.10.0", optional = true } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -26,6 +27,7 @@ default = ["std"] wasm-api = [] std = [ "parity-scale-codec/std", + "scale-info/std", "serde/std", "sp-std/std", "sp-runtime/std", diff --git a/parachain/src/primitives.rs b/parachain/src/primitives.rs index 900c75c6cd34..bda56bf59e8c 100644 --- a/parachain/src/primitives.rs +++ b/parachain/src/primitives.rs @@ -21,6 +21,7 @@ use sp_std::vec::Vec; use frame_support::weights::Weight; use parity_scale_codec::{CompactAs, Decode, Encode}; +use scale_info::TypeInfo; use sp_core::{RuntimeDebug, TypeId}; use sp_runtime::traits::Hash as _; @@ -40,7 +41,7 @@ pub use polkadot_core_primitives::BlockNumber as RelayChainBlockNumber; /// Parachain head data included in the chain. #[derive( - PartialEq, Eq, Clone, PartialOrd, Ord, Encode, Decode, RuntimeDebug, derive_more::From, + PartialEq, Eq, Clone, PartialOrd, Ord, Encode, Decode, RuntimeDebug, derive_more::From, TypeInfo, )] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Default, Hash, MallocSizeOf))] pub struct HeadData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); @@ -53,7 +54,9 @@ impl HeadData { } /// Parachain validation code. -#[derive(Default, PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, derive_more::From)] +#[derive( + Default, PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, derive_more::From, TypeInfo, +)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, MallocSizeOf))] pub struct ValidationCode(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); @@ -69,7 +72,7 @@ impl ValidationCode { /// This type is produced by [`ValidationCode::hash`]. /// /// This type makes it easy to enforce that a hash is a validation code hash on the type level. -#[derive(Clone, Copy, Encode, Decode, Default, Hash, Eq, PartialEq, PartialOrd, Ord)] +#[derive(Clone, Copy, Encode, Decode, Default, Hash, Eq, PartialEq, PartialOrd, Ord, TypeInfo)] #[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct ValidationCodeHash(Hash); @@ -112,7 +115,7 @@ impl sp_std::fmt::LowerHex for ValidationCodeHash { /// Parachain block data. /// /// Contains everything required to validate para-block, may contain block and witness data. -#[derive(PartialEq, Eq, Clone, Encode, Decode, derive_more::From)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, derive_more::From, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug, MallocSizeOf))] pub struct BlockData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); @@ -130,6 +133,7 @@ pub struct BlockData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec PartialEq, PartialOrd, RuntimeDebug, + TypeInfo, )] #[cfg_attr( feature = "std", @@ -227,7 +231,9 @@ impl sp_std::ops::Sub for Id { } } -#[derive(Clone, Copy, Default, Encode, Decode, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug)] +#[derive( + Clone, Copy, Default, Encode, Decode, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, TypeInfo, +)] pub struct Sibling(pub Id); impl From for Sibling { @@ -330,7 +336,7 @@ impl AccountIdConversion for Id { /// is allowed between two participants in one direction, i.e. there cannot be 2 different channels /// identified by `(A, B)`. A channel with the same para id in sender and recipient is invalid. That /// is, however, not enforced. -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(Hash))] pub struct HrmpChannelId { /// The para that acts as the sender in this channel. @@ -370,7 +376,7 @@ impl DmpMessageHandler for () { } /// The aggregate XCMP message format. -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum XcmpMessageFormat { /// Encoded `VersionedXcm` messages, all concatenated. ConcatenatedVersionedXcm, diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 9b106e864cf7..4b2065d4cb6b 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -6,6 +6,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.130", optional = true, features = ["derive"] } +scale-info = { version = "1.0", default-features = false, features = ["bit-vec", "derive"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] } primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -34,6 +35,7 @@ default = ["std"] std = [ "application-crypto/std", "parity-scale-codec/std", + "scale-info/std", "primitives/std", "inherents/std", "trie/std", diff --git a/primitives/src/v0.rs b/primitives/src/v0.rs index 1cbeb916d482..7e15a0b87308 100644 --- a/primitives/src/v0.rs +++ b/primitives/src/v0.rs @@ -23,6 +23,7 @@ use bitvec::vec::BitVec; use parity_scale_codec::{Decode, Encode}; #[cfg(feature = "std")] use parity_util_mem::{MallocSizeOf, MallocSizeOfOps}; +use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; @@ -106,7 +107,7 @@ impl MallocSizeOf for ValidatorId { } /// Index of the validator is used as a lightweight replacement of the `ValidatorId` when appropriate. -#[derive(Eq, Ord, PartialEq, PartialOrd, Copy, Clone, Encode, Decode)] +#[derive(Eq, Ord, PartialEq, PartialOrd, Copy, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug, Hash, MallocSizeOf))] pub struct ValidatorIndex(pub u32); @@ -139,7 +140,7 @@ impl MallocSizeOf for ValidatorSignature { } /// Retriability for a given active para. -#[derive(Clone, Eq, PartialEq, Encode, Decode)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug))] pub enum Retriable { /// Ineligible for retry. This means it's either a parachain that is always scheduled anyway or @@ -205,7 +206,7 @@ impl SwapAux for () { } /// Identifier for a chain, either one of a number of parachains or the relay chain. -#[derive(Copy, Clone, PartialEq, Encode, Decode)] +#[derive(Copy, Clone, PartialEq, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug))] pub enum Chain { /// The relay chain. @@ -215,7 +216,7 @@ pub enum Chain { } /// The duty roster specifying what jobs each validator must do. -#[derive(Clone, PartialEq, Encode, Decode)] +#[derive(Clone, PartialEq, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Default, Debug))] pub struct DutyRoster { /// Lookup from validator index to chain on which that validator has a duty to validate. @@ -226,7 +227,7 @@ pub struct DutyRoster { /// to fully validate the candidate. /// /// These are global parameters that apply to all parachain candidates in a block. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct GlobalValidationData { /// The maximum code size permitted, in bytes. @@ -239,7 +240,7 @@ pub struct GlobalValidationData { /// Extra data that is needed along with the other fields in a `CandidateReceipt` /// to fully validate the candidate. These fields are parachain-specific. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct LocalValidationData { /// The parent head-data. @@ -261,7 +262,7 @@ pub struct LocalValidationData { } /// Commitments made in a `CandidateReceipt`. Many of these are outputs of validation. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct CandidateCommitments { /// Fees paid from the chain to the relay chain validators. @@ -310,7 +311,7 @@ fn check_collator_signature>( } /// All data pertaining to the execution of a parachain candidate. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct CandidateReceipt { /// The ID of the parachain this is a candidate for. @@ -395,7 +396,7 @@ impl Ord for CandidateReceipt { /// All the data which is omitted in an `AbridgedCandidateReceipt`, but that /// is necessary for validation of the parachain candidate. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct OmittedValidationData { /// The global validation schedule. @@ -409,7 +410,7 @@ pub struct OmittedValidationData { /// Much info in a candidate-receipt is duplicated from the relay-chain state. /// When submitting to the relay-chain, this data should be omitted as it can /// be re-generated from relay-chain state. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct AbridgedCandidateReceipt { /// The ID of the parachain this is a candidate for. @@ -544,7 +545,7 @@ impl Ord for AbridgedCandidateReceipt { } /// A unique descriptor of the candidate receipt, in a lightweight format. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct CandidateDescriptor { /// The ID of the para this is a candidate for. @@ -564,7 +565,7 @@ pub struct CandidateDescriptor { } /// A collation sent by a collator. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct CollationInfo { /// The ID of the parachain this is a candidate for. @@ -619,7 +620,7 @@ impl CollationInfo { /// A full collation. #[derive(PartialEq, Eq, Clone)] -#[cfg_attr(feature = "std", derive(Debug, Encode, Decode))] +#[cfg_attr(feature = "std", derive(Debug, Encode, Decode, TypeInfo))] pub struct Collation { /// Candidate receipt itself. pub info: CollationInfo, @@ -629,7 +630,7 @@ pub struct Collation { /// A Proof-of-Validation block. #[derive(PartialEq, Eq, Clone)] -#[cfg_attr(feature = "std", derive(Debug, Encode, Decode))] +#[cfg_attr(feature = "std", derive(Debug, Encode, Decode, TypeInfo))] pub struct PoVBlock { /// Block data. pub block_data: BlockData, @@ -645,7 +646,7 @@ impl PoVBlock { /// The data that is kept available about a particular parachain block. #[derive(PartialEq, Eq, Clone)] -#[cfg_attr(feature = "std", derive(Debug, Encode, Decode))] +#[cfg_attr(feature = "std", derive(Debug, Encode, Decode, TypeInfo))] pub struct AvailableData { /// The PoV block. pub pov_block: PoVBlock, @@ -677,7 +678,7 @@ impl CompactStatement { } // Inner helper for codec on `CompactStatement`. -#[derive(Encode, Decode)] +#[derive(Encode, Decode, TypeInfo)] enum CompactStatementInner { #[codec(index = 1)] Seconded(CandidateHash), @@ -733,7 +734,7 @@ impl CompactStatement { /// An either implicit or explicit attestation to the validity of a parachain /// candidate. -#[derive(Clone, Eq, PartialEq, Decode, Encode, RuntimeDebug)] +#[derive(Clone, Eq, PartialEq, Decode, Encode, RuntimeDebug, TypeInfo)] pub enum ValidityAttestation { /// Implicit validity attestation by issuing. /// This corresponds to issuance of a `Candidate` statement. @@ -804,7 +805,7 @@ impl AttestedCandidate { } /// A fee schedule for messages. This is a linear function in the number of bytes of a message. -#[derive(PartialEq, Eq, PartialOrd, Hash, Default, Clone, Copy, Encode, Decode)] +#[derive(PartialEq, Eq, PartialOrd, Hash, Default, Clone, Copy, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))] pub struct FeeSchedule { /// The base fee charged for all messages. diff --git a/primitives/src/v1/mod.rs b/primitives/src/v1/mod.rs index c261bf9b69e4..e32fb68f79db 100644 --- a/primitives/src/v1/mod.rs +++ b/primitives/src/v1/mod.rs @@ -18,6 +18,7 @@ use bitvec::vec::BitVec; use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; use sp_std::{collections::btree_map::BTreeMap, prelude::*}; use application_crypto::KeyTypeId; @@ -319,7 +320,7 @@ fn check_collator_signature>( } /// A unique descriptor of the candidate receipt. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default, Hash, MallocSizeOf))] pub struct CandidateDescriptor { /// The ID of the para this is a candidate for. @@ -361,7 +362,7 @@ impl> CandidateDescriptor { } /// A candidate-receipt. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default, MallocSizeOf))] pub struct CandidateReceipt { /// The descriptor of the candidate. @@ -386,7 +387,7 @@ impl CandidateReceipt { } /// All data pertaining to the execution of a para candidate. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default))] pub struct FullCandidateReceipt { /// The inner candidate receipt. @@ -399,7 +400,7 @@ pub struct FullCandidateReceipt { } /// A candidate-receipt with commitments directly included. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default, Hash, MallocSizeOf))] pub struct CommittedCandidateReceipt { /// The descriptor of the candidate. @@ -480,7 +481,7 @@ impl Ord for CommittedCandidateReceipt { /// /// The `PersistedValidationData` should be relatively lightweight primarily because it is constructed /// during inclusion for each candidate and therefore lies on the critical path of inclusion. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default, MallocSizeOf))] pub struct PersistedValidationData { /// The parent head-data. @@ -501,7 +502,7 @@ impl PersistedValidationData { } /// Commitments made in a `CandidateReceipt`. Many of these are outputs of validation. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Default, Hash, MallocSizeOf))] pub struct CandidateCommitments { /// Messages destined to be interpreted by the Relay chain itself. @@ -526,7 +527,7 @@ impl CandidateCommitments { } /// A bitfield concerning availability of backed candidates. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct AvailabilityBitfield(pub BitVec); impl From> for AvailabilityBitfield { @@ -549,7 +550,7 @@ pub type SignedAvailabilityBitfields = Vec; pub type UncheckedSignedAvailabilityBitfields = Vec; /// A backed (or backable, depending on context) candidate. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(Default))] pub struct BackedCandidate { /// The candidate referred to. @@ -637,7 +638,7 @@ pub fn check_candidate_backing + Clone + Encode>( } /// The unique (during session) index of a core. -#[derive(Encode, Decode, Default, PartialOrd, Ord, Eq, PartialEq, Clone, Copy)] +#[derive(Encode, Decode, Default, PartialOrd, Ord, Eq, PartialEq, Clone, Copy, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, Hash, MallocSizeOf))] pub struct CoreIndex(pub u32); @@ -648,7 +649,7 @@ impl From for CoreIndex { } /// The unique (during session) index of a validator group. -#[derive(Encode, Decode, Default, Clone, Copy, Debug, PartialEq, Eq)] +#[derive(Encode, Decode, Default, Clone, Copy, Debug, PartialEq, Eq, TypeInfo)] #[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] pub struct GroupIndex(pub u32); @@ -659,12 +660,12 @@ impl From for GroupIndex { } /// A claim on authoring the next block for a given parathread. -#[derive(Clone, Encode, Decode, Default)] +#[derive(Clone, Encode, Decode, Default, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Debug))] pub struct ParathreadClaim(pub Id, pub CollatorId); /// An entry tracking a claim to ensure it does not pass the maximum number of retries. -#[derive(Clone, Encode, Decode, Default)] +#[derive(Clone, Encode, Decode, Default, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Debug))] pub struct ParathreadEntry { /// The claim. @@ -674,7 +675,7 @@ pub struct ParathreadEntry { } /// What is occupying a specific availability core. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Debug))] pub enum CoreOccupied { /// A parathread. @@ -684,7 +685,7 @@ pub enum CoreOccupied { } /// A helper data-type for tracking validator-group rotations. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Debug, MallocSizeOf))] pub struct GroupRotationInfo { /// The block number where the session started. @@ -772,7 +773,7 @@ impl GroupRotationInfo { } /// Information about a core which is currently occupied. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, PartialEq, MallocSizeOf))] pub struct OccupiedCore { // NOTE: this has no ParaId as it can be deduced from the candidate descriptor. @@ -808,7 +809,7 @@ impl OccupiedCore { } /// Information about a core which is currently occupied. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, PartialEq, Default, MallocSizeOf))] pub struct ScheduledCore { /// The ID of a para scheduled. @@ -818,7 +819,7 @@ pub struct ScheduledCore { } /// The state of a particular availability core. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug, PartialEq, MallocSizeOf))] pub enum CoreState { /// The core is currently occupied. @@ -854,7 +855,7 @@ impl CoreState { } /// An assumption being made about the state of an occupied core. -#[derive(Clone, Copy, Encode, Decode)] +#[derive(Clone, Copy, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Eq, Hash, Debug))] pub enum OccupiedCoreAssumption { /// The candidate occupying the core was made available and included to free the core. @@ -869,7 +870,7 @@ pub enum OccupiedCoreAssumption { } /// An even concerning a candidate. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Debug, MallocSizeOf))] pub enum CandidateEvent { /// This candidate receipt was backed in the most recent block. @@ -888,7 +889,7 @@ pub enum CandidateEvent { } /// Information about validator sets of a session. -#[derive(Clone, Encode, Decode, RuntimeDebug)] +#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Default, MallocSizeOf))] pub struct SessionInfo { /// Validators in canonical ordering. @@ -1033,7 +1034,7 @@ impl From for u8 { /// Abridged version of `HostConfiguration` (from the `Configuration` parachains host runtime module) /// meant to be used by a parachain or PDK such as cumulus. -#[derive(Clone, Encode, Decode, RuntimeDebug)] +#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct AbridgedHostConfiguration { /// The maximum validation code size, in bytes. @@ -1066,7 +1067,7 @@ pub struct AbridgedHostConfiguration { /// Abridged version of `HrmpChannel` (from the `Hrmp` parachains host runtime module) meant to be /// used by a parachain or PDK such as cumulus. -#[derive(Clone, Encode, Decode, RuntimeDebug)] +#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct AbridgedHrmpChannel { /// The maximum number of messages that can be pending in the channel at once. @@ -1092,7 +1093,7 @@ pub struct AbridgedHrmpChannel { } /// A possible upgrade restriction that prevents a parachain from performing an upgrade. -#[derive(Encode, Decode, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] pub enum UpgradeRestriction { /// There is an upgrade restriction and there are no details about its specifics nor how long /// it could last. @@ -1105,7 +1106,7 @@ pub enum UpgradeRestriction { /// /// This data type appears in the last step of the upgrade process. After the parachain observes it /// and reacts to it the upgrade process concludes. -#[derive(Encode, Decode, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] pub enum UpgradeGoAhead { /// Abort the upgrade process. There is something wrong with the validation code previously /// submitted by the parachain. This variant can also be used to prevent upgrades by the governance @@ -1173,7 +1174,7 @@ impl From for runtime_primitives::DigestItem { /// A statement about a candidate, to be used within the dispute resolution process. /// /// Statements are either in favor of the candidate's validity or against it. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] pub enum DisputeStatement { /// A valid statement, of the given kind. #[codec(index = 0)] @@ -1242,7 +1243,7 @@ impl DisputeStatement { } /// Different kinds of statements of validity on a candidate. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] pub enum ValidDisputeStatementKind { /// An explicit statement issued as part of a dispute. #[codec(index = 0)] @@ -1259,7 +1260,7 @@ pub enum ValidDisputeStatementKind { } /// Different kinds of statements of invalidity on a candidate. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] pub enum InvalidDisputeStatementKind { /// An explicit statement issued as part of a dispute. #[codec(index = 0)] @@ -1287,7 +1288,7 @@ impl ExplicitDisputeStatement { } /// A set of statements about a specific candidate. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] pub struct DisputeStatementSet { /// The candidate referenced by this set. pub candidate_hash: CandidateHash, @@ -1301,7 +1302,7 @@ pub struct DisputeStatementSet { pub type MultiDisputeStatementSet = Vec; /// The entire state of a dispute. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq)] +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, TypeInfo)] pub struct DisputeState { /// A bitfield indicating all validators for the candidate. pub validators_for: BitVec, // one bit per validator. @@ -1314,7 +1315,7 @@ pub struct DisputeState { } /// Parachains inherent-data passed into the runtime by a block author -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] pub struct InherentData { /// Signed bitfields by validators about availability. pub bitfields: UncheckedSignedAvailabilityBitfields, diff --git a/primitives/src/v1/signed.rs b/primitives/src/v1/signed.rs index 66908216ebb3..612cc1516895 100644 --- a/primitives/src/v1/signed.rs +++ b/primitives/src/v1/signed.rs @@ -15,6 +15,7 @@ // along with Polkadot. If not, see . use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; #[cfg(feature = "std")] use application_crypto::AppKey; @@ -41,7 +42,7 @@ use crate::v0::{SigningContext, ValidatorId, ValidatorIndex, ValidatorSignature} pub struct Signed(UncheckedSigned); /// Unchecked signed data, can be converted to `Signed` by checking the signature. -#[derive(Clone, PartialEq, Eq, RuntimeDebug, Encode, Decode)] +#[derive(Clone, PartialEq, Eq, RuntimeDebug, Encode, Decode, TypeInfo)] pub struct UncheckedSigned { /// The payload is part of the signed data. The rest is the signing context, /// which is known both at signing and at validation. diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 9e3255969ecb..41e8d8fea71d 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -10,10 +10,12 @@ bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } log = { version = "0.4.13", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0.130", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" +beefy-primitives = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -63,6 +65,7 @@ no_std = [] std = [ "bitvec/std", "parity-scale-codec/std", + "scale-info/std", "log/std", "rustc-hex/std", "serde_derive", diff --git a/runtime/common/src/auctions.rs b/runtime/common/src/auctions.rs index caa609e1aff5..a3866fed2ba2 100644 --- a/runtime/common/src/auctions.rs +++ b/runtime/common/src/auctions.rs @@ -118,12 +118,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata( - T::AccountId = "AccountId", - T::BlockNumber = "BlockNumber", - LeasePeriodOf = "LeasePeriod", - BalanceOf = "Balance", - )] pub enum Event { /// An auction started. Provides its index and the block number where it will begin to /// close and the first lease period of the quadruplet that is auctioned. diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index f2be5a954b3c..a89bd0b4d03a 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -24,6 +24,7 @@ use frame_support::{ pub use pallet::*; use parity_scale_codec::{Decode, Encode}; use primitives::v1::ValidityError; +use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{self, Deserialize, Deserializer, Serialize, Serializer}; use sp_io::{crypto::secp256k1_ecdsa_recover, hashing::keccak_256}; @@ -71,7 +72,7 @@ impl WeightInfo for TestWeightInfo { } /// The kind of statement an account needs to make for a claim to be valid. -#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum StatementKind { /// Statement required to be made by non-SAFT holders. @@ -105,7 +106,7 @@ impl Default for StatementKind { /// An Ethereum address (i.e. 20 bytes, used to represent an Ethereum account). /// /// This gets serialized to the 0x-prefixed hex representation. -#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Default, RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, Default, RuntimeDebug, TypeInfo)] pub struct EthereumAddress([u8; 20]); #[cfg(feature = "std")] @@ -141,7 +142,7 @@ impl<'de> Deserialize<'de> for EthereumAddress { } } -#[derive(Encode, Decode, Clone)] +#[derive(Encode, Decode, Clone, TypeInfo)] pub struct EcdsaSignature(pub [u8; 65]); impl PartialEq for EcdsaSignature { @@ -180,7 +181,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata(T::AccountId = "AccountId", BalanceOf = "Balance")] pub enum Event { /// Someone claimed some DOTs. `[who, ethereum_address, amount]` Claimed(T::AccountId, EthereumAddress, BalanceOf), @@ -473,14 +473,14 @@ pub mod pallet { // // The weight of this logic is included in the `claim` dispatchable. // - Call::claim(account, ethereum_signature) => { + Call::claim { dest: account, ethereum_signature } => { let data = account.using_encoded(to_ascii_hex); (Self::eth_recover(ðereum_signature, &data, &[][..]), None) }, // // The weight of this logic is included in the `claim_attest` dispatchable. // - Call::claim_attest(account, ethereum_signature, statement) => { + Call::claim_attest { dest: account, ethereum_signature, statement } => { let data = account.using_encoded(to_ascii_hex); ( Self::eth_recover(ðereum_signature, &data, &statement), @@ -588,7 +588,8 @@ impl Pallet { /// Validate `attest` calls prior to execution. Needed to avoid a DoS attack since they are /// otherwise free to place on chain. -#[derive(Encode, Decode, Clone, Eq, PartialEq)] +#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)] +#[scale_info(skip_type_params(T))] pub struct PrevalidateAttests(sp_std::marker::PhantomData) where ::Call: IsSubType>; @@ -643,7 +644,7 @@ where _len: usize, ) -> TransactionValidity { if let Some(local_call) = call.is_sub_type() { - if let Call::attest(attested_statement) = local_call { + if let Call::attest { statement: attested_statement } = local_call { let signer = Preclaims::::get(who) .ok_or(InvalidTransaction::Custom(ValidityError::SignerHasNoClaim.into()))?; if let Some(s) = Signing::::get(signer) { @@ -1035,7 +1036,9 @@ mod tests { fn valid_attest_transactions_are_free() { new_test_ext().execute_with(|| { let p = PrevalidateAttests::::new(); - let c = Call::Claims(ClaimsCall::attest(StatementKind::Saft.to_text().to_vec())); + let c = Call::Claims(ClaimsCall::attest { + statement: StatementKind::Saft.to_text().to_vec(), + }); let di = c.get_dispatch_info(); assert_eq!(di.pays_fee, Pays::No); let r = p.validate(&42, &c, &di, 20); @@ -1047,11 +1050,15 @@ mod tests { fn invalid_attest_transactions_are_recognized() { new_test_ext().execute_with(|| { let p = PrevalidateAttests::::new(); - let c = Call::Claims(ClaimsCall::attest(StatementKind::Regular.to_text().to_vec())); + let c = Call::Claims(ClaimsCall::attest { + statement: StatementKind::Regular.to_text().to_vec(), + }); let di = c.get_dispatch_info(); let r = p.validate(&42, &c, &di, 20); assert!(r.is_err()); - let c = Call::Claims(ClaimsCall::attest(StatementKind::Saft.to_text().to_vec())); + let c = Call::Claims(ClaimsCall::attest { + statement: StatementKind::Saft.to_text().to_vec(), + }); let di = c.get_dispatch_info(); let r = p.validate(&69, &c, &di, 20); assert!(r.is_err()); @@ -1282,7 +1289,10 @@ mod tests { assert_eq!( >::validate_unsigned( source, - &ClaimsCall::claim(1, sig::(&alice(), &1u64.encode(), &[][..])) + &ClaimsCall::claim { + dest: 1, + ethereum_signature: sig::(&alice(), &1u64.encode(), &[][..]) + } ), Ok(ValidTransaction { priority: 100, @@ -1295,19 +1305,26 @@ mod tests { assert_eq!( >::validate_unsigned( source, - &ClaimsCall::claim(0, EcdsaSignature([0; 65])) + &ClaimsCall::claim { dest: 0, ethereum_signature: EcdsaSignature([0; 65]) } ), InvalidTransaction::Custom(ValidityError::InvalidEthereumSignature.into()).into(), ); assert_eq!( >::validate_unsigned( source, - &ClaimsCall::claim(1, sig::(&bob(), &1u64.encode(), &[][..])) + &ClaimsCall::claim { + dest: 1, + ethereum_signature: sig::(&bob(), &1u64.encode(), &[][..]) + } ), InvalidTransaction::Custom(ValidityError::SignerHasNoClaim.into()).into(), ); let s = sig::(&dave(), &1u64.encode(), StatementKind::Regular.to_text()); - let call = ClaimsCall::claim_attest(1, s, StatementKind::Regular.to_text().to_vec()); + let call = ClaimsCall::claim_attest { + dest: 1, + ethereum_signature: s, + statement: StatementKind::Regular.to_text().to_vec(), + }; assert_eq!( >::validate_unsigned(source, &call), Ok(ValidTransaction { @@ -1321,31 +1338,43 @@ mod tests { assert_eq!( >::validate_unsigned( source, - &ClaimsCall::claim_attest( - 1, - EcdsaSignature([0; 65]), - StatementKind::Regular.to_text().to_vec() - ) + &ClaimsCall::claim_attest { + dest: 1, + ethereum_signature: EcdsaSignature([0; 65]), + statement: StatementKind::Regular.to_text().to_vec() + } ), InvalidTransaction::Custom(ValidityError::InvalidEthereumSignature.into()).into(), ); let s = sig::(&bob(), &1u64.encode(), StatementKind::Regular.to_text()); - let call = ClaimsCall::claim_attest(1, s, StatementKind::Regular.to_text().to_vec()); + let call = ClaimsCall::claim_attest { + dest: 1, + ethereum_signature: s, + statement: StatementKind::Regular.to_text().to_vec(), + }; assert_eq!( >::validate_unsigned(source, &call), InvalidTransaction::Custom(ValidityError::SignerHasNoClaim.into()).into(), ); let s = sig::(&dave(), &1u64.encode(), StatementKind::Saft.to_text()); - let call = ClaimsCall::claim_attest(1, s, StatementKind::Regular.to_text().to_vec()); + let call = ClaimsCall::claim_attest { + dest: 1, + ethereum_signature: s, + statement: StatementKind::Regular.to_text().to_vec(), + }; assert_eq!( >::validate_unsigned(source, &call), InvalidTransaction::Custom(ValidityError::SignerHasNoClaim.into()).into(), ); let s = sig::(&dave(), &1u64.encode(), StatementKind::Saft.to_text()); - let call = ClaimsCall::claim_attest(1, s, StatementKind::Saft.to_text().to_vec()); + let call = ClaimsCall::claim_attest { + dest: 1, + ethereum_signature: s, + statement: StatementKind::Saft.to_text().to_vec(), + }; assert_eq!( >::validate_unsigned(source, &call), InvalidTransaction::Custom(ValidityError::InvalidStatement.into()).into(), @@ -1414,7 +1443,7 @@ mod benchmarking { super::Pallet::::mint_claim(RawOrigin::Root.into(), eth_address, VALUE.into(), vesting, None)?; assert_eq!(Claims::::get(eth_address), Some(VALUE.into())); let source = sp_runtime::transaction_validity::TransactionSource::External; - let call = Call::::claim(account.clone(), signature.clone()); + let call = Call::::claim { dest: account.clone(), ethereum_signature: signature.clone() }; }: { super::Pallet::::validate_unsigned(source, &call).map_err(|e| -> &'static str { e.into() })?; super::Pallet::::claim(RawOrigin::None.into(), account, signature)?; @@ -1459,7 +1488,7 @@ mod benchmarking { let signature = sig::(&secret_key, &account.encode(), statement.to_text()); super::Pallet::::mint_claim(RawOrigin::Root.into(), eth_address, VALUE.into(), vesting, Some(statement))?; assert_eq!(Claims::::get(eth_address), Some(VALUE.into())); - let call = Call::::claim_attest(account.clone(), signature.clone(), StatementKind::Regular.to_text().to_vec()); + let call = Call::::claim_attest { dest: account.clone(), ethereum_signature: signature.clone(), statement: StatementKind::Regular.to_text().to_vec() }; let source = sp_runtime::transaction_validity::TransactionSource::External; }: { super::Pallet::::validate_unsigned(source, &call).map_err(|e| -> &'static str { e.into() })?; @@ -1489,10 +1518,10 @@ mod benchmarking { Preclaims::::insert(&account, eth_address); assert_eq!(Claims::::get(eth_address), Some(VALUE.into())); - let call = super::Call::attest(StatementKind::Regular.to_text().to_vec()); + let call = super::Call::attest { statement: StatementKind::Regular.to_text().to_vec() }; // We have to copy the validate statement here because of trait issues... :( let validate = |who: &T::AccountId, call: &super::Call| -> DispatchResult { - if let Call::attest(attested_statement) = call { + if let Call::attest{ statement: attested_statement } = call { let signer = Preclaims::::get(who).ok_or("signer has no claim")?; if let Some(s) = Signing::::get(signer) { ensure!(&attested_statement[..] == s.to_text(), "invalid statement"); diff --git a/runtime/common/src/crowdloan.rs b/runtime/common/src/crowdloan.rs index e0dc0d4c8395..a97825d445c2 100644 --- a/runtime/common/src/crowdloan.rs +++ b/runtime/common/src/crowdloan.rs @@ -63,6 +63,7 @@ use frame_support::{ pub use pallet::*; use parity_scale_codec::{Decode, Encode}; use primitives::v1::Id as ParaId; +use scale_info::TypeInfo; use sp_runtime::{ traits::{ AccountIdConversion, CheckedAdd, Hash, IdentifyAccount, One, Saturating, Verify, Zero, @@ -124,7 +125,7 @@ impl WeightInfo for TestWeightInfo { } } -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub enum LastContribution { Never, PreEnding(u32), @@ -133,7 +134,7 @@ pub enum LastContribution { /// Information on a funding effort for a pre-existing parachain. We assume that the parachain ID /// is known as it's used for the key of the storage item for which this is the value (`Funds`). -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] #[codec(dumb_trait_bound)] pub struct FundInfo { /// The owning account who placed the deposit. @@ -242,7 +243,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata(T::AccountId = "AccountId", BalanceOf = "Balance")] pub enum Event { /// Create a new crowdloaning campaign. `[fund_index]` Created(ParaId), diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index 3c9e80993205..5f444bcffc0f 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -35,12 +35,13 @@ use sp_std::{prelude::*, result}; use crate::traits::{OnSwap, Registrar}; pub use pallet::*; use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; use sp_runtime::{ traits::{CheckedSub, Saturating}, RuntimeDebug, }; -#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, RuntimeDebug, TypeInfo)] pub struct ParaInfo { /// The account that has placed a deposit for registering this para. pub(crate) manager: Account, @@ -124,7 +125,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata(T::AccountId = "AccountId")] pub enum Event { Registered(ParaId, T::AccountId), Deregistered(ParaId), diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index f2b2a7a299b8..5f86bf4226d5 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -23,6 +23,7 @@ use frame_support::{ use frame_system::pallet_prelude::*; pub use pallet::*; use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; use sp_core::sr25519; use sp_runtime::{ traits::{CheckedAdd, Saturating, Verify, Zero}, @@ -34,7 +35,7 @@ type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; /// The kind of a statement an account needs to make for a claim to be valid. -#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub enum AccountValidity { /// Account is not valid. Invalid, @@ -70,7 +71,7 @@ impl AccountValidity { } /// All information about an account regarding the purchase of DOTs. -#[derive(Encode, Decode, Default, Clone, Eq, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Default, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub struct AccountStatus { /// The current validity status of the user. Will denote if the user has passed KYC, /// how much they are able to purchase, and when their purchase process has completed. @@ -129,11 +130,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata( - T::AccountId = "AccountId", - T::BlockNumber = "BlockNumber", - BalanceOf = "Balance", - )] pub enum Event { /// A [new] account was created. AccountCreated(T::AccountId), @@ -1071,7 +1067,7 @@ mod tests { ); // Vesting lock is removed in whole on block 101 (100 blocks after block 1) System::set_block_number(100); - let vest_call = Call::Vesting(pallet_vesting::Call::::vest()); + let vest_call = Call::Vesting(pallet_vesting::Call::::vest {}); assert_ok!(vest_call.clone().dispatch(Origin::signed(alice()))); assert_ok!(vest_call.clone().dispatch(Origin::signed(bob()))); assert_eq!(::VestingSchedule::vesting_balance(&alice()), Some(45)); diff --git a/runtime/common/src/slots.rs b/runtime/common/src/slots.rs index 0dac47c71136..8fe4a77f187e 100644 --- a/runtime/common/src/slots.rs +++ b/runtime/common/src/slots.rs @@ -110,11 +110,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata( - T::AccountId = "AccountId", - LeasePeriodOf = "LeasePeriod", - BalanceOf = "Balance", - )] pub enum Event { /// A new `[lease_period]` is beginning. NewLeasePeriod(LeasePeriodOf), diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 43284abb6425..26858f68d4ee 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -8,6 +8,7 @@ build = "build.rs" [dependencies] bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } log = { version = "0.4.14", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.130", default-features = false } @@ -109,6 +110,7 @@ std = [ "primitives/std", "rustc-hex/std", "parity-scale-codec/std", + "scale-info/std", "inherents/std", "sp-core/std", "sp-api/std", diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 3ad9a4fa1242..fcb92a44f894 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -141,7 +141,7 @@ pub fn native_version() -> NativeVersion { pub struct BaseFilter; impl Contains for BaseFilter { fn contains(c: &Call) -> bool { - !matches!(c, Call::Registrar(paras_registrar::Call::swap(..))) + !matches!(c, Call::Registrar(paras_registrar::Call::swap { .. })) } } @@ -972,7 +972,17 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen, + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, )] pub enum ProxyType { Any, @@ -997,9 +1007,9 @@ impl InstanceFilter for ProxyType { Call::System(..) | Call::Babe(..) | Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim(..)) | - Call::Indices(pallet_indices::Call::free(..)) | - Call::Indices(pallet_indices::Call::freeze(..)) | + Call::Indices(pallet_indices::Call::claim {..}) | + Call::Indices(pallet_indices::Call::free {..}) | + Call::Indices(pallet_indices::Call::freeze {..}) | // Specifically omitting Indices `transfer`, `force_transfer` // Specifically omitting the entire Balances pallet Call::Authorship(..) | @@ -1019,24 +1029,24 @@ impl InstanceFilter for ProxyType { Call::Utility(..) | Call::Identity(..) | Call::Society(..) | - Call::Recovery(pallet_recovery::Call::as_recovered(..)) | - Call::Recovery(pallet_recovery::Call::vouch_recovery(..)) | - Call::Recovery(pallet_recovery::Call::claim_recovery(..)) | - Call::Recovery(pallet_recovery::Call::close_recovery(..)) | - Call::Recovery(pallet_recovery::Call::remove_recovery(..)) | - Call::Recovery(pallet_recovery::Call::cancel_recovered(..)) | + Call::Recovery(pallet_recovery::Call::as_recovered {..}) | + Call::Recovery(pallet_recovery::Call::vouch_recovery {..}) | + Call::Recovery(pallet_recovery::Call::claim_recovery {..}) | + Call::Recovery(pallet_recovery::Call::close_recovery {..}) | + Call::Recovery(pallet_recovery::Call::remove_recovery {..}) | + Call::Recovery(pallet_recovery::Call::cancel_recovered {..}) | // Specifically omitting Recovery `create_recovery`, `initiate_recovery` - Call::Vesting(pallet_vesting::Call::vest(..)) | - Call::Vesting(pallet_vesting::Call::vest_other(..)) | + Call::Vesting(pallet_vesting::Call::vest {..}) | + Call::Vesting(pallet_vesting::Call::vest_other {..}) | // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` Call::Scheduler(..) | Call::Proxy(..) | Call::Multisig(..) | Call::Gilt(..) | - Call::Registrar(paras_registrar::Call::register(..)) | - Call::Registrar(paras_registrar::Call::deregister(..)) | + Call::Registrar(paras_registrar::Call::register {..}) | + Call::Registrar(paras_registrar::Call::deregister {..}) | // Specifically omitting Registrar `swap` - Call::Registrar(paras_registrar::Call::reserve(..)) | + Call::Registrar(paras_registrar::Call::reserve {..}) | Call::Crowdloan(..) | Call::Slots(..) | Call::Auctions(..) // Specifically omitting the entire XCM Pallet @@ -1054,10 +1064,10 @@ impl InstanceFilter for ProxyType { }, ProxyType::IdentityJudgement => matches!( c, - Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..) + Call::Identity(pallet_identity::Call::provide_judgement { .. }) | Call::Utility(..) ), ProxyType::CancelProxy => { - matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))) + matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, ProxyType::Auction => matches!( c, @@ -1646,7 +1656,7 @@ sp_api::impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } diff --git a/runtime/kusama/src/tests.rs b/runtime/kusama/src/tests.rs index 103987e8b0fd..d2c1c725e3a9 100644 --- a/runtime/kusama/src/tests.rs +++ b/runtime/kusama/src/tests.rs @@ -79,10 +79,10 @@ fn block_cost() { #[ignore] fn transfer_cost_min_multiplier() { let min_multiplier = runtime_common::MinimumMultiplier::get(); - let call = >::transfer_keep_alive( - Default::default(), - Default::default(), - ); + let call = pallet_balances::Call::::transfer_keep_alive { + dest: Default::default(), + value: Default::default(), + }; let info = call.get_dispatch_info(); // convert to outer call. let call = Call::Balances(call); diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index 71c6874428cf..8e3b41d95e6b 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -9,7 +9,8 @@ bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } log = { version = "0.4.14", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.130", features = ["derive"], optional = true } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.130", features = [ "derive" ], optional = true } derive_more = "0.99.14" bitflags = "1.3.2" @@ -56,6 +57,7 @@ std = [ "bitvec/std", "parity-scale-codec/std", "rustc-hex/std", + "scale-info/std", "serde", "primitives/std", "inherents/std", diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index f2de0db6aa93..64aaac6b3487 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -33,7 +33,7 @@ pub mod migration; const LOG_TARGET: &str = "runtime::configuration"; /// All configuration of the runtime with respect to parachains and parathreads. -#[derive(Clone, Encode, Decode, PartialEq, sp_core::RuntimeDebug)] +#[derive(Clone, Encode, Decode, PartialEq, sp_core::RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] pub struct HostConfiguration { // NOTE: This structure is used by parachains via merkle proofs. Therefore, this struct requires diff --git a/runtime/parachains/src/disputes.rs b/runtime/parachains/src/disputes.rs index 43388c64b01c..b3bd5a3ed68d 100644 --- a/runtime/parachains/src/disputes.rs +++ b/runtime/parachains/src/disputes.rs @@ -30,6 +30,7 @@ use primitives::v1::{ InvalidDisputeStatementKind, MultiDisputeStatementSet, SessionIndex, SigningContext, ValidDisputeStatementKind, ValidatorId, ValidatorIndex, ValidatorSignature, }; +use scale_info::TypeInfo; use sp_runtime::{ traits::{AppVerify, One, Saturating, Zero}, DispatchError, RuntimeDebug, SaturatedConversion, @@ -37,14 +38,14 @@ use sp_runtime::{ use sp_std::{collections::btree_set::BTreeSet, prelude::*}; /// Whether the dispute is local or remote. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub enum DisputeLocation { Local, Remote, } /// The result of a dispute, whether the candidate is deemed valid (for) or invalid (against). -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub enum DisputeResult { Valid, Invalid, diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index bb200900d5b5..f087dfd3a405 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -25,6 +25,7 @@ use primitives::v1::{ Balance, Hash, HrmpChannelId, Id as ParaId, InboundHrmpMessage, OutboundHrmpMessage, SessionIndex, }; +use scale_info::TypeInfo; use sp_runtime::traits::{AccountIdConversion, BlakeTwo256, Hash as HashT, UniqueSaturatedInto}; use sp_std::{ collections::{btree_map::BTreeMap, btree_set::BTreeSet}, @@ -35,7 +36,7 @@ use sp_std::{ pub use pallet::*; /// A description of a request to open an HRMP channel. -#[derive(Encode, Decode)] +#[derive(Encode, Decode, TypeInfo)] pub struct HrmpOpenChannelRequest { /// Indicates if this request was confirmed by the recipient. pub confirmed: bool, @@ -53,7 +54,7 @@ pub struct HrmpOpenChannelRequest { } /// A metadata of an HRMP channel. -#[derive(Encode, Decode)] +#[derive(Encode, Decode, TypeInfo)] #[cfg_attr(test, derive(Debug))] pub struct HrmpChannel { // NOTE: This structure is used by parachains via merkle proofs. Therefore, this struct requires diff --git a/runtime/parachains/src/inclusion.rs b/runtime/parachains/src/inclusion.rs index 4d92e90df734..a8702c873c2f 100644 --- a/runtime/parachains/src/inclusion.rs +++ b/runtime/parachains/src/inclusion.rs @@ -28,6 +28,7 @@ use primitives::v1::{ CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, GroupIndex, HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, ValidatorIndex, }; +use scale_info::TypeInfo; use sp_runtime::{ traits::{One, Saturating}, DispatchError, @@ -43,7 +44,7 @@ pub use pallet::*; /// /// The bitfield's signature should be checked at the point of submission. Afterwards it can be /// dropped. -#[derive(Encode, Decode)] +#[derive(Encode, Decode, TypeInfo)] #[cfg_attr(test, derive(Debug))] pub struct AvailabilityBitfieldRecord { bitfield: AvailabilityBitfield, // one bit per core. @@ -51,7 +52,7 @@ pub struct AvailabilityBitfieldRecord { } /// A backed candidate pending availability. -#[derive(Encode, Decode, PartialEq)] +#[derive(Encode, Decode, PartialEq, TypeInfo)] #[cfg_attr(test, derive(Debug))] pub struct CandidatePendingAvailability { /// The availability core this is assigned to. @@ -134,7 +135,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata(T::Hash = "Hash")] pub enum Event { /// A candidate was backed. `[candidate, head_data]` CandidateBacked(CandidateReceipt, HeadData, CoreIndex, GroupIndex), diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index dc47ccc79864..6958d754c462 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -27,6 +27,7 @@ use crate::{ use frame_support::traits::{OneSessionHandler, Randomness}; use parity_scale_codec::{Decode, Encode}; use primitives::v1::{BlockNumber, ConsensusLog, SessionIndex, ValidatorId}; +use scale_info::TypeInfo; use sp_std::prelude::*; pub use pallet::*; @@ -61,7 +62,7 @@ impl> Default for SessionChangeNotification, queued: Vec, diff --git a/runtime/parachains/src/origin.rs b/runtime/parachains/src/origin.rs index ba4ad549c78e..83d4dcc25d99 100644 --- a/runtime/parachains/src/origin.rs +++ b/runtime/parachains/src/origin.rs @@ -54,7 +54,7 @@ pub mod pallet { /// Origin for the parachains. #[pallet::origin] - #[derive(PartialEq, Eq, Clone, Encode, Decode, sp_core::RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, sp_core::RuntimeDebug, scale_info::TypeInfo)] pub enum Origin { /// It comes from a parachain. Parachain(ParaId), diff --git a/runtime/parachains/src/paras.rs b/runtime/parachains/src/paras.rs index 170914d8f518..9a840837ae94 100644 --- a/runtime/parachains/src/paras.rs +++ b/runtime/parachains/src/paras.rs @@ -31,6 +31,7 @@ use primitives::v1::{ ConsensusLog, HeadData, Id as ParaId, SessionIndex, UpgradeGoAhead, UpgradeRestriction, ValidationCode, ValidationCodeHash, }; +use scale_info::TypeInfo; use sp_core::RuntimeDebug; use sp_runtime::{traits::One, DispatchResult, SaturatedConversion}; use sp_std::{prelude::*, result}; @@ -43,7 +44,7 @@ pub use crate::Origin as ParachainOrigin; pub use pallet::*; // the two key times necessary to track for every code replacement. -#[derive(Default, Encode, Decode)] +#[derive(Default, Encode, Decode, TypeInfo)] #[cfg_attr(test, derive(Debug, Clone, PartialEq))] pub struct ReplacementTimes { /// The relay-chain block number that the code upgrade was expected to be activated. @@ -58,7 +59,7 @@ pub struct ReplacementTimes { /// Metadata used to track previous parachain validation code that we keep in /// the state. -#[derive(Default, Encode, Decode)] +#[derive(Default, Encode, Decode, TypeInfo)] #[cfg_attr(test, derive(Debug, Clone, PartialEq))] pub struct ParaPastCodeMeta { /// Block numbers where the code was expected to be replaced and where the code @@ -87,7 +88,7 @@ enum UseCodeAt { /// If the para is in a "transition state", it is expected that the parachain is /// queued in the `ActionsQueue` to transition it into a stable state. Its lifecycle /// state will be used to determine the state transition to apply to the para. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] pub enum ParaLifecycle { /// Para is new and is onboarding as a Parathread or Parachain. Onboarding, @@ -255,7 +256,7 @@ impl ParaPastCodeMeta { } /// Arguments for initializing a para. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct ParaGenesisArgs { /// The initial head data to use. diff --git a/runtime/parachains/src/paras_inherent.rs b/runtime/parachains/src/paras_inherent.rs index 82e21cbe1805..e2dd357658df 100644 --- a/runtime/parachains/src/paras_inherent.rs +++ b/runtime/parachains/src/paras_inherent.rs @@ -135,11 +135,11 @@ pub mod pallet { }, }; - Some(Call::enter(inherent_data)) + Some(Call::enter { data: inherent_data }) } fn is_inherent(call: &Self::Call) -> bool { - matches!(call, Call::enter(..)) + matches!(call, Call::enter { .. }) } } @@ -429,12 +429,14 @@ mod tests { System::set_block_consumed_resources(used_block_weight, 0); // execute the paras inherent - let post_info = Call::::enter(ParachainsInherentData { - bitfields: signed_bitfields, - backed_candidates, - disputes: Vec::new(), - parent_header: default_header(), - }) + let post_info = Call::::enter { + data: ParachainsInherentData { + bitfields: signed_bitfields, + backed_candidates, + disputes: Vec::new(), + parent_header: default_header(), + }, + } .dispatch_bypass_filter(None.into()) .unwrap_err() .post_info; @@ -477,12 +479,14 @@ mod tests { System::set_block_consumed_resources(used_block_weight, 0); // execute the paras inherent - let post_info = Call::::enter(ParachainsInherentData { - bitfields: signed_bitfields, - backed_candidates, - disputes: Vec::new(), - parent_header: header, - }) + let post_info = Call::::enter { + data: ParachainsInherentData { + bitfields: signed_bitfields, + backed_candidates, + disputes: Vec::new(), + parent_header: header, + }, + } .dispatch_bypass_filter(None.into()) .unwrap(); diff --git a/runtime/parachains/src/scheduler.rs b/runtime/parachains/src/scheduler.rs index ef06fb79beba..e6772c19d910 100644 --- a/runtime/parachains/src/scheduler.rs +++ b/runtime/parachains/src/scheduler.rs @@ -40,6 +40,7 @@ use primitives::v1::{ CollatorId, CoreIndex, CoreOccupied, GroupIndex, GroupRotationInfo, Id as ParaId, ParathreadClaim, ParathreadEntry, ScheduledCore, ValidatorIndex, }; +use scale_info::TypeInfo; use sp_runtime::traits::{One, Saturating}; use sp_std::{convert::TryInto, prelude::*}; @@ -48,7 +49,7 @@ use crate::{configuration, initializer::SessionChangeNotification, paras}; pub use pallet::*; /// A queued parathread entry, pre-assigned to a core. -#[derive(Encode, Decode, Default)] +#[derive(Encode, Decode, Default, TypeInfo)] #[cfg_attr(test, derive(PartialEq, Debug))] pub struct QueuedParathread { claim: ParathreadEntry, @@ -56,7 +57,7 @@ pub struct QueuedParathread { } /// The queue of all parathread claims. -#[derive(Encode, Decode, Default)] +#[derive(Encode, Decode, Default, TypeInfo)] #[cfg_attr(test, derive(PartialEq, Debug))] pub struct ParathreadClaimQueue { queue: Vec, @@ -97,7 +98,7 @@ pub enum FreedReason { } /// The assignment type. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Debug))] pub enum AssignmentKind { /// A parachain. @@ -107,7 +108,7 @@ pub enum AssignmentKind { } /// How a free core is scheduled to be assigned. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq, Debug))] pub struct CoreAssignment { /// The core that is assigned. diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index c4c8f2d64a72..0a4532100951 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -8,6 +8,7 @@ build = "build.rs" [dependencies] bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } log = { version = "0.4.14", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.130", default-features = false } @@ -100,6 +101,7 @@ std = [ "primitives/std", "rustc-hex/std", "parity-scale-codec/std", + "scale-info/std", "inherents/std", "sp-core/std", "sp-api/std", diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 3e0978a4647d..2d4e35c630a2 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -906,7 +906,17 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen, + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, )] pub enum ProxyType { Any = 0, @@ -964,9 +974,9 @@ impl InstanceFilter for ProxyType { Call::Scheduler(..) | Call::Babe(..) | Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim(..)) | - Call::Indices(pallet_indices::Call::free(..)) | - Call::Indices(pallet_indices::Call::freeze(..)) | + Call::Indices(pallet_indices::Call::claim{..}) | + Call::Indices(pallet_indices::Call::free{..}) | + Call::Indices(pallet_indices::Call::freeze{..}) | // Specifically omitting Indices `transfer`, `force_transfer` // Specifically omitting the entire Balances pallet Call::Authorship(..) | @@ -983,8 +993,8 @@ impl InstanceFilter for ProxyType { Call::Bounties(..) | Call::Tips(..) | Call::Claims(..) | - Call::Vesting(pallet_vesting::Call::vest(..)) | - Call::Vesting(pallet_vesting::Call::vest_other(..)) | + Call::Vesting(pallet_vesting::Call::vest{..}) | + Call::Vesting(pallet_vesting::Call::vest_other{..}) | // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` Call::Utility(..) | Call::Identity(..) | @@ -1004,10 +1014,10 @@ impl InstanceFilter for ProxyType { }, ProxyType::IdentityJudgement => matches!( c, - Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..) + Call::Identity(pallet_identity::Call::provide_judgement { .. }) | Call::Utility(..) ), ProxyType::CancelProxy => { - matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))) + matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, } } @@ -1271,7 +1281,7 @@ sp_api::impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } @@ -1699,10 +1709,10 @@ mod test_fees { #[ignore] fn transfer_cost_min_multiplier() { let min_multiplier = runtime_common::MinimumMultiplier::get(); - let call = >::transfer_keep_alive( - Default::default(), - Default::default(), - ); + let call = pallet_balances::Call::::transfer_keep_alive { + dest: Default::default(), + value: Default::default(), + }; let info = call.get_dispatch_info(); // convert to outer call. let call = Call::Balances(call); diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index ed706e19bd34..d3fef706b679 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -7,6 +7,7 @@ build = "build.rs" [dependencies] parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0.130", default-features = false } serde_derive = { version = "1.0.117", optional = true } smallvec = "1.6.1" @@ -92,6 +93,7 @@ std = [ "bp-wococo/std", "bridge-runtime-common/std", "parity-scale-codec/std", + "scale-info/std", "frame-executive/std", "pallet-authority-discovery/std", "pallet-authorship/std", diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index d29bf8d6543f..cf0a83bfbb41 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -46,6 +46,7 @@ use runtime_common::{ BlockHashCount, BlockLength, BlockWeights, RocksDbWeight, SlowAdjustingFeeUpdate, }; use runtime_parachains::{self, runtime_api_impl::v1 as runtime_api_impl}; +use scale_info::TypeInfo; use sp_core::{OpaqueMetadata, RuntimeDebug}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -1034,7 +1035,17 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen, + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + TypeInfo, )] pub enum ProxyType { Any, @@ -1051,10 +1062,13 @@ impl InstanceFilter for ProxyType { match self { ProxyType::Any => true, ProxyType::CancelProxy => - matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))), + matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. })), ProxyType::Auction => matches!( c, - Call::Auctions(..) | Call::Crowdloan(..) | Call::Registrar(..) | Call::Slots(..) + Call::Auctions { .. } | + Call::Crowdloan { .. } | + Call::Registrar { .. } | + Call::Slots { .. } ), } } @@ -1129,7 +1143,7 @@ sp_api::impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } diff --git a/runtime/test-runtime/Cargo.toml b/runtime/test-runtime/Cargo.toml index 2072562e7bf5..7a506849efc3 100644 --- a/runtime/test-runtime/Cargo.toml +++ b/runtime/test-runtime/Cargo.toml @@ -10,6 +10,7 @@ bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } log = { version = "0.4.14", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0.130", default-features = false } serde_derive = { version = "1.0.117", optional = true } smallvec = "1.6.1" @@ -83,6 +84,7 @@ std = [ "primitives/std", "rustc-hex/std", "parity-scale-codec/std", + "scale-info/std", "inherents/std", "sp-core/std", "polkadot-parachain/std", diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 21d26e8fdf6d..6e2bf146a620 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -593,7 +593,8 @@ pub mod pallet_test_notifier { let id = who .using_encoded(|mut d| <[u8; 32]>::decode(&mut d)) .map_err(|_| Error::::BadAccountFormat)?; - let call = Call::::notification_received(0, Default::default()); + let call = + Call::::notification_received { query_id: 0, response: Default::default() }; let qid = pallet_xcm::Pallet::::new_notify_query( Junction::AccountId32 { network: Any, id }.into(), ::Call::from(call), @@ -723,7 +724,7 @@ sp_api::impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } diff --git a/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index d2042126f93f..0568852200d4 100644 --- a/runtime/westend/Cargo.toml +++ b/runtime/westend/Cargo.toml @@ -8,6 +8,7 @@ build = "build.rs" [dependencies] bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } log = { version = "0.4.14", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.130", default-features = false } @@ -105,6 +106,7 @@ std = [ "primitives/std", "rustc-hex/std", "parity-scale-codec/std", + "scale-info/std", "inherents/std", "sp-core/std", "polkadot-parachain/std", diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 6a1eae9efc80..372267d180ab 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -651,7 +651,17 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen, + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, )] pub enum ProxyType { Any, @@ -676,9 +686,9 @@ impl InstanceFilter for ProxyType { Call::System(..) | Call::Babe(..) | Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim(..)) | - Call::Indices(pallet_indices::Call::free(..)) | - Call::Indices(pallet_indices::Call::freeze(..)) | + Call::Indices(pallet_indices::Call::claim{..}) | + Call::Indices(pallet_indices::Call::free{..}) | + Call::Indices(pallet_indices::Call::freeze{..}) | // Specifically omitting Indices `transfer`, `force_transfer` // Specifically omitting the entire Balances pallet Call::Authorship(..) | @@ -688,24 +698,24 @@ impl InstanceFilter for ProxyType { Call::ImOnline(..) | Call::Utility(..) | Call::Identity(..) | - Call::Recovery(pallet_recovery::Call::as_recovered(..)) | - Call::Recovery(pallet_recovery::Call::vouch_recovery(..)) | - Call::Recovery(pallet_recovery::Call::claim_recovery(..)) | - Call::Recovery(pallet_recovery::Call::close_recovery(..)) | - Call::Recovery(pallet_recovery::Call::remove_recovery(..)) | - Call::Recovery(pallet_recovery::Call::cancel_recovered(..)) | + Call::Recovery(pallet_recovery::Call::as_recovered{..}) | + Call::Recovery(pallet_recovery::Call::vouch_recovery{..}) | + Call::Recovery(pallet_recovery::Call::claim_recovery{..}) | + Call::Recovery(pallet_recovery::Call::close_recovery{..}) | + Call::Recovery(pallet_recovery::Call::remove_recovery{..}) | + Call::Recovery(pallet_recovery::Call::cancel_recovered{..}) | // Specifically omitting Recovery `create_recovery`, `initiate_recovery` - Call::Vesting(pallet_vesting::Call::vest(..)) | - Call::Vesting(pallet_vesting::Call::vest_other(..)) | + Call::Vesting(pallet_vesting::Call::vest{..}) | + Call::Vesting(pallet_vesting::Call::vest_other{..}) | // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` Call::Scheduler(..) | // Specifically omitting Sudo pallet Call::Proxy(..) | Call::Multisig(..) | - Call::Registrar(paras_registrar::Call::register(..)) | - Call::Registrar(paras_registrar::Call::deregister(..)) | + Call::Registrar(paras_registrar::Call::register{..}) | + Call::Registrar(paras_registrar::Call::deregister{..}) | // Specifically omitting Registrar `swap` - Call::Registrar(paras_registrar::Call::reserve(..)) | + Call::Registrar(paras_registrar::Call::reserve{..}) | Call::Crowdloan(..) | Call::Slots(..) | Call::Auctions(..) // Specifically omitting the entire XCM Pallet @@ -714,7 +724,7 @@ impl InstanceFilter for ProxyType { matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..)) }, ProxyType::SudoBalances => match c { - Call::Sudo(pallet_sudo::Call::sudo(ref x)) => { + Call::Sudo(pallet_sudo::Call::sudo { call: ref x }) => { matches!(x.as_ref(), &Call::Balances(..)) }, Call::Utility(..) => true, @@ -722,10 +732,10 @@ impl InstanceFilter for ProxyType { }, ProxyType::IdentityJudgement => matches!( c, - Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..) + Call::Identity(pallet_identity::Call::provide_judgement { .. }) | Call::Utility(..) ), ProxyType::CancelProxy => { - matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))) + matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, ProxyType::Auction => matches!( c, @@ -1109,7 +1119,7 @@ sp_api::impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index 45140323807f..59c8846db28c 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -81,7 +81,7 @@ macro_rules! construct_runtime_prelude { let crate::signer::Signer { account, pair, .. } = signer; - let local_call = EPMCall::::submit(Box::new(raw_solution), witness); + let local_call = EPMCall::::submit { raw_solution: Box::new(raw_solution), num_signed_submissions: witness }; let call: Call = as std::convert::TryInto>::try_into(local_call) .expect("election provider pallet must exist in the runtime, thus \ inner call can be converted, qed." diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index 12b96a502165..21becd6cb140 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -8,6 +8,7 @@ edition = "2018" [dependencies] impl-trait-for-tuples = "0.2.0" parity-scale-codec = { version = "2.0.0", default-features = false, features = [ "derive" ] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } derivative = {version = "2.2.0", default-features = false, features = [ "use_core" ] } log = { version = "0.4.14", default-features = false } xcm-procedural = { path = "procedural" } @@ -17,4 +18,5 @@ default = ["std"] wasm-api = [] std = [ "parity-scale-codec/std", + "scale-info/std", ] diff --git a/xcm/pallet-xcm/Cargo.toml b/xcm/pallet-xcm/Cargo.toml index e8c586ae4908..96c6e3d42a31 100644 --- a/xcm/pallet-xcm/Cargo.toml +++ b/xcm/pallet-xcm/Cargo.toml @@ -6,6 +6,7 @@ version = "0.9.9" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0.130", optional = true, features = ["derive"] } log = { version = "0.4.14", default-features = false } @@ -29,6 +30,7 @@ polkadot-parachain = { path = "../../parachain" } default = ["std"] std = [ "codec/std", + "scale-info/std", "serde", "sp-std/std", "sp-core/std", diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index 314a929803cd..972e3f926829 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -25,6 +25,7 @@ mod tests; use codec::{Decode, Encode, EncodeLike}; use frame_support::traits::{Contains, EnsureOrigin, Get, OriginTrait}; +use scale_info::TypeInfo; use sp_runtime::{ traits::{BadOrigin, Saturating}, RuntimeDebug, @@ -217,7 +218,7 @@ pub mod pallet { } #[pallet::origin] - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] pub enum Origin { /// It comes from somewhere in the XCM space wanting to transact. Xcm(MultiLocation), @@ -264,7 +265,7 @@ pub mod pallet { } /// The status of a query. - #[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug)] + #[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] pub enum QueryStatus { /// The query was sent but no response has yet been received. Pending { @@ -290,7 +291,7 @@ pub mod pallet { } } - #[derive(Clone, Encode, Decode, Eq, PartialEq, Ord, PartialOrd)] + #[derive(Clone, Encode, Decode, Eq, PartialEq, Ord, PartialOrd, TypeInfo)] pub enum VersionMigrationStage { MigrateSupportedVersion, MigrateVersionNotifiers, diff --git a/xcm/pallet-xcm/src/mock.rs b/xcm/pallet-xcm/src/mock.rs index c841d896acab..d6ccbd4abfc9 100644 --- a/xcm/pallet-xcm/src/mock.rs +++ b/xcm/pallet-xcm/src/mock.rs @@ -93,7 +93,8 @@ pub mod pallet_test_notifier { let id = who .using_encoded(|mut d| <[u8; 32]>::decode(&mut d)) .map_err(|_| Error::::BadAccountFormat)?; - let call = Call::::notification_received(0, Default::default()); + let call = + Call::::notification_received { query_id: 0, response: Default::default() }; let qid = crate::Pallet::::new_notify_query( Junction::AccountId32 { network: Any, id }.into(), ::Call::from(call), diff --git a/xcm/pallet-xcm/src/tests.rs b/xcm/pallet-xcm/src/tests.rs index 56f3579cc1e7..82e6c524f269 100644 --- a/xcm/pallet-xcm/src/tests.rs +++ b/xcm/pallet-xcm/src/tests.rs @@ -44,7 +44,10 @@ fn report_outcome_notify_works() { assets: (Here, SEND_AMOUNT).into(), beneficiary: sender.clone(), }]); - let call = pallet_test_notifier::Call::notification_received(0, Default::default()); + let call = pallet_test_notifier::Call::notification_received { + query_id: 0, + response: Default::default(), + }; let notify = Call::TestNotifier(call); new_test_ext_with_balances(balances).execute_with(|| { XcmPallet::report_outcome_notify(&mut message, Parachain(PARA_ID).into(), notify, 100) diff --git a/xcm/src/double_encoded.rs b/xcm/src/double_encoded.rs index ae21336d13c3..858d97964203 100644 --- a/xcm/src/double_encoded.rs +++ b/xcm/src/double_encoded.rs @@ -20,9 +20,10 @@ use parity_scale_codec::{Decode, DecodeLimit, Encode}; /// Wrapper around the encoded and decoded versions of a value. /// Caches the decoded value once computed. -#[derive(Encode, Decode)] +#[derive(Encode, Decode, scale_info::TypeInfo)] #[codec(encode_bound())] #[codec(decode_bound())] +#[scale_info(bounds(), skip_type_params(T))] pub struct DoubleEncoded { encoded: Vec, #[codec(skip)] diff --git a/xcm/src/lib.rs b/xcm/src/lib.rs index ff5f0cd4eba2..87aad30c79f4 100644 --- a/xcm/src/lib.rs +++ b/xcm/src/lib.rs @@ -30,6 +30,7 @@ use core::{ }; use derivative::Derivative; use parity_scale_codec::{Decode, Encode, Error as CodecError, Input}; +use scale_info::TypeInfo; pub mod v0; pub mod v1; @@ -69,7 +70,7 @@ pub trait IntoVersion: Sized { } /// A single `MultiLocation` value, together with its version code. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] @@ -123,7 +124,7 @@ impl TryFrom for v1::MultiLocation { } /// A single `Response` value, together with its version code. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] @@ -199,7 +200,7 @@ impl TryFrom for v2::Response { } /// A single `MultiAsset` value, together with its version code. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] @@ -253,7 +254,7 @@ impl TryFrom for v1::MultiAsset { } /// A single `MultiAssets` value, together with its version code. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] @@ -307,10 +308,11 @@ impl TryFrom for v1::MultiAssets { } /// A single XCM message, together with its version code. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] +#[scale_info(bounds(), skip_type_params(Call))] pub enum VersionedXcm { V0(v0::Xcm), V1(v1::Xcm), diff --git a/xcm/src/v0/junction.rs b/xcm/src/v0/junction.rs index 171327a5f28a..0c559ca5a136 100644 --- a/xcm/src/v0/junction.rs +++ b/xcm/src/v0/junction.rs @@ -18,9 +18,10 @@ use alloc::vec::Vec; use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; /// A global identifier of an account-bearing consensus system. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] pub enum NetworkId { /// Unidentified/any. Any, @@ -33,7 +34,7 @@ pub enum NetworkId { } /// An identifier of a pluralistic body. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] pub enum BodyId { /// The only body in its context. Unit, @@ -54,7 +55,7 @@ pub enum BodyId { } /// A part of a pluralistic body. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] pub enum BodyPart { /// The body's declaration, under whatever means it decides. Voice, @@ -101,7 +102,7 @@ impl BodyPart { /// A single item in a path to describe the relative location of a consensus system. /// /// Each item assumes a pre-existing location as its context and is defined in terms of it. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] pub enum Junction { /// The consensus system of which the context is a member and state-wise super-set. /// diff --git a/xcm/src/v0/mod.rs b/xcm/src/v0/mod.rs index 9ec5150242be..35889d8daab2 100644 --- a/xcm/src/v0/mod.rs +++ b/xcm/src/v0/mod.rs @@ -24,6 +24,7 @@ use core::{ }; use derivative::Derivative; use parity_scale_codec::{self, Decode, Encode}; +use scale_info::TypeInfo; mod junction; mod multi_asset; @@ -58,7 +59,7 @@ pub mod prelude { // the number of items in the vector. /// Basically just the XCM (more general) version of `ParachainDispatchOrigin`. -#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Debug)] +#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub enum OriginKind { /// Origin should just be the native dispatch origin representation for the sender in the /// local runtime framework. For Cumulus/Frame chains this is the `Parachain` or `Relay` origin @@ -81,7 +82,7 @@ pub enum OriginKind { } /// Response data to a query. -#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub enum Response { /// Some assets. Assets(Vec), @@ -95,10 +96,11 @@ pub enum Response { /// /// This is the inner XCM format and is version-sensitive. Messages are typically passed using the outer /// XCM format, known as `VersionedXcm`. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] +#[scale_info(bounds(), skip_type_params(Call))] pub enum Xcm { /// Withdraw asset(s) (`assets`) from the ownership of `origin` and place them into `holding`. Execute the /// orders (`effects`). diff --git a/xcm/src/v0/multi_asset.rs b/xcm/src/v0/multi_asset.rs index ee541c3c681f..dac5a6bfeb7e 100644 --- a/xcm/src/v0/multi_asset.rs +++ b/xcm/src/v0/multi_asset.rs @@ -24,6 +24,7 @@ use core::{ result, }; use parity_scale_codec::{self, Decode, Encode}; +use scale_info::TypeInfo; pub use crate::v1::AssetInstance; @@ -82,7 +83,7 @@ pub use crate::v1::AssetInstance; /// - `/AccountId32` for an ERC-20-style single-asset smart-contract on a Frame-based contracts chain. /// - `/AccountKey20` for an ERC-20-style single-asset smart-contract on an Ethereum-like chain. /// -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] pub enum MultiAsset { /// No assets. Rarely used. None, diff --git a/xcm/src/v0/multi_location.rs b/xcm/src/v0/multi_location.rs index 6205071690f0..6b7438b93fa0 100644 --- a/xcm/src/v0/multi_location.rs +++ b/xcm/src/v0/multi_location.rs @@ -42,7 +42,7 @@ use parity_scale_codec::{self, Decode, Encode}; /// This specific `MultiLocation` implementation uses a Rust `enum` in order to make pattern matching easier. /// /// The `MultiLocation` value of `Null` simply refers to the interpreting consensus system. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, scale_info::TypeInfo)] pub enum MultiLocation { /// The interpreting consensus system. Null, diff --git a/xcm/src/v0/order.rs b/xcm/src/v0/order.rs index e414cc27a6e2..54117e31f9c5 100644 --- a/xcm/src/v0/order.rs +++ b/xcm/src/v0/order.rs @@ -26,10 +26,11 @@ use derivative::Derivative; use parity_scale_codec::{self, Decode, Encode}; /// An instruction to be executed on some or all of the assets in holding, used by asset-related XCM messages. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, scale_info::TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] +#[scale_info(bounds(), skip_type_params(Call))] pub enum Order { /// Do nothing. Not generally used. #[codec(index = 0)] diff --git a/xcm/src/v0/traits.rs b/xcm/src/v0/traits.rs index 5c9882f61dbb..3263fda4ac56 100644 --- a/xcm/src/v0/traits.rs +++ b/xcm/src/v0/traits.rs @@ -21,7 +21,7 @@ use parity_scale_codec::{Decode, Encode}; use super::{MultiLocation, Xcm}; -#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, scale_info::TypeInfo)] pub enum Error { Undefined, /// An arithmetic overflow happened. @@ -103,7 +103,7 @@ pub type Result = result::Result<(), Error>; pub type Weight = u64; /// Outcome of an XCM execution. -#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, scale_info::TypeInfo)] pub enum Outcome { /// Execution completed successfully; given weight was used. Complete(Weight), diff --git a/xcm/src/v1/junction.rs b/xcm/src/v1/junction.rs index 06e7308ad411..c4835d60c5b1 100644 --- a/xcm/src/v1/junction.rs +++ b/xcm/src/v1/junction.rs @@ -21,11 +21,12 @@ use crate::v0::Junction as Junction0; use alloc::vec::Vec; use core::convert::TryFrom; use parity_scale_codec::{self, Decode, Encode}; +use scale_info::TypeInfo; /// A single item in a path to describe the relative location of a consensus system. /// /// Each item assumes a pre-existing location as its context and is defined in terms of it. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] pub enum Junction { /// An indexed parachain belonging to and operated by the context. /// diff --git a/xcm/src/v1/mod.rs b/xcm/src/v1/mod.rs index 02bbd5f42712..6f96dc739491 100644 --- a/xcm/src/v1/mod.rs +++ b/xcm/src/v1/mod.rs @@ -29,6 +29,7 @@ use core::{ }; use derivative::Derivative; use parity_scale_codec::{self, Decode, Encode}; +use scale_info::TypeInfo; mod junction; mod multiasset; @@ -75,7 +76,7 @@ pub mod prelude { } /// Response data to a query. -#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub enum Response { /// Some assets. Assets(MultiAssets), @@ -91,10 +92,11 @@ pub enum Response { /// /// This is the inner XCM format and is version-sensitive. Messages are typically passed using the outer /// XCM format, known as `VersionedXcm`. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] +#[scale_info(bounds(), skip_type_params(Call))] pub enum Xcm { /// Withdraw asset(s) (`assets`) from the ownership of `origin` and place them into `holding`. Execute the /// orders (`effects`). diff --git a/xcm/src/v1/multiasset.rs b/xcm/src/v1/multiasset.rs index a5dfdc84968c..129c5731542f 100644 --- a/xcm/src/v1/multiasset.rs +++ b/xcm/src/v1/multiasset.rs @@ -31,9 +31,10 @@ use core::{ result, }; use parity_scale_codec::{self as codec, Decode, Encode}; +use scale_info::TypeInfo; /// A general identifier for an instance of a non-fungible asset class. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] pub enum AssetInstance { /// Undefined - used if the non-fungible asset class has only one instance. Undefined, @@ -95,7 +96,7 @@ impl From> for AssetInstance { } /// Classification of an asset being concrete or abstract. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode, TypeInfo)] pub enum AssetId { Concrete(MultiLocation), Abstract(Vec), @@ -135,7 +136,7 @@ impl AssetId { } /// Classification of whether an asset is fungible or not, along with a mandatory amount or instance. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode, TypeInfo)] pub enum Fungibility { Fungible(#[codec(compact)] u128), NonFungible(AssetInstance), @@ -162,7 +163,7 @@ impl> From for Fungibility { } } -#[derive(Clone, Eq, PartialEq, Debug, Encode, Decode)] +#[derive(Clone, Eq, PartialEq, Debug, Encode, Decode, TypeInfo)] pub struct MultiAsset { pub id: AssetId, pub fun: Fungibility, @@ -266,7 +267,7 @@ impl TryFrom> for MultiAsset { } /// A `Vec` of `MultiAsset`s. There may be no duplicate fungible items in here and when decoding, they must be sorted. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, TypeInfo)] pub struct MultiAssets(Vec); impl Decode for MultiAssets { @@ -422,14 +423,14 @@ impl MultiAssets { } } /// Classification of whether an asset is fungible or not. -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode, TypeInfo)] pub enum WildFungibility { Fungible, NonFungible, } /// A wildcard representing a set of assets. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode, TypeInfo)] pub enum WildMultiAsset { /// All assets in the holding register, up to `usize` individual assets (different instances of non-fungibles could /// be separate assets). @@ -501,7 +502,7 @@ impl, B: Into> From<(A, B)> for WildMultiAsset /// /// Note: Vectors of wildcards whose encoding is supported in XCM v0 are unsupported /// in this implementation and will result in a decode error. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode, TypeInfo)] pub enum MultiAssetFilter { Definite(MultiAssets), Wild(WildMultiAsset), diff --git a/xcm/src/v1/multilocation.rs b/xcm/src/v1/multilocation.rs index a2a087443b3c..9c472553a37c 100644 --- a/xcm/src/v1/multilocation.rs +++ b/xcm/src/v1/multilocation.rs @@ -19,6 +19,7 @@ use super::Junction; use core::{convert::TryFrom, mem, result}; use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; /// A relative path between state-bearing consensus systems. /// @@ -46,7 +47,7 @@ use parity_scale_codec::{Decode, Encode}; /// that a value is strictly an interior location, in those cases, `Junctions` may be used. /// /// The `MultiLocation` value of `Null` simply refers to the interpreting consensus system. -#[derive(Clone, Decode, Encode, Eq, PartialEq, Ord, PartialOrd, Debug)] +#[derive(Clone, Decode, Encode, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo)] pub struct MultiLocation { /// The number of parent junctions at the beginning of this `MultiLocation`. pub parents: u8, @@ -370,7 +371,7 @@ const MAX_JUNCTIONS: usize = 8; /// /// Parent junctions cannot be constructed with this type. Refer to `MultiLocation` for /// instructions on constructing parent junctions. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] pub enum Junctions { /// The interpreting consensus system. Here, diff --git a/xcm/src/v1/order.rs b/xcm/src/v1/order.rs index 9b8a7591f183..00ee69458cd0 100644 --- a/xcm/src/v1/order.rs +++ b/xcm/src/v1/order.rs @@ -25,12 +25,14 @@ use core::{ }; use derivative::Derivative; use parity_scale_codec::{self, Decode, Encode}; +use scale_info::TypeInfo; /// An instruction to be executed on some or all of the assets in holding, used by asset-related XCM messages. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] +#[scale_info(bounds(), skip_type_params(Call))] pub enum Order { /// Do nothing. Not generally used. #[codec(index = 0)] diff --git a/xcm/src/v1/traits.rs b/xcm/src/v1/traits.rs index 892b6afea9f7..445ab25d4c7f 100644 --- a/xcm/src/v1/traits.rs +++ b/xcm/src/v1/traits.rs @@ -18,10 +18,11 @@ use core::result; use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; use super::{MultiLocation, Xcm}; -#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)] pub enum Error { Undefined, /// An arithmetic overflow happened. @@ -105,7 +106,7 @@ pub type Result = result::Result<(), Error>; pub type Weight = u64; /// Outcome of an XCM execution. -#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)] pub enum Outcome { /// Execution completed successfully; given weight was used. Complete(Weight), diff --git a/xcm/src/v2/mod.rs b/xcm/src/v2/mod.rs index 943582ceca8b..2456884e7972 100644 --- a/xcm/src/v2/mod.rs +++ b/xcm/src/v2/mod.rs @@ -26,6 +26,7 @@ use core::{ }; use derivative::Derivative; use parity_scale_codec::{self, Decode, Encode}; +use scale_info::TypeInfo; mod traits; @@ -45,10 +46,11 @@ pub const VERSION: super::Version = 2; /// An identifier for a query. pub type QueryId = u64; -#[derive(Derivative, Default, Encode, Decode)] +#[derive(Derivative, Default, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] +#[scale_info(bounds(), skip_type_params(Call))] pub struct Xcm(pub Vec>); impl Xcm { @@ -143,7 +145,7 @@ pub mod prelude { } /// Response data to a query. -#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub enum Response { /// No response. Serves as a neutral default. Null, @@ -162,7 +164,7 @@ impl Default for Response { } /// An optional weight limit. -#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)] pub enum WeightLimit { /// No weight limit imposed. Unlimited, @@ -196,10 +198,11 @@ impl From for Option { /// /// This is the inner XCM format and is version-sensitive. Messages are typically passed using the outer /// XCM format, known as `VersionedXcm`. -#[derive(Derivative, Encode, Decode)] +#[derive(Derivative, Encode, Decode, TypeInfo)] #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] +#[scale_info(bounds(), skip_type_params(Call))] pub enum Instruction { /// Withdraw asset(s) (`assets`) from the ownership of `origin` and place them into the Holding /// Register. diff --git a/xcm/src/v2/traits.rs b/xcm/src/v2/traits.rs index e020fd046e82..b4feca6ac260 100644 --- a/xcm/src/v2/traits.rs +++ b/xcm/src/v2/traits.rs @@ -18,10 +18,11 @@ use core::result; use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; use super::*; -#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, Debug)] +#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)] pub enum Error { Undefined, /// An arithmetic overflow happened. @@ -126,7 +127,7 @@ pub type Result = result::Result<(), Error>; pub type Weight = u64; /// Outcome of an XCM execution. -#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug)] +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)] pub enum Outcome { /// Execution completed successfully; given weight was used. Complete(Weight), diff --git a/xcm/xcm-builder/Cargo.toml b/xcm/xcm-builder/Cargo.toml index d7119b34d531..b482c5799a4f 100644 --- a/xcm/xcm-builder/Cargo.toml +++ b/xcm/xcm-builder/Cargo.toml @@ -7,6 +7,7 @@ version = "0.9.9" [dependencies] parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } xcm = { path = "..", default-features = false } xcm-executor = { path = "../xcm-executor", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -32,6 +33,7 @@ runtime-benchmarks = [] std = [ "log/std", "parity-scale-codec/std", + "scale-info/std", "xcm/std", "xcm-executor/std", "sp-std/std", diff --git a/xcm/xcm-builder/src/mock.rs b/xcm/xcm-builder/src/mock.rs index 8f6759582f9a..67a2cd8c9aec 100644 --- a/xcm/xcm-builder/src/mock.rs +++ b/xcm/xcm-builder/src/mock.rs @@ -53,7 +53,7 @@ pub enum TestOrigin { /// /// Each item contains the amount of weight that it *wants* to consume as the first item, and the actual amount (if /// different from the former) in the second option. -#[derive(Debug, Encode, Decode, Eq, PartialEq, Clone, Copy)] +#[derive(Debug, Encode, Decode, Eq, PartialEq, Clone, Copy, scale_info::TypeInfo)] pub enum TestCall { OnlyRoot(Weight, Option), OnlyParachain(Weight, Option, Option), diff --git a/xcm/xcm-executor/integration-tests/src/lib.rs b/xcm/xcm-executor/integration-tests/src/lib.rs index 72aa7b15d07b..359a5ef7a39e 100644 --- a/xcm/xcm-executor/integration-tests/src/lib.rs +++ b/xcm/xcm-executor/integration-tests/src/lib.rs @@ -44,10 +44,10 @@ fn basic_buy_fees_message_executes() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute( - Box::new(VersionedXcm::from(msg)), - 1_000_000_000, - )), + polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute { + message: Box::new(VersionedXcm::from(msg)), + max_weight: 1_000_000_000, + }), sp_keyring::Sr25519Keyring::Alice, 0, ); @@ -88,7 +88,7 @@ fn query_response_fires() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::TestNotifier(pallet_test_notifier::Call::prepare_new_query()), + polkadot_test_runtime::Call::TestNotifier(pallet_test_notifier::Call::prepare_new_query {}), sp_keyring::Sr25519Keyring::Alice, 0, ); @@ -124,7 +124,10 @@ fn query_response_fires() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute(msg, 1_000_000_000)), + polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute { + message: msg, + max_weight: 1_000_000_000, + }), sp_keyring::Sr25519Keyring::Alice, 1, ); @@ -173,7 +176,7 @@ fn query_response_elicits_handler() { let execute = construct_extrinsic( &client, polkadot_test_runtime::Call::TestNotifier( - pallet_test_notifier::Call::prepare_new_notify_query(), + pallet_test_notifier::Call::prepare_new_notify_query {}, ), sp_keyring::Sr25519Keyring::Alice, 0, @@ -209,10 +212,10 @@ fn query_response_elicits_handler() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute( - Box::new(VersionedXcm::from(msg)), - 1_000_000_000, - )), + polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute { + message: Box::new(VersionedXcm::from(msg)), + max_weight: 1_000_000_000, + }), sp_keyring::Sr25519Keyring::Alice, 1, ); diff --git a/xcm/xcm-simulator/example/Cargo.toml b/xcm/xcm-simulator/example/Cargo.toml index 5a8f1ac0b867..b4a8cc93e537 100644 --- a/xcm/xcm-simulator/example/Cargo.toml +++ b/xcm/xcm-simulator/example/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0" } +scale-info = { version = "1.0", features = ["derive"] } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/xcm/xcm-simulator/example/src/lib.rs b/xcm/xcm-simulator/example/src/lib.rs index e93393e54d7f..1f6d2934a673 100644 --- a/xcm/xcm-simulator/example/src/lib.rs +++ b/xcm/xcm-simulator/example/src/lib.rs @@ -118,9 +118,10 @@ mod tests { fn dmp() { MockNet::reset(); - let remark = parachain::Call::System( - frame_system::Call::::remark_with_event(vec![1, 2, 3]), - ); + let remark = + parachain::Call::System(frame_system::Call::::remark_with_event { + remark: vec![1, 2, 3], + }); Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::send_xcm( Here, @@ -146,7 +147,7 @@ mod tests { MockNet::reset(); let remark = relay_chain::Call::System( - frame_system::Call::::remark_with_event(vec![1, 2, 3]), + frame_system::Call::::remark_with_event { remark: vec![1, 2, 3] }, ); ParaA::execute_with(|| { assert_ok!(ParachainPalletXcm::send_xcm( @@ -172,9 +173,10 @@ mod tests { fn xcmp() { MockNet::reset(); - let remark = parachain::Call::System( - frame_system::Call::::remark_with_event(vec![1, 2, 3]), - ); + let remark = + parachain::Call::System(frame_system::Call::::remark_with_event { + remark: vec![1, 2, 3], + }); ParaA::execute_with(|| { assert_ok!(ParachainPalletXcm::send_xcm( Here,