Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
transaction_version: 14,
state_version: 1,
};

Expand All @@ -130,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
transaction_version: 14,
state_version: 0,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
transaction_version: 14,
state_version: 0,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
transaction_version: 4,
state_version: 1,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
transaction_version: 4,
state_version: 1,
};

Expand Down
2 changes: 1 addition & 1 deletion cumulus/polkadot-parachain/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-parachain-bin"
version = "1.1.0"
version = "1.4.0"
authors.workspace = true
build = "build.rs"
edition.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rust-version = "1.64.0"
readme = "README.md"
authors.workspace = true
edition.workspace = true
version = "1.1.0"
version = "1.4.0"
default-run = "polkadot"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub use disputes::{
/// relatively rare.
///
/// The associated worker binaries should use the same version as the node that spawns them.
pub const NODE_VERSION: &'static str = "1.1.0";
pub const NODE_VERSION: &'static str = "1.4.0";

// For a 16-ary Merkle Prefix Trie, we can expect at most 16 32-byte hashes per node
// plus some overhead:
Expand Down
3 changes: 2 additions & 1 deletion polkadot/node/service/chain-specs/westend.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"forkBlocks": null,
"badBlocks": [
"0x53849a2121fe81fde85859dcebe8cc9c37791c01a9702ce65615b1dcb8ac53e5",
"0x66535350bf0d031dc15a0b6ee20165c0cd7ea49fec85685915f732e24d69e141"
"0x66535350bf0d031dc15a0b6ee20165c0cd7ea49fec85685915f732e24d69e141",
"0xcd1416e10d41f7a69e7b3bfaa718aafb85c71e06595089ff80afe243846f0662"
],
"consensusEngine": null,
"genesis": {
Expand Down
11 changes: 9 additions & 2 deletions polkadot/node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,10 @@ where
client: client.clone(),
select_chain: select_chain.clone(),
create_inherent_data_providers: move |_, ()| async move {
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
// timestamp: 2023-11-27T11:56:30.000Z | slot: 283514365
let timestamp = sp_timestamp::InherentDataProvider::new(sp_timestamp::Timestamp::new(
1701086190000,
));

let slot =
sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
Expand Down Expand Up @@ -1154,7 +1157,11 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
parent,
);

let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
// dummy
// timestamp: 2023-11-27T11:56:30.000Z | slot: 283514365
let timestamp = sp_timestamp::InherentDataProvider::new(
sp_timestamp::Timestamp::new(1701086190000),
);

let slot =
sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
Expand Down
8 changes: 4 additions & 4 deletions polkadot/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 22,
transaction_version: 24,
state_version: 1,
};

Expand Down Expand Up @@ -1617,7 +1617,7 @@ mod benches {
[pallet_asset_rate, AssetRate]
[pallet_whitelist, Whitelist]
// XCM
[pallet_xcm, PalletXcmExtrinsicsBenchmark::<Runtime>]
[pallet_xcm, PalletXcmExtrinsiscsBenchmark::<Runtime>]
[pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::<Runtime>]
[pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::<Runtime>]
);
Expand Down Expand Up @@ -2096,7 +2096,7 @@ sp_api::impl_runtime_apis! {
use frame_system_benchmarking::Pallet as SystemBench;
use frame_benchmarking::baseline::Pallet as Baseline;

use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark;

let mut list = Vec::<BenchmarkList>::new();
list_benchmarks!(list, extra);
Expand All @@ -2115,7 +2115,7 @@ sp_api::impl_runtime_apis! {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError};
use frame_system_benchmarking::Pallet as SystemBench;
use frame_benchmarking::baseline::Pallet as Baseline;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark;
use sp_storage::TrackedStorageKey;
use xcm::latest::prelude::*;
use xcm_config::{
Expand Down
59 changes: 54 additions & 5 deletions polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 22,
transaction_version: 24,
state_version: 1,
};

Expand Down Expand Up @@ -425,6 +425,17 @@ parameter_types! {
pub const Offset: BlockNumber = 0;
}

impl_opaque_keys! {
pub struct OldSessionKeys {
pub grandpa: Grandpa,
pub babe: Babe,
pub im_online: ImOnline,
pub para_validator: Initializer,
pub para_assignment: ParaSessionInfo,
pub authority_discovery: AuthorityDiscovery,
}
}

impl_opaque_keys! {
pub struct SessionKeys {
pub grandpa: Grandpa,
Expand All @@ -437,6 +448,32 @@ impl_opaque_keys! {
}
}

// remove this when removing `OldSessionKeys`
fn transform_session_keys(v: AccountId, old: OldSessionKeys) -> SessionKeys {
SessionKeys {
grandpa: old.grandpa,
babe: old.babe,
im_online: old.im_online,
para_validator: old.para_validator,
para_assignment: old.para_assignment,
authority_discovery: old.authority_discovery,
beefy: {
// From Session::upgrade_keys():
//
// Care should be taken that the raw versions of the
// added keys are unique for every `ValidatorId, KeyTypeId` combination.
// This is an invariant that the session pallet typically maintains internally.
//
// So, produce a dummy value that's unique for the `ValidatorId, KeyTypeId` combination.
let mut id: BeefyId = sp_application_crypto::ecdsa::Public::from_raw([0u8; 33]).into();
let id_raw: &mut [u8] = id.as_mut();
id_raw[1..33].copy_from_slice(v.as_ref());
id_raw[0..4].copy_from_slice(b"beef");
id
},
}
}

impl pallet_session::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ValidatorId = AccountId;
Expand Down Expand Up @@ -1523,6 +1560,16 @@ pub type Migrations = migrations::Unreleased;
pub mod migrations {
use super::*;

/// Upgrade Session keys to include BEEFY key.
/// When this is removed, should also remove `OldSessionKeys`.
pub struct UpgradeSessionKeys;
impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys {
fn on_runtime_upgrade() -> Weight {
Session::upgrade_keys::<OldSessionKeys, _>(transform_session_keys);
Perbill::from_percent(50) * BlockWeights::get().max_block
}
}

/// Unreleased migrations. Add new ones here:
pub type Unreleased = (
pallet_im_online::migration::v1::Migration<Runtime>,
Expand All @@ -1531,12 +1578,14 @@ pub mod migrations {
assigned_slots::migration::v1::MigrateToV1<Runtime>,
parachains_scheduler::migration::v1::MigrateToV1<Runtime>,
parachains_configuration::migration::v8::MigrateToV8<Runtime>,
UpgradeSessionKeys,
parachains_configuration::migration::v9::MigrateToV9<Runtime>,
paras_registrar::migration::MigrateToV1<Runtime, ()>,
pallet_nomination_pools::migration::versioned_migrations::V5toV6<Runtime>,
pallet_referenda::migration::v1::MigrateV0ToV1<Runtime, ()>,
pallet_nomination_pools::migration::versioned_migrations::V6ToV7<Runtime>,
pallet_grandpa::migrations::MigrateV4ToV5<Runtime>,
parachains_configuration::migration::v10::MigrateToV10<Runtime>,
pallet_nomination_pools::migration::versioned::V7ToV8<Runtime>,
);
}

Expand Down Expand Up @@ -1605,7 +1654,7 @@ mod benches {
[pallet_whitelist, Whitelist]
[pallet_asset_rate, AssetRate]
// XCM
[pallet_xcm, PalletXcmExtrinsicsBenchmark::<Runtime>]
[pallet_xcm, PalletXcmExtrinsiscsBenchmark::<Runtime>]
// NOTE: Make sure you point to the individual modules below.
[pallet_xcm_benchmarks::fungible, XcmBalances]
[pallet_xcm_benchmarks::generic, XcmGeneric]
Expand Down Expand Up @@ -2128,7 +2177,7 @@ sp_api::impl_runtime_apis! {
use pallet_session_benchmarking::Pallet as SessionBench;
use pallet_offences_benchmarking::Pallet as OffencesBench;
use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark;
use frame_system_benchmarking::Pallet as SystemBench;
use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench;

Expand Down Expand Up @@ -2156,7 +2205,7 @@ sp_api::impl_runtime_apis! {
use pallet_session_benchmarking::Pallet as SessionBench;
use pallet_offences_benchmarking::Pallet as OffencesBench;
use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark;
use frame_system_benchmarking::Pallet as SystemBench;
use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench;

Expand Down
4 changes: 2 additions & 2 deletions substrate/client/consensus/slots/src/slots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<B: BlockT> SlotInfo<B> {
duration,
chain_head,
block_size_limit,
ends_at: Instant::now() + time_until_next_slot(duration),
ends_at: Instant::now() + duration,
}
}
}
Expand All @@ -106,7 +106,7 @@ impl<Block, SC, IDP> Slots<Block, SC, IDP> {
Slots {
last_slot: 0.into(),
slot_duration,
until_next_slot: None,
until_next_slot: Some(Delay::new(Duration::from_secs(300))),
create_inherent_data_providers,
select_chain,
_phantom: Default::default(),
Expand Down