Skip to content

Commit

Permalink
chore(upgrade): v1.5.0 to v1.6.0 (#2046)
Browse files Browse the repository at this point in the history
- Upgrade Polkadot-sdk to v.1.6.0.
- Update weights to reflect the new version.

Notable Changes:
- [Rename ExportGenesisStateCommand to ExportGenesisHeadCommand
](paritytech/polkadot-sdk#2331)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0)
[Release
Analysis](https://forum.polkadot.network/t/polkadot-release-analysis-v1-6-0/5855/2)

#1841
  • Loading branch information
enddynayn authored Jun 28, 2024
1 parent c0d34b4 commit d4916f2
Show file tree
Hide file tree
Showing 44 changed files with 1,318 additions and 1,417 deletions.
992 changes: 440 additions & 552 deletions Cargo.lock

Large diffs are not rendered by default.

196 changes: 98 additions & 98 deletions Cargo.toml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions e2e/capacity/capacity_rpc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ describe('Capacity RPC', function () {
assert.notEqual(feeDetails.inclusionFee, undefined, 'should have returned a partialFee');
assert(feeDetails.inclusionFee.isSome, 'should have returned a partialFee');
const { baseFee, lenFee, adjustedWeightFee } = feeDetails.inclusionFee.toJSON() as any;
const baseFeeSnapshot = 139448;
const baseFeeSnapshot = 177812;
assert(
Math.abs(baseFee - baseFeeSnapshot) < 10_000,
'The base fee appears to be wrong or have changed more than expected'
);
assert(Math.abs(lenFee - 1170000) < 100, 'The len fee appears to be wrong or have changed more than expected');
// This is comparing stable weight, which has no impact from targeted_fee_adjustment, with actual weights.
assert(
Math.abs(adjustedWeightFee - weightFee.toNumber()) < 10_000,
Math.abs(adjustedWeightFee - weightFee.toNumber()) < 50_000,
'The adjusted weight fee appears to be wrong or have changed more than expected'
);
});
Expand Down
2 changes: 1 addition & 1 deletion node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ polkadot-service = { workspace = true }
# Cumulus
cumulus-client-cli = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
cumulus-client-parachain-inherent = { workspace = true }
cumulus-primitives-core = { workspace = true }

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion node/cli/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub fn inherent_benchmark_data() -> Result<InherentData> {
let d = Duration::from_millis(0);
let timestamp = sp_timestamp::InherentDataProvider::new(d.into());
let mock_para_inherent_provider =
cumulus_primitives_parachain_inherent::MockValidationDataInherentDataProvider {
cumulus_client_parachain_inherent::MockValidationDataInherentDataProvider {
current_para_block: 0,
relay_offset: 1,
relay_blocks_per_para_block: 2,
Expand Down
3 changes: 2 additions & 1 deletion node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ pub enum Subcommand {
PurgeChain(cumulus_client_cli::PurgeChainCmd),

/// Export the genesis state of the parachain.
ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand),
#[command(alias = "export-genesis-state")]
ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand),

/// Export the genesis wasm of the parachain.
ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand),
Expand Down
4 changes: 2 additions & 2 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ pub fn run() -> Result<()> {
Ok(cmd.run(components.client, components.backend, None))
})
},
Some(Subcommand::ExportGenesisState(cmd)) => {
Some(Subcommand::ExportGenesisHead(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| {
let partials = new_partial(&config, false)?;

cmd.run(&*config.chain_spec, &*partials.client)
cmd.run(partials.client)
})
},
Some(Subcommand::ExportGenesisWasm(cmd)) => {
Expand Down
1 change: 0 additions & 1 deletion node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ cumulus-client-consensus-proposer = { workspace = true }
cumulus-client-network = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
cumulus-relay-chain-inprocess-interface = { workspace = true }
cumulus-relay-chain-interface = { workspace = true }
cumulus-relay-chain-minimal-node = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion node/service/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use cumulus_primitives_core::{
relay_chain::{CollatorPair, ValidationCode},
ParaId,
};
use cumulus_primitives_parachain_inherent::MockValidationDataInherentDataProvider;
use cumulus_relay_chain_interface::{OverseerHandle, RelayChainError, RelayChainInterface};

// Substrate Imports
Expand Down
1 change: 1 addition & 0 deletions pallets/capacity/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl frame_system::Config for Test {
type AccountId = u64;
type Lookup = IdentityLookup<Self::AccountId>;
type RuntimeEvent = RuntimeEvent;
type RuntimeTask = RuntimeTask;
type BlockHashCount = ConstU32<250>;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down
44 changes: 22 additions & 22 deletions pallets/capacity/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//! Autogenerated weights for `pallet_capacity`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-06-24, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-06-27, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-173-4-164`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! HOSTNAME: `ip-10-173-11-138`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024`

// Executed Command:
Expand Down Expand Up @@ -61,8 +61,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `6249`
// Minimum execution time: 36_066_000 picoseconds.
Weight::from_parts(38_095_000, 6249)
// Minimum execution time: 35_780_000 picoseconds.
Weight::from_parts(36_737_000, 6249)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
Expand All @@ -78,8 +78,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `285`
// Estimated: `6249`
// Minimum execution time: 25_054_000 picoseconds.
Weight::from_parts(25_867_000, 6249)
// Minimum execution time: 24_827_000 picoseconds.
Weight::from_parts(25_463_000, 6249)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
Expand All @@ -91,8 +91,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `2974`
// Minimum execution time: 2_311_000 picoseconds.
Weight::from_parts(2_434_000, 2974)
// Minimum execution time: 2_272_000 picoseconds.
Weight::from_parts(2_384_000, 2974)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -108,8 +108,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `271`
// Estimated: `5071`
// Minimum execution time: 23_861_000 picoseconds.
Weight::from_parts(24_530_000, 5071)
// Minimum execution time: 23_943_000 picoseconds.
Weight::from_parts(24_949_000, 5071)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
Expand All @@ -119,8 +119,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_376_000 picoseconds.
Weight::from_parts(4_646_000, 0)
// Minimum execution time: 4_069_000 picoseconds.
Weight::from_parts(4_348_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
Expand All @@ -145,8 +145,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `6249`
// Minimum execution time: 36_066_000 picoseconds.
Weight::from_parts(38_095_000, 6249)
// Minimum execution time: 35_780_000 picoseconds.
Weight::from_parts(36_737_000, 6249)
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
Expand All @@ -162,8 +162,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `285`
// Estimated: `6249`
// Minimum execution time: 25_054_000 picoseconds.
Weight::from_parts(25_867_000, 6249)
// Minimum execution time: 24_827_000 picoseconds.
Weight::from_parts(25_463_000, 6249)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
Expand All @@ -175,8 +175,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `2974`
// Minimum execution time: 2_311_000 picoseconds.
Weight::from_parts(2_434_000, 2974)
// Minimum execution time: 2_272_000 picoseconds.
Weight::from_parts(2_384_000, 2974)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand All @@ -192,8 +192,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `271`
// Estimated: `5071`
// Minimum execution time: 23_861_000 picoseconds.
Weight::from_parts(24_530_000, 5071)
// Minimum execution time: 23_943_000 picoseconds.
Weight::from_parts(24_949_000, 5071)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
Expand All @@ -203,8 +203,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_376_000 picoseconds.
Weight::from_parts(4_646_000, 0)
// Minimum execution time: 4_069_000 picoseconds.
Weight::from_parts(4_348_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}
Expand Down
1 change: 1 addition & 0 deletions pallets/frequency-tx-payment/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl frame_system::Config for Test {
type AccountId = u64;
type Lookup = IdentityLookup<Self::AccountId>;
type RuntimeEvent = RuntimeEvent;
type RuntimeTask = RuntimeTask;
type BlockHashCount = ConstU32<250>;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down
28 changes: 14 additions & 14 deletions pallets/frequency-tx-payment/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//! Autogenerated weights for `pallet_frequency_tx_payment`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-06-24, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-06-27, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-173-4-164`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! HOSTNAME: `ip-10-173-11-138`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024`

// Executed Command:
Expand Down Expand Up @@ -44,18 +44,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_122_000 picoseconds.
Weight::from_parts(3_444_000, 0)
// Minimum execution time: 3_154_000 picoseconds.
Weight::from_parts(3_326_000, 0)
}
/// The range of component `n` is `[0, 10]`.
fn pay_with_capacity_batch_all(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_376_000 picoseconds.
Weight::from_parts(6_226_919, 0)
// Standard Error: 9_132
.saturating_add(Weight::from_parts(3_030_627, 0).saturating_mul(n.into()))
// Minimum execution time: 5_117_000 picoseconds.
Weight::from_parts(6_107_676, 0)
// Standard Error: 11_748
.saturating_add(Weight::from_parts(3_023_884, 0).saturating_mul(n.into()))
}
}

Expand All @@ -65,18 +65,18 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_122_000 picoseconds.
Weight::from_parts(3_444_000, 0)
// Minimum execution time: 3_154_000 picoseconds.
Weight::from_parts(3_326_000, 0)
}
/// The range of component `n` is `[0, 10]`.
fn pay_with_capacity_batch_all(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_376_000 picoseconds.
Weight::from_parts(6_226_919, 0)
// Standard Error: 9_132
.saturating_add(Weight::from_parts(3_030_627, 0).saturating_mul(n.into()))
// Minimum execution time: 5_117_000 picoseconds.
Weight::from_parts(6_107_676, 0)
// Standard Error: 11_748
.saturating_add(Weight::from_parts(3_023_884, 0).saturating_mul(n.into()))
}
}

Expand Down
4 changes: 2 additions & 2 deletions pallets/handles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ pub mod pallet {
.map_err(|_| Error::<T>::InvalidMessageSourceAccount)?;

// Validation: The signature is within the mortality window
Self::verify_signature_mortality(payload.expiration.into())?;
Self::verify_signature_mortality(payload.expiration)?;

// Validation: Verify the payload was signed
Self::verify_signed_payload(&proof, &msa_owner_key, payload.encode())?;
Expand Down Expand Up @@ -473,7 +473,7 @@ pub mod pallet {
.map_err(|_| Error::<T>::InvalidMessageSourceAccount)?;

// Validation: The signature is within the mortality window
Self::verify_signature_mortality(payload.expiration.into())?;
Self::verify_signature_mortality(payload.expiration)?;

// Validation: Verify the payload was signed
Self::verify_signed_payload(&proof, &msa_owner_key, payload.encode())?;
Expand Down
1 change: 1 addition & 0 deletions pallets/handles/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Block = Block;
type RuntimeTask = RuntimeTask;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = ConstU32<250>;
type Version = ();
Expand Down
44 changes: 22 additions & 22 deletions pallets/handles/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//! Autogenerated weights for `pallet_handles`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-06-24, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-06-27, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-173-4-164`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! HOSTNAME: `ip-10-173-11-138`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024`

// Executed Command:
Expand Down Expand Up @@ -54,10 +54,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `116`
// Estimated: `5009`
// Minimum execution time: 78_291_000 picoseconds.
Weight::from_parts(80_302_371, 5009)
// Standard Error: 12_151
.saturating_add(Weight::from_parts(65_937, 0).saturating_mul(b.into()))
// Minimum execution time: 64_969_000 picoseconds.
Weight::from_parts(66_133_125, 5009)
// Standard Error: 6_779
.saturating_add(Weight::from_parts(100_429, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
Expand All @@ -74,10 +74,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `222 + b * (1 ±0)`
// Estimated: `5009`
// Minimum execution time: 87_080_000 picoseconds.
Weight::from_parts(88_770_583, 5009)
// Standard Error: 14_395
.saturating_add(Weight::from_parts(169_095, 0).saturating_mul(b.into()))
// Minimum execution time: 73_102_000 picoseconds.
Weight::from_parts(74_258_336, 5009)
// Standard Error: 8_730
.saturating_add(Weight::from_parts(176_259, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
Expand All @@ -91,8 +91,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `231`
// Estimated: `5009`
// Minimum execution time: 19_542_000 picoseconds.
Weight::from_parts(20_398_000, 5009)
// Minimum execution time: 20_395_000 picoseconds.
Weight::from_parts(20_978_000, 5009)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
Expand All @@ -113,10 +113,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `116`
// Estimated: `5009`
// Minimum execution time: 78_291_000 picoseconds.
Weight::from_parts(80_302_371, 5009)
// Standard Error: 12_151
.saturating_add(Weight::from_parts(65_937, 0).saturating_mul(b.into()))
// Minimum execution time: 64_969_000 picoseconds.
Weight::from_parts(66_133_125, 5009)
// Standard Error: 6_779
.saturating_add(Weight::from_parts(100_429, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
Expand All @@ -133,10 +133,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `222 + b * (1 ±0)`
// Estimated: `5009`
// Minimum execution time: 87_080_000 picoseconds.
Weight::from_parts(88_770_583, 5009)
// Standard Error: 14_395
.saturating_add(Weight::from_parts(169_095, 0).saturating_mul(b.into()))
// Minimum execution time: 73_102_000 picoseconds.
Weight::from_parts(74_258_336, 5009)
// Standard Error: 8_730
.saturating_add(Weight::from_parts(176_259, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
Expand All @@ -150,8 +150,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `231`
// Estimated: `5009`
// Minimum execution time: 19_542_000 picoseconds.
Weight::from_parts(20_398_000, 5009)
// Minimum execution time: 20_395_000 picoseconds.
Weight::from_parts(20_978_000, 5009)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
Expand Down
Loading

0 comments on commit d4916f2

Please sign in to comment.