Skip to content

Commit bb673a1

Browse files
authored
remove useless migrations, use same version where possible, remove years from copyrights (#435)
1 parent 7e7f76c commit bb673a1

40 files changed

+39
-544
lines changed

HEADER-APACHE2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of Substrate.
22

3-
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
3+
// Copyright (C) Parity Technologies (UK) Ltd.
44
// SPDX-License-Identifier: Apache-2.0
55

66
// Licensed under the Apache License, Version 2.0 (the "License");

e2e/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ kate-recovery = { git = "https://github.com/availproject/avail-core", branch = "
1616
kate = { git = "https://github.com/availproject/avail-core", branch = "main" }
1717
avail-core = { git = "https://github.com/availproject/avail-core", branch = "main" }
1818
binary-merkle-tree = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch" }
19-
serde = { version = "1.0.163", default-features = false, features = ["derive", "alloc"] }
19+
serde = { version = "1.0.195", default-features = false, features = ["derive", "alloc"] }
2020

2121

2222
# Dependency `subxt` uses it's own 'version' of sp-core so we need to patch it :)

node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ clap = { version = "4.4.17", features = ["derive"], optional = true }
3232
clap-num = { version = "1.1.1", optional = true }
3333
jsonrpsee = { version = "0.16.2", features = ["server"] }
3434
futures = "0.3.21"
35-
serde = { version = "1.0.126", features = ["derive"] }
35+
serde = { version = "1.0.195", features = ["derive"] }
3636
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
3737
lru = "0.7.2"
3838
log = "0.4.17"

node/src/benchmarking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of Substrate.
22

3-
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
3+
// Copyright (C) Parity Technologies (UK) Ltd.
44
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
55

66
// This program is free software: you can redistribute it and/or modify

pallets/dactr/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ log = { version = "0.4.20", default-features = false }
2121
static_assertions = "1.1.0"
2222

2323
# Substrate
24-
serde = { version = "1.0.126", optional = true, features = ["derive"] }
24+
serde = { version = "1.0.195", optional = true, features = ["derive"] }
2525
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = [
2626
"derive",
2727
] }

pallets/dactr/src/weights.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of Substrate.
22

3-
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
3+
// Copyright (C) Parity Technologies (UK) Ltd.
44
// SPDX-License-Identifier: Apache-2.0
55

66
// Licensed under the Apache License, Version 2.0 (the "License");

pallets/mandate/src/weights.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of Substrate.
22

3-
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
3+
// Copyright (C) Parity Technologies (UK) Ltd.
44
// SPDX-License-Identifier: Apache-2.0
55

66
// Licensed under the Apache License, Version 2.0 (the "License");

pallets/mocked_runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ scale-info = { version = "2.5.0", features = ["derive"] }
1717
codec = { package = "parity-scale-codec", version = "3", features = ["derive"] }
1818
parity-util-mem = { version = "0.12.0", features = ["primitive-types"] }
1919
derive_more = "0.99.17"
20-
serde = { version = "1.0.121", features = ["derive"] }
20+
serde = { version = "1.0.195", features = ["derive"] }
2121

2222
frame-support = { workspace = true, default-features = false }
2323
sp-runtime = { workspace = true, default-features = false }

pallets/system/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ethabi = { version = "18.0.0", default-features = false }
3131
# Substrate
3232
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
3333
scale-info = { version = "2.5.0", default-features = false, features = ["derive", "serde"] }
34-
serde = { version = "1.0.188", default-features = false, features = ["derive", "alloc"], optional = true }
34+
serde = { version = "1.0.195", default-features = false, features = ["derive", "alloc"], optional = true }
3535
frame-support = { workspace = true, default-features = false }
3636
sp-core = { workspace = true, default-features = false, features = ["serde"] }
3737
sp-io = { workspace = true, default-features = false }

pallets/system/src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ pub mod weights;
130130
pub mod extrinsic_len;
131131
pub use extrinsic_len::{ExtrinsicLen, PaddedExtrinsicLen};
132132

133-
pub mod migrations;
134-
135133
// Backward compatible re-export.
136134
pub use extensions::{
137135
check_genesis::CheckGenesis,
@@ -453,10 +451,6 @@ pub mod pallet {
453451
.expect("The weights are invalid.");
454452
});
455453
}
456-
457-
fn on_runtime_upgrade() -> Weight {
458-
migrations::migrate::<T>()
459-
}
460454
}
461455

