Skip to content

Commit 8c625a5

Browse files
authored
update polkadot-v0.9.26 (#793)
* update to v0.9.26 * fix build and test * change GeneralKey parameter type to WeakNBoundedVec * update cumulus * clear_prefix replace remove_prefix
1 parent 5ebbf66 commit 8c625a5

File tree

42 files changed

+324
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+324
-308
lines changed

Cargo.dev.toml

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

asset-registry/Cargo.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,37 @@ serde = { version = "1.0.136", optional = true }
1313
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] }
1414

1515
# substrate
16-
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
17-
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
18-
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
19-
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
16+
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
17+
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
18+
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
19+
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
2020

2121
# polkadot
22-
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.25" }
23-
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.25" }
24-
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.25" }
25-
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.25" }
22+
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }
23+
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }
24+
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }
25+
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }
2626

2727
# orml
2828
orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }
2929

3030
[dev-dependencies]
3131
# substrate
32-
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
33-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
34-
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
32+
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
33+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
34+
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
3535

3636
# cumulus
37-
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
38-
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
39-
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
40-
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
41-
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
37+
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
38+
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
39+
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
40+
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
41+
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
4242

4343
# polkadot
44-
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25" }
45-
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25" }
46-
xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25" }
44+
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
45+
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
46+
xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
4747

4848
# orml
4949
orml-tokens = { path = "../tokens" }

asset-registry/src/mock/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ impl Convert<CurrencyId, Option<MultiLocation>> for CurrencyIdConvert {
4242
fn convert(id: CurrencyId) -> Option<MultiLocation> {
4343
match id {
4444
CurrencyId::R => Some(Parent.into()),
45-
CurrencyId::A => Some((Parent, Parachain(1), GeneralKey("A".into())).into()),
46-
CurrencyId::A1 => Some((Parent, Parachain(1), GeneralKey("A1".into())).into()),
47-
CurrencyId::B => Some((Parent, Parachain(2), GeneralKey("B".into())).into()),
48-
CurrencyId::B1 => Some((Parent, Parachain(2), GeneralKey("B1".into())).into()),
49-
CurrencyId::B2 => Some((Parent, Parachain(2), GeneralKey("B2".into())).into()),
50-
CurrencyId::D => Some((Parent, Parachain(4), GeneralKey("D".into())).into()),
45+
CurrencyId::A => Some((Parent, Parachain(1), GeneralKey(b"A".to_vec().try_into().unwrap())).into()),
46+
CurrencyId::A1 => Some((Parent, Parachain(1), GeneralKey(b"A1".to_vec().try_into().unwrap())).into()),
47+
CurrencyId::B => Some((Parent, Parachain(2), GeneralKey(b"B".to_vec().try_into().unwrap())).into()),
48+
CurrencyId::B1 => Some((Parent, Parachain(2), GeneralKey(b"B1".to_vec().try_into().unwrap())).into()),
49+
CurrencyId::B2 => Some((Parent, Parachain(2), GeneralKey(b"B2".to_vec().try_into().unwrap())).into()),
50+
CurrencyId::D => Some((Parent, Parachain(4), GeneralKey(b"D".to_vec().try_into().unwrap())).into()),
5151
CurrencyId::RegisteredAsset(id) => AssetRegistry::multilocation(&id).unwrap_or_default(),
5252
}
5353
}

asset-registry/src/tests.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn dummy_metadata() -> AssetMetadata<<para::Runtime as orml_asset_registry::Conf
4646
name: "para A native token".as_bytes().to_vec(),
4747
symbol: "paraA".as_bytes().to_vec(),
4848
existential_deposit: 0,
49-
location: Some(MultiLocation::new(1, X2(Parachain(1), GeneralKey(vec![0]))).into()),
49+
location: Some(MultiLocation::new(1, X2(Parachain(1), GeneralKey(vec![0].try_into().unwrap()))).into()),
5050
additional: CustomMetadata {
5151
fee_per_second: 1_000_000_000_000,
5252
},
@@ -65,7 +65,7 @@ fn send_self_parachain_asset_to_sibling() {
6565
});
6666

