Update polkadot with one more commit: from 54bcee1d5615f53781d5172fcce6700dbf35dad2 -> 3dd8331414c92f5d01d6a470eae43049099d7aa9 (#2266)

* Update polkadot with one commit: from 54bcee1d5615f53781d5172fcce6700dbf35dad2 -> 3dd8331414c92f5d01d6a470eae43049099d7aa9

* Fix test

* Fix test better

* typo
This commit is contained in:
Branislav Kontur
2023-03-03 10:02:49 +01:00
committed by GitHub
parent c301b64894
commit cf3ddb831c
5 changed files with 213 additions and 69 deletions
+66 -66
View File
@@ -4449,7 +4449,7 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7"
[[package]] [[package]]
name = "kusama-runtime" name = "kusama-runtime"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"frame-benchmarking", "frame-benchmarking",
@@ -4547,7 +4547,7 @@ dependencies = [
[[package]] [[package]]
name = "kusama-runtime-constants" name = "kusama-runtime-constants"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"polkadot-primitives", "polkadot-primitives",
@@ -7030,7 +7030,7 @@ dependencies = [
[[package]] [[package]]
name = "pallet-xcm" name = "pallet-xcm"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bounded-collections", "bounded-collections",
"frame-benchmarking", "frame-benchmarking",
@@ -7051,7 +7051,7 @@ dependencies = [
[[package]] [[package]]
name = "pallet-xcm-benchmarks" name = "pallet-xcm-benchmarks"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"frame-benchmarking", "frame-benchmarking",
"frame-support", "frame-support",
@@ -7587,7 +7587,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-approval-distribution" name = "polkadot-approval-distribution"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"polkadot-node-metrics", "polkadot-node-metrics",
@@ -7602,7 +7602,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-availability-bitfield-distribution" name = "polkadot-availability-bitfield-distribution"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"polkadot-node-network-protocol", "polkadot-node-network-protocol",
@@ -7616,7 +7616,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-availability-distribution" name = "polkadot-availability-distribution"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"derive_more", "derive_more",
"fatality", "fatality",
@@ -7639,7 +7639,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-availability-recovery" name = "polkadot-availability-recovery"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"fatality", "fatality",
"futures", "futures",
@@ -7660,7 +7660,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-cli" name = "polkadot-cli"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"clap 4.1.6", "clap 4.1.6",
"frame-benchmarking-cli", "frame-benchmarking-cli",
@@ -7688,7 +7688,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-client" name = "polkadot-client"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"frame-benchmarking", "frame-benchmarking",
@@ -7731,7 +7731,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-collator-protocol" name = "polkadot-collator-protocol"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"always-assert", "always-assert",
"bitvec", "bitvec",
@@ -7753,7 +7753,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-core-primitives" name = "polkadot-core-primitives"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"scale-info", "scale-info",
@@ -7765,7 +7765,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-dispute-distribution" name = "polkadot-dispute-distribution"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"derive_more", "derive_more",
"fatality", "fatality",
@@ -7790,7 +7790,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-erasure-coding" name = "polkadot-erasure-coding"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"polkadot-node-primitives", "polkadot-node-primitives",
@@ -7804,7 +7804,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-gossip-support" name = "polkadot-gossip-support"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"futures-timer", "futures-timer",
@@ -7824,7 +7824,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-network-bridge" name = "polkadot-network-bridge"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"always-assert", "always-assert",
"async-trait", "async-trait",
@@ -7848,7 +7848,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-collation-generation" name = "polkadot-node-collation-generation"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"parity-scale-codec", "parity-scale-codec",
@@ -7866,7 +7866,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-approval-voting" name = "polkadot-node-core-approval-voting"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"derive_more", "derive_more",
@@ -7895,7 +7895,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-av-store" name = "polkadot-node-core-av-store"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"futures", "futures",
@@ -7916,7 +7916,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-backing" name = "polkadot-node-core-backing"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"fatality", "fatality",
@@ -7935,7 +7935,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-bitfield-signing" name = "polkadot-node-core-bitfield-signing"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"polkadot-node-subsystem", "polkadot-node-subsystem",
@@ -7950,7 +7950,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-candidate-validation" name = "polkadot-node-core-candidate-validation"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -7970,7 +7970,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-chain-api" name = "polkadot-node-core-chain-api"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"polkadot-node-metrics", "polkadot-node-metrics",
@@ -7985,7 +7985,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-chain-selection" name = "polkadot-node-core-chain-selection"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"futures-timer", "futures-timer",
@@ -8002,7 +8002,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-dispute-coordinator" name = "polkadot-node-core-dispute-coordinator"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"fatality", "fatality",
"futures", "futures",
@@ -8021,7 +8021,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-parachains-inherent" name = "polkadot-node-core-parachains-inherent"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -8038,7 +8038,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-provisioner" name = "polkadot-node-core-provisioner"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"fatality", "fatality",
@@ -8056,7 +8056,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-pvf" name = "polkadot-node-core-pvf"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"always-assert", "always-assert",
"assert_matches", "assert_matches",
@@ -8092,7 +8092,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-pvf-checker" name = "polkadot-node-core-pvf-checker"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"polkadot-node-primitives", "polkadot-node-primitives",
@@ -8108,7 +8108,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-core-runtime-api" name = "polkadot-node-core-runtime-api"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"futures", "futures",
"lru 0.9.0", "lru 0.9.0",
@@ -8123,7 +8123,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-jaeger" name = "polkadot-node-jaeger"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"log", "log",
@@ -8141,7 +8141,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-metrics" name = "polkadot-node-metrics"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bs58", "bs58",
"futures", "futures",
@@ -8160,7 +8160,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-network-protocol" name = "polkadot-node-network-protocol"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"derive_more", "derive_more",
@@ -8183,7 +8183,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-primitives" name = "polkadot-node-primitives"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bounded-vec", "bounded-vec",
"futures", "futures",
@@ -8206,7 +8206,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-subsystem" name = "polkadot-node-subsystem"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"polkadot-node-jaeger", "polkadot-node-jaeger",
"polkadot-node-subsystem-types", "polkadot-node-subsystem-types",
@@ -8216,7 +8216,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-subsystem-test-helpers" name = "polkadot-node-subsystem-test-helpers"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -8234,7 +8234,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-subsystem-types" name = "polkadot-node-subsystem-types"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"derive_more", "derive_more",
@@ -8257,7 +8257,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-node-subsystem-util" name = "polkadot-node-subsystem-util"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"derive_more", "derive_more",
@@ -8290,7 +8290,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-overseer" name = "polkadot-overseer"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -8313,7 +8313,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-parachain" name = "polkadot-parachain"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bounded-collections", "bounded-collections",
"derive_more", "derive_more",
@@ -8412,7 +8412,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-performance-test" name = "polkadot-performance-test"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"env_logger 0.9.0", "env_logger 0.9.0",
"kusama-runtime", "kusama-runtime",
@@ -8428,7 +8428,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-primitives" name = "polkadot-primitives"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"hex-literal", "hex-literal",
@@ -8454,7 +8454,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-rpc" name = "polkadot-rpc"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"jsonrpsee", "jsonrpsee",
"mmr-rpc", "mmr-rpc",
@@ -8486,7 +8486,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-runtime" name = "polkadot-runtime"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"frame-benchmarking", "frame-benchmarking",
@@ -8576,7 +8576,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-runtime-common" name = "polkadot-runtime-common"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"frame-benchmarking", "frame-benchmarking",
@@ -8622,7 +8622,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-runtime-constants" name = "polkadot-runtime-constants"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"polkadot-primitives", "polkadot-primitives",
@@ -8636,7 +8636,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-runtime-metrics" name = "polkadot-runtime-metrics"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bs58", "bs58",
"parity-scale-codec", "parity-scale-codec",
@@ -8648,7 +8648,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-runtime-parachains" name = "polkadot-runtime-parachains"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"bitvec", "bitvec",
@@ -8692,7 +8692,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-service" name = "polkadot-service"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"frame-benchmarking-cli", "frame-benchmarking-cli",
@@ -8801,7 +8801,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-statement-distribution" name = "polkadot-statement-distribution"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"arrayvec 0.5.2", "arrayvec 0.5.2",
"fatality", "fatality",
@@ -8822,7 +8822,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-statement-table" name = "polkadot-statement-table"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"polkadot-primitives", "polkadot-primitives",
@@ -8832,7 +8832,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-test-client" name = "polkadot-test-client"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"polkadot-node-subsystem", "polkadot-node-subsystem",
@@ -8857,7 +8857,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-test-runtime" name = "polkadot-test-runtime"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"frame-election-provider-support", "frame-election-provider-support",
@@ -8918,7 +8918,7 @@ dependencies = [
[[package]] [[package]]
name = "polkadot-test-service" name = "polkadot-test-service"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"frame-benchmarking", "frame-benchmarking",
"frame-system", "frame-system",
@@ -9645,7 +9645,7 @@ dependencies = [
[[package]] [[package]]
name = "rococo-runtime" name = "rococo-runtime"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"binary-merkle-tree", "binary-merkle-tree",
"frame-benchmarking", "frame-benchmarking",
@@ -9731,7 +9731,7 @@ dependencies = [
[[package]] [[package]]
name = "rococo-runtime-constants" name = "rococo-runtime-constants"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"polkadot-primitives", "polkadot-primitives",
@@ -11527,7 +11527,7 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec"
[[package]] [[package]]
name = "slot-range-helper" name = "slot-range-helper"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"enumn", "enumn",
"parity-scale-codec", "parity-scale-codec",
@@ -12846,7 +12846,7 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16"
[[package]] [[package]]
name = "test-runtime-constants" name = "test-runtime-constants"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"polkadot-primitives", "polkadot-primitives",
@@ -13237,7 +13237,7 @@ dependencies = [
[[package]] [[package]]
name = "tracing-gum" name = "tracing-gum"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"polkadot-node-jaeger", "polkadot-node-jaeger",
"polkadot-primitives", "polkadot-primitives",
@@ -13248,7 +13248,7 @@ dependencies = [
[[package]] [[package]]
name = "tracing-gum-proc-macro" name = "tracing-gum-proc-macro"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"expander 0.0.6", "expander 0.0.6",
"proc-macro-crate", "proc-macro-crate",
@@ -14305,7 +14305,7 @@ dependencies = [
[[package]] [[package]]
name = "westend-runtime" name = "westend-runtime"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"frame-benchmarking", "frame-benchmarking",
@@ -14397,7 +14397,7 @@ dependencies = [
[[package]] [[package]]
name = "westend-runtime-constants" name = "westend-runtime-constants"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"polkadot-primitives", "polkadot-primitives",
@@ -14800,7 +14800,7 @@ dependencies = [
[[package]] [[package]]
name = "xcm" name = "xcm"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"bounded-collections", "bounded-collections",
"derivative", "derivative",
@@ -14816,7 +14816,7 @@ dependencies = [
[[package]] [[package]]
name = "xcm-builder" name = "xcm-builder"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"frame-system", "frame-system",
@@ -14837,7 +14837,7 @@ dependencies = [
[[package]] [[package]]
name = "xcm-executor" name = "xcm-executor"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"environmental", "environmental",
"frame-benchmarking", "frame-benchmarking",
@@ -14857,7 +14857,7 @@ dependencies = [
[[package]] [[package]]
name = "xcm-procedural" name = "xcm-procedural"
version = "0.9.37" version = "0.9.37"
source = "git+https://github.com/paritytech/polkadot?branch=master#54bcee1d5615f53781d5172fcce6700dbf35dad2" source = "git+https://github.com/paritytech/polkadot?branch=master#3dd8331414c92f5d01d6a470eae43049099d7aa9"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"proc-macro2", "proc-macro2",
@@ -154,7 +154,8 @@ fn test_asset_xcm_trader_with_refund() {
assert_ok!(trader.buy_weight(bought, asset.clone().into())); assert_ok!(trader.buy_weight(bought, asset.clone().into()));
// Make sure again buy_weight does return an error // Make sure again buy_weight does return an error
assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::NotWithdrawable); // This assert relies on the fact, that we use `TakeFirstAssetTrader` in `WeightTrader` tuple chain, which cannot be called twice
assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive);
// We actually use half of the weight // We actually use half of the weight
let weight_used = bought / 2; let weight_used = bought / 2;
@@ -160,7 +160,8 @@ fn test_asset_xcm_trader_with_refund() {
assert_ok!(trader.buy_weight(bought, asset.clone().into())); assert_ok!(trader.buy_weight(bought, asset.clone().into()));
// Make sure again buy_weight does return an error // Make sure again buy_weight does return an error
assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::NotWithdrawable); // This assert relies on the fact, that we use `TakeFirstAssetTrader` in `WeightTrader` tuple chain, which cannot be called twice
assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive);
// We actually use half of the weight // We actually use half of the weight
let weight_used = bought / 2; let weight_used = bought / 2;
@@ -155,7 +155,8 @@ fn test_asset_xcm_trader_with_refund() {
assert_ok!(trader.buy_weight(bought, asset.clone().into())); assert_ok!(trader.buy_weight(bought, asset.clone().into()));
// Make sure again buy_weight does return an error // Make sure again buy_weight does return an error
assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::NotWithdrawable); // This assert relies on the fact, that we use `TakeFirstAssetTrader` in `WeightTrader` tuple chain, which cannot be called twice
assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive);
// We actually use half of the weight // We actually use half of the weight
let weight_used = bought / 2; let weight_used = bought / 2;
+141
View File
@@ -315,6 +315,13 @@ pub trait ChargeWeightInFungibles<AccountId, Assets: fungibles::Inspect<AccountI
mod tests { mod tests {
use super::*; use super::*;
use cumulus_primitives_core::UpwardMessage; use cumulus_primitives_core::UpwardMessage;
use frame_support::{
assert_ok,
dispatch::DispatchResult,
traits::tokens::{DepositConsequence, WithdrawConsequence},
};
use sp_runtime::DispatchError;
use xcm_executor::{traits::Error, Assets};
/// Validates [`validate`] for required Some(destination) and Some(message) /// Validates [`validate`] for required Some(destination) and Some(message)
struct OkFixedXcmHashWithAssertingRequiredInputsSender; struct OkFixedXcmHashWithAssertingRequiredInputsSender;
@@ -410,4 +417,138 @@ mod tests {
)>(dest.into(), message) )>(dest.into(), message)
); );
} }
#[test]
fn take_first_asset_trader_buy_weight_called_twice_throws_error() {
const AMOUNT: u128 = 100;
// prepare prerequisites to instantiate `TakeFirstAssetTrader`
type TestAccountId = u32;
type TestAssetId = u32;
type TestBalance = u128;
struct TestAssets;
impl MatchesFungibles<TestAssetId, TestBalance> for TestAssets {
fn matches_fungibles(a: &MultiAsset) -> Result<(TestAssetId, TestBalance), Error> {
match a {
MultiAsset { fun: Fungible(amount), id: Concrete(_id) } => Ok((1, *amount)),
_ => Err(Error::AssetNotHandled),
}
}
}
impl fungibles::Inspect<TestAccountId> for TestAssets {
type AssetId = TestAssetId;
type Balance = TestBalance;
fn total_issuance(_: Self::AssetId) -> Self::Balance {
todo!()
}
fn minimum_balance(_: Self::AssetId) -> Self::Balance {
0
}
fn balance(_: Self::AssetId, _: &TestAccountId) -> Self::Balance {
todo!()
}
fn reducible_balance(_: Self::AssetId, _: &TestAccountId, _: bool) -> Self::Balance {
todo!()
}
fn can_deposit(
_: Self::AssetId,
_: &TestAccountId,
_: Self::Balance,
_: bool,
) -> DepositConsequence {
todo!()
}
fn can_withdraw(
_: Self::AssetId,
_: &TestAccountId,
_: Self::Balance,
) -> WithdrawConsequence<Self::Balance> {
todo!()
}
fn asset_exists(_: Self::AssetId) -> bool {
todo!()
}
}
impl fungibles::Mutate<TestAccountId> for TestAssets {
fn mint_into(_: Self::AssetId, _: &TestAccountId, _: Self::Balance) -> DispatchResult {
todo!()
}
fn burn_from(
_: Self::AssetId,
_: &TestAccountId,
_: Self::Balance,
) -> Result<Self::Balance, DispatchError> {
todo!()
}
}
impl fungibles::Transfer<TestAccountId> for TestAssets {
fn transfer(
_: Self::AssetId,
_: &TestAccountId,
_: &TestAccountId,
_: Self::Balance,
_: bool,
) -> Result<Self::Balance, DispatchError> {
todo!()
}
}
impl fungibles::Unbalanced<TestAccountId> for TestAssets {
fn set_balance(
_: Self::AssetId,
_: &TestAccountId,
_: Self::Balance,
) -> DispatchResult {
todo!()
}
fn set_total_issuance(_: Self::AssetId, _: Self::Balance) {
todo!()
}
}
struct FeeChargerAssetsHandleRefund;
impl ChargeWeightInFungibles<TestAccountId, TestAssets> for FeeChargerAssetsHandleRefund {
fn charge_weight_in_fungibles(
_: <TestAssets as Inspect<TestAccountId>>::AssetId,
_: Weight,
) -> Result<<TestAssets as Inspect<TestAccountId>>::Balance, XcmError> {
Ok(AMOUNT)
}
}
impl TakeRevenue for FeeChargerAssetsHandleRefund {
fn take_revenue(_: MultiAsset) {}
}
// create new instance
type Trader = TakeFirstAssetTrader<
TestAccountId,
FeeChargerAssetsHandleRefund,
TestAssets,
TestAssets,
FeeChargerAssetsHandleRefund,
>;
let mut trader = <Trader as WeightTrader>::new();
// prepare test data
let asset: MultiAsset = (Here, AMOUNT).into();
let payment = Assets::from(asset.clone());
let weight_to_buy = Weight::from_parts(1_000, 1_000);
// lets do first call (success)
assert_ok!(trader.buy_weight(weight_to_buy, payment.clone()));
// lets do second call (error)
assert_eq!(
trader.buy_weight(weight_to_buy, payment.clone()),
Err(XcmError::NotWithdrawable)
);
}
} }