Skip to content

Commit

Permalink
chore(upgrade): v1.11.0 to v1.13.0
Browse files Browse the repository at this point in the history
- Upgrade Polkadot-sdk 1.10.0 to 1.13.0
- Update weights to reflect the new version.1.13.0

Notable Changes:
Polkadot-sdk 1.12.0
- [Improve MockValidationDataInherentDataProvider to support async backing](paritytech/polkadot-sdk#4442)
- [Balances-Pallet add burn_allow_death extrinsic](paritytech/polkadot-sdk#3964)
- [Add Async Backing to Parachain Template](paritytech/polkadot-sdk#4295)

Polkadot-sdk 1.13.0
- [DeprecatedRuntimeGenesisConfig generic type parameter in GenericChainSpec struct](paritytech/polkadot-sdk#4410)
- [Move the `para_id` from `MockXcmConfig` to `MockValidationDataInherentDataProvider` to make it more prominent](paritytech/polkadot-sdk#4555)
- [Remove parameterized-consensus-hook feature](paritytech/polkadot-sdk#4380)

For more details, please refer to:
- [Polkadot-sdk release 1.12.0](https://github.com/paritytech/polkadot-sdk/releases/polkadot-v1.12.0)
- [Polkadot-sdk release 1.13.0](https://github.com/paritytech/polkadot-sdk/releases/polkadot-v1.13.0)
- [Async Backing](https://wiki.polkadot.network/docs/maintain-guides-async-backing)

issue-2025
issue-1983
  • Loading branch information
enddynayn committed Sep 4, 2024
1 parent 978d6af commit f475528
Show file tree
Hide file tree
Showing 57 changed files with 2,539 additions and 2,355 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rust 1.70
rust 1.77.0
make 4.3
cmake 3.24.1
1,221 changes: 612 additions & 609 deletions Cargo.lock

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions Cargo.toml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ start:
start-paseo-relay:
./scripts/init.sh start-paseo-relay-chain


start-paseo-collator-alice:
./scripts/init.sh start-paseo-collator-alice

start-paseo-collator-bob:
./scripts/init.sh start-paseo-collator-bob

start-frequency:
./scripts/init.sh start-frequency

Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ make start-interval

### Mixed Terminal/Docker

This option runs one collator node as local host process and two relay chain validator nodes in each own docker container.
This option runs two collator nodes as local host processes and two relay chain validator nodes, each in its own docker container.

1. Start relay chain validator nodes.

```sh
make start-relay
make start-paseo-relay
```

1. Register a new parachain slot (parachain id) for Frequency. _Note, if parachain was
Expand All @@ -232,13 +232,16 @@ This option runs one collator node as local host process and two relay chain val
make register
```

1. Start Frequency as parachain. This step will generate genesis/wasm and start the parachain collator.
1. Start Frequency as parachain with a single collator.

```sh
make start-frequency
make start-paseo-collator-alice
```
```sh
make start-paseo-collator-bob
```

1. Onboard Frequency to the relay chain
1. Generate genesis/wasm and onboard Frequency to the relay chain.
```sh
make onboard
```
Expand Down
10 changes: 5 additions & 5 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "3"
services:
relay_paseo_alice:
container_name: alice
image: "parity/polkadot:v1.1.0"
image: "parity/polkadot:v1.13.0"
platform: linux/x86_64
hostname: relay_alice
ports:
Expand All @@ -26,12 +26,12 @@ services:
--rpc-cors=all
--rpc-methods=Unsafe
--alice
--log="main"
-ltxpool=trace
restart: unless-stopped

relay_paseo_bob:
container_name: bob
image: "parity/polkadot:v1.1.0"
image: "parity/polkadot:v1.13.0"
platform: linux/x86_64
hostname: relay_bob
ports:
Expand Down Expand Up @@ -72,5 +72,5 @@ services:
- "30333:30333" # p2p port
- "9944:9944" # ws and rpc port
depends_on:
- relay_alice
- relay_bob
- relay_paseo_alice
- relay_paseo_bob
4 changes: 3 additions & 1 deletion node/cli/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@ pub fn inherent_benchmark_data() -> Result<InherentData> {
let timestamp = sp_timestamp::InherentDataProvider::new(d.into());
let mock_para_inherent_provider =
cumulus_client_parachain_inherent::MockValidationDataInherentDataProvider {
para_id: 1000.into(),
current_para_block_head: Some(cumulus_primitives_core::relay_chain::HeadData::default()),
current_para_block: 0,
relay_offset: 1,
relay_blocks_per_para_block: 2,
relay_blocks_per_para_block: 1,
xcm_config: Default::default(),
raw_downward_messages: Default::default(),
raw_horizontal_messages: Default::default(),
Expand Down
3 changes: 3 additions & 0 deletions node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ use cli_opt::SealingMode;
/// Sub-commands supported by the collator.
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
/// Key management cli utilities
#[command(subcommand)]
Key(sc_cli::KeySubcommand),
/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),

Expand Down
1 change: 1 addition & 0 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ pub fn run() -> Result<()> {
let cli = Cli::from_args();

match &cli.subcommand {
Some(Subcommand::Key(cmd)) => cmd.run(&cli),
Some(Subcommand::BuildSpec(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
Expand Down
2 changes: 1 addition & 1 deletion node/service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use sp_core::{Pair, Public};
use sp_runtime::traits::{IdentifyAccount, Verify};

/// Dummy chain spec for building and checking
pub type DummyChainSpec = sc_service::GenericChainSpec<(), Extensions>;
pub type DummyChainSpec = sc_service::GenericChainSpec<Extensions>;

#[cfg(feature = "frequency")]
pub mod frequency;
Expand Down
3 changes: 1 addition & 2 deletions node/service/src/chain_spec/frequency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ use sp_core::ByteArray;
use sp_runtime::traits::AccountIdConversion;

/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec =
sc_service::GenericChainSpec<frequency_runtime::RuntimeGenesisConfig, Extensions>;
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;

use super::{get_properties, Extensions};

Expand Down
3 changes: 1 addition & 2 deletions node/service/src/chain_spec/frequency_dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ use sc_service::ChainType;
use sp_core::sr25519;
use sp_runtime::traits::AccountIdConversion;
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec =
sc_service::GenericChainSpec<frequency_runtime::RuntimeGenesisConfig, Extensions>;
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;

use super::{get_account_id_from_seed, get_collator_keys_from_seed, get_properties, Extensions};

Expand Down
5 changes: 2 additions & 3 deletions node/service/src/chain_spec/frequency_paseo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ use sp_runtime::traits::AccountIdConversion;
use super::{get_account_id_from_seed, get_collator_keys_from_seed, get_properties, Extensions};

/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec =
sc_service::GenericChainSpec<frequency_runtime::RuntimeGenesisConfig, Extensions>;
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;
use sp_core::sr25519;

// Generic chain spec, in case when we don't have the native runtime.
pub type RelayChainSpec = sc_service::GenericChainSpec<(), RelayChainExtensions>;
pub type RelayChainSpec = sc_service::GenericChainSpec<RelayChainExtensions>;

#[allow(clippy::unwrap_used)]
/// Generates the Frequency Paseo chain spec from the raw json
Expand Down
9 changes: 4 additions & 5 deletions node/service/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ use cumulus_relay_chain_interface::{OverseerHandle, RelayChainError, RelayChainI
use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
use futures::FutureExt;
use sc_consensus::{ImportQueue, LongestChain};
use sc_executor::{
HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY,
};
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};

use sc_network::{NetworkBackend, NetworkBlock, NetworkService};
use sc_network_sync::SyncingService;
Expand All @@ -50,6 +48,8 @@ use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_blockchain::HeaderBackend;
use sp_keystore::KeystorePtr;

use common_runtime::prod_or_testnet_or_local;

type FullBackend = TFullBackend<Block>;

type MaybeFullSelectChain = Option<LongestChain<FullBackend, Block>>;
Expand Down Expand Up @@ -468,8 +468,7 @@ fn start_consensus(
relay_chain_slot_duration,
proposer,
collator_service,
// Very limited proposal time.
authoring_duration: Duration::from_millis(500),
authoring_duration: Duration::from_millis(prod_or_testnet_or_local!(500, 2000, 2000)),
reinitialize: false,
};

Expand Down
45 changes: 23 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 32.0.0
//! DATE: 2024-08-15, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-08-30, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-173-11-47`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! HOSTNAME: `ip-10-173-4-203`, 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: `5259`
// Minimum execution time: 37_829_000 picoseconds.
Weight::from_parts(38_703_000, 5259)
// Minimum execution time: 38_328_000 picoseconds.
Weight::from_parts(39_315_000, 5259)
.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: `5259`
// Minimum execution time: 25_467_000 picoseconds.
Weight::from_parts(26_355_000, 5259)
// Minimum execution time: 25_785_000 picoseconds.
Weight::from_parts(26_043_000, 5259)
.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: `1984`
// Minimum execution time: 2_198_000 picoseconds.
Weight::from_parts(2_311_000, 1984)
// Minimum execution time: 2_141_000 picoseconds.
Weight::from_parts(2_199_000, 1984)
.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: `4081`
// Minimum execution time: 25_269_000 picoseconds.
Weight::from_parts(26_226_000, 4081)
// Minimum execution time: 24_152_000 picoseconds.
Weight::from_parts(24_619_000, 4081)
.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_325_000 picoseconds.
Weight::from_parts(7_213_000, 0)
// Minimum execution time: 4_092_000 picoseconds.
Weight::from_parts(4_454_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: `5259`
// Minimum execution time: 37_829_000 picoseconds.
Weight::from_parts(38_703_000, 5259)
// Minimum execution time: 38_328_000 picoseconds.
Weight::from_parts(39_315_000, 5259)
.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: `5259`
// Minimum execution time: 25_467_000 picoseconds.
Weight::from_parts(26_355_000, 5259)
// Minimum execution time: 25_785_000 picoseconds.
Weight::from_parts(26_043_000, 5259)
.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: `1984`
// Minimum execution time: 2_198_000 picoseconds.
Weight::from_parts(2_311_000, 1984)
// Minimum execution time: 2_141_000 picoseconds.
Weight::from_parts(2_199_000, 1984)
.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: `4081`
// Minimum execution time: 25_269_000 picoseconds.
Weight::from_parts(26_226_000, 4081)
// Minimum execution time: 24_152_000 picoseconds.
Weight::from_parts(24_619_000, 4081)
.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_325_000 picoseconds.
Weight::from_parts(7_213_000, 0)
// Minimum execution time: 4_092_000 picoseconds.
Weight::from_parts(4_454_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}
Expand All @@ -216,6 +216,7 @@ mod tests {
use common_runtime::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
use common_runtime::weights::extrinsic_weights::ExtrinsicBaseWeight;

#[allow(dead_code)]
struct BlockWeights;
impl Get<frame_system::limits::BlockWeights> for BlockWeights {
fn get() -> frame_system::limits::BlockWeights {
Expand Down
29 changes: 15 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 32.0.0
//! DATE: 2024-08-15, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-08-30, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-173-11-47`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! HOSTNAME: `ip-10-173-4-203`, 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_192_000 picoseconds.
Weight::from_parts(3_333_000, 0)
// Minimum execution time: 3_026_000 picoseconds.
Weight::from_parts(3_409_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_242_000 picoseconds.
Weight::from_parts(6_274_375, 0)
// Standard Error: 11_416
.saturating_add(Weight::from_parts(3_172_765, 0).saturating_mul(n.into()))
// Minimum execution time: 5_023_000 picoseconds.
Weight::from_parts(6_041_214, 0)
// Standard Error: 11_551
.saturating_add(Weight::from_parts(3_047_367, 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_192_000 picoseconds.
Weight::from_parts(3_333_000, 0)
// Minimum execution time: 3_026_000 picoseconds.
Weight::from_parts(3_409_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_242_000 picoseconds.
Weight::from_parts(6_274_375, 0)
// Standard Error: 11_416
.saturating_add(Weight::from_parts(3_172_765, 0).saturating_mul(n.into()))
// Minimum execution time: 5_023_000 picoseconds.
Weight::from_parts(6_041_214, 0)
// Standard Error: 11_551
.saturating_add(Weight::from_parts(3_047_367, 0).saturating_mul(n.into()))
}
}

Expand All @@ -87,6 +87,7 @@ mod tests {
use common_runtime::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
use common_runtime::weights::extrinsic_weights::ExtrinsicBaseWeight;

#[allow(dead_code)]
struct BlockWeights;
impl Get<frame_system::limits::BlockWeights> for BlockWeights {
fn get() -> frame_system::limits::BlockWeights {
Expand Down
Loading

0 comments on commit f475528

Please sign in to comment.