462456
#[pallet::call]
@@ -776,7 +770,7 @@ pub mod pallet {
776770
sp_io::storage::set(well_known_keys::EXTRINSIC_INDEX, &0u32.encode());
777771
<DynamicBlockLength<T>>::put(&self.block_length);
778772

779-
StorageVersion::new(1).put::<Pallet<T>>();
773+
StorageVersion::new(3).put::<Pallet<T>>();
780774
}
781775
}
782776
}

pallets/system/src/migrations/mod.rs

Lines changed: 0 additions & 168 deletions
This file was deleted.

pallets/system/src/migrations/v1.rs

Lines changed: 0 additions & 36 deletions
This file was deleted.

pallets/system/src/migrations/v2.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

pallets/system/src/weights.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of Substrate.
22

3-
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
3+
// Copyright (C) Parity Technologies (UK) Ltd.
44
// SPDX-License-Identifier: Apache-2.0
55

66
// Licensed under the Apache License, Version 2.0 (the "License");

pallets/transaction-payment/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ targets = ["x86_64-unknown-linux-gnu"]
1616
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
1717
"derive",
1818
] }
19-
log = { version = "0.4.17", default-features = false }
19+
log = { version = "0.4.20", default-features = false }
2020
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
21-
serde = { version = "1.0.163", optional = true }
21+
serde = { version = "1.0.195", optional = true }
2222
frame-support = { workspace = true, default-features = false }
2323
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
2424
sp-core = { workspace = true, default-features = false }

pallets/transaction-payment/asset-tx-payment/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ frame-benchmarking = { version = "4.0.0-dev", workspace = true, default-features
2727
# Other dependencies
2828
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
2929
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
30-
serde = { version = "1.0.163", optional = true }
30+
serde = { version = "1.0.195", optional = true }
3131

3232
[dev-dependencies]
3333
serde_json = "1.0.85"

pallets/vector/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ark-std = { version = "0.4.0", default-features = false }
2626
ark-serialize = { version = "0.4.0", features = ["derive"], default-features = false }
2727
ark-ff = { version = "0.3.0", default-features = false }
2828
ark-snark = "0.4.0"
29-
serde = { version = "1.0.149", default-features = false, features = ["derive", "alloc"] }
29+
serde = { version = "1.0.195", default-features = false, features = ["derive", "alloc"] }
3030
serde_json = { version = "1.0.89", default-features = false, features = ["alloc"] }
3131
sha2 = { version = "0.10.8", default-features = false }
3232
log = "0.4.20"

pallets/vector/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,22 @@ pub mod pallet {
209209
pub type RotateVerificationKey<T: Config> =
210210
StorageValue<_, Option<BoundedVec<u8, ConstU32<10_000>>>, ValueQuery>;
211211

212+
/// Genesis validator root, used to check initialization
212213
#[pallet::storage]
213214
#[pallet::getter(fn genesis_validator_root)]
214215
pub type GenesisValidatorRoot<T: Config> = StorageValue<_, H256, ValueQuery>;
215216

217+
/// Genesis timestamp, used to check initialization
216218
#[pallet::storage]
217219
#[pallet::getter(fn genesis_timestamp)]
218220
pub type GenesisTimestamp<T: Config> = StorageValue<_, u64, ValueQuery>;
219221

222+
/// Seconds per slot, used to check initialization
220223
#[pallet::storage]
221224
#[pallet::getter(fn seconds_per_slot)]
222225
pub type SecondsPerSlot<T: Config> = StorageValue<_, u64, ValueQuery>;
223226

227+
/// Source chain id, used to check initialization
224228
#[pallet::storage]
225229
#[pallet::getter(fn source_chain_id)]
226230
pub type SourceChainId<T: Config> = StorageValue<_, u64, ValueQuery>;

pallets/vector/src/weights.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of Substrate.
22

3-
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
3+
// Copyright (C) Parity Technologies (UK) Ltd.
44
// SPDX-License-Identifier: Apache-2.0
55

66
// Licensed under the Apache License, Version 2.0 (the "License");

0 commit comments

Comments
 (0)