6767
ParaA::execute_with(|| {
68-
metadata.location = Some(MultiLocation::new(0, X1(GeneralKey(vec![0]))).into());
68+
metadata.location = Some(MultiLocation::new(0, X1(GeneralKey(vec![0].try_into().unwrap()))).into());
6969
AssetRegistry::register_asset(Origin::root(), metadata, None).unwrap();
7070

7171
assert_ok!(ParaTokens::deposit(CurrencyId::RegisteredAsset(1), &ALICE, 1_000));
@@ -117,7 +117,7 @@ fn send_sibling_asset_to_non_reserve_sibling() {
117117
AssetRegistry::register_asset(
118118
Origin::root(),
119119
AssetMetadata {
120-
location: Some(MultiLocation::new(1, X2(Parachain(2), GeneralKey(vec![0]))).into()),
120+
location: Some(MultiLocation::new(1, X2(Parachain(2), GeneralKey(vec![0].try_into().unwrap()))).into()),
121121
..dummy_metadata()
122122
},
123123
None,
@@ -130,7 +130,7 @@ fn send_sibling_asset_to_non_reserve_sibling() {
130130
AssetRegistry::register_asset(
131131
Origin::root(),
132132
AssetMetadata {
133-
location: Some(MultiLocation::new(0, X1(GeneralKey(vec![0]))).into()),
133+
location: Some(MultiLocation::new(0, X1(GeneralKey(vec![0].try_into().unwrap()))).into()),
134134
..dummy_metadata()
135135
},
136136
None,
@@ -147,7 +147,7 @@ fn send_sibling_asset_to_non_reserve_sibling() {
147147
AssetRegistry::register_asset(
148148
Origin::root(),
149149
AssetMetadata {
150-
location: Some(MultiLocation::new(1, X2(Parachain(2), GeneralKey(vec![0]))).into()),
150+
location: Some(MultiLocation::new(1, X2(Parachain(2), GeneralKey(vec![0].try_into().unwrap()))).into()),
151151
..dummy_metadata()
152152
},
153153
None,
@@ -206,7 +206,7 @@ fn test_sequential_id_normal_behavior() {
206206
let metadata2 = AssetMetadata {
207207
name: "para A native token 2".as_bytes().to_vec(),
208208
symbol: "paraA2".as_bytes().to_vec(),
209-
location: Some(MultiLocation::new(1, X2(Parachain(1), GeneralKey(vec![1]))).into()),
209+
location: Some(MultiLocation::new(1, X2(Parachain(1), GeneralKey(vec![1].try_into().unwrap()))).into()),
210210
..dummy_metadata()
211211
};
212212
AssetRegistry::register_asset(Origin::root(), metadata1.clone(), None).unwrap();
@@ -243,7 +243,7 @@ fn test_fixed_rate_asset_trader() {
243243

244244
ParaA::execute_with(|| {
245245
let para_a_metadata = AssetMetadata {
246-
location: Some(MultiLocation::new(0, X1(GeneralKey(vec![0]))).into()),
246+
location: Some(MultiLocation::new(0, X1(GeneralKey(vec![0].try_into().unwrap()))).into()),
247247
..metadata.clone()
248248
};
249249
AssetRegistry::register_asset(Origin::root(), para_a_metadata, None).unwrap();
@@ -387,7 +387,7 @@ fn test_update_metadata_works() {
387387
name: "para A native token2".as_bytes().to_vec(),
388388
symbol: "paraA2".as_bytes().to_vec(),
389389
existential_deposit: 1,
390-
location: Some(MultiLocation::new(1, X2(Parachain(1), GeneralKey(vec![1]))).into()),
390+
location: Some(MultiLocation::new(1, X2(Parachain(1), GeneralKey(vec![1].try_into().unwrap()))).into()),
391391
additional: CustomMetadata {
392392
fee_per_second: 2_000_000_000_000,
393393
},

auction/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive"
1212
serde = { version = "1.0.136", optional = true }
1313
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
1414

15-
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
16-
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
17-
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
18-
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
15+
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
16+
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
17+
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
18+
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
1919

2020
orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }
2121

2222
[dev-dependencies]
23-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
24-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
23+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
24+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
2525

2626
[features]
2727
default = ["std"]

authority/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive"
1212
serde = { version = "1.0.136", optional = true }
1313
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
1414

15-
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
16-
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
17-
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
18-
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
19-
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
15+
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
16+
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
17+
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
18+
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
19+
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
2020

2121
[dev-dependencies]
22-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
23-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
24-
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
22+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
23+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
24+
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
2525

2626
[features]
2727
default = ["std"]

authority/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#![allow(clippy::borrowed_box)]
2020
#![allow(clippy::unused_unit)]
2121

22+
use codec::MaxEncodedLen;
2223
use frame_support::{
2324
dispatch::PostDispatchInfo,
2425
pallet_prelude::*,
@@ -43,7 +44,7 @@ mod weights;
4344
pub use weights::WeightInfo;
4445

4546
/// A delayed origin. Can only be dispatched via `dispatch_as` with a delay.
46-
#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo)]
47+
#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)]
4748
pub struct DelayedOrigin<BlockNumber, PalletsOrigin> {
4849
/// Number of blocks that this call have been delayed.
4950
pub delay: BlockNumber,

bencher/Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ hash-db = { version = "0.15.2", default-features = false, optional = true }
2626
bencher-procedural = { path = "bencher-procedural", default-features = false }
2727
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
2828

29-
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
30-
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
31-
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
32-
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
33-
sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.25" }
34-
sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.25" }
35-
sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.25" }
36-
sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.25" }
37-
sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.25" }
38-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
39-
sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
40-
sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.25" }
29+
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
30+
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
31+
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
32+
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
33+
sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.26" }
34+
sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.26" }
35+
sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.26" }
36+
sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.26" }
37+
sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.26" }
38+
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
39+
sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
40+
sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.26" }
4141

4242
[features]
4343
default = ["std"]

bencher/bencher-procedural/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ proc-macro = true
1010

1111
[dependencies]
1212
proc-macro2 = "1.0.40"
13-
quote = "1.0.18"
13+
quote = "1.0.20"
1414
syn = { version = "1.0.98", features = ["full"] }
1515

1616
[features]

bencher/test/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ required-features = ["bench"]
1515
serde = { version = "1.0.136", optional = true }
1616
scale-info = { version = "2.1.2", default-features = false, features = ["derive"] }
1717
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
18-
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
19-
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
20-
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
21-
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
22-
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
18+
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
19+
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
20+
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
21+
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
22+
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
2323
orml-bencher = { path = "..", default-features = false }
2424
orml-weight-meter = { path = "../../weight-meter", default-features = false }
2525

2626
[dev-dependencies]
27-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
27+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
2828

2929
[features]
3030
default = ["std"]

0 commit comments

Comments
 (0)