Skip to content
Merged
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
1,446 changes: 760 additions & 686 deletions runtimes/Cargo.lock

Large diffs are not rendered by default.

115 changes: 59 additions & 56 deletions runtimes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,76 +19,79 @@ members = [

ziggy = { version = "1.5.0", default-features = false }

polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
asset-hub-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
asset-hub-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
# bridge-hub-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.2", default-features = false }
collectives-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
coretime-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
people-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
collectives-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
coretime-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
people-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }

staging-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
asset-hub-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
staging-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
asset-hub-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
# bridge-hub-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.2", default-features = false }
coretime-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
coretime-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
# encointer-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.2", default-features = false }
glutton-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
people-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
glutton-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
people-kusama-runtime = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }

system-parachains-constants = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
polkadot-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
kusama-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
system-parachains-constants = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
polkadot-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
kusama-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }

codec = { version = "3.7.5", features = ["derive", "max-encoded-len"], default-features = false, package = "parity-scale-codec" }
hex = "0.4.3"
scale-info = { default-features = false, version = "2.11.6", features = ["std"] }

staging-xcm = { default-features = false , version = "20.0.0" }
staging-xcm = { default-features = false , version = "21.0.0" }

parachains-common = { default-features = false , version = "26.0.0" }
parachains-common = { default-features = false , version = "27.1.0" }

frame-support = { default-features = false, version = "44.0.0" }
frame-system = { default-features = false, version = "44.0.0" }
frame-support = { default-features = false, version = "45.1.0" }
frame-system = { default-features = false, version = "45.0.0" }
frame-metadata = { default-features = false, version = "23.0.1", features = ["current", "decode", "std"] }

sp-runtime = { default-features = false, version = "43.0.0" }
sp-state-machine = { version = "0.48.0", default-features = false }
sp-consensus-aura = { default-features = false, version = "0.44.0" }
sp-trie = { default-features = false, version = "41.1.0" }
sp-core = { default-features = false, version = "38.1.0" }
sp-authority-discovery = { default-features = false, version = "38.0.0" }
sp-consensus-babe = { default-features = false, version = "0.44.0" }
sp-consensus-beefy = { default-features = false, version = "26.0.0" }
sp-application-crypto = { default-features = false, version = "42.0.0" }
sp-runtime = { default-features = false, version = "45.0.0" }
sp-state-machine = { version = "0.49.0", default-features = false }
sp-consensus-aura = { default-features = false, version = "0.46.0" }
sp-trie = { default-features = false, version = "42.0.1" }
sp-core = { default-features = false, version = "39.0.0" }
sp-authority-discovery = { default-features = false, version = "40.0.0" }
sp-consensus-babe = { default-features = false, version = "0.46.0" }
sp-consensus-beefy = { default-features = false, version = "28.0.0" }
sp-application-crypto = { default-features = false, version = "44.0.0" }

pallet-timestamp = { default-features = false, version = "43.0.0" }
pallet-balances = { default-features = false, version = "45.0.0" }
pallet-assets = { default-features = false, version = "47.0.0" }
pallet-xcm = { default-features = false, version = "24.0.0" }
pallet-utility = { default-features = false, version = "44.0.0" }
pallet-proxy = { default-features = false, version = "44.0.0" }
pallet-multisig = { default-features = false, version = "44.0.0" }
pallet-vesting = { default-features = false, version = "44.0.0" }
pallet-remote-proxy = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.0.7", default-features = false }
pallet-recovery = { default-features = false, version = "44.0.0" }
pallet-whitelist = { default-features = false, version = "43.0.0" }
pallet-broker = { default-features = false, version = "0.23.0" }
pallet-staking-async-ah-client = { default-features = false, version = "0.6.0" }
pallet-bags-list = { default-features = false, version = "43.0.0" }
pallet-bounties = { default-features = false, version = "43.0.0" }
pallet-grandpa = { default-features = false, version = "44.0.1" }
pallet-identity = { default-features = false, version = "44.0.0" }
pallet-referenda = { default-features = false, version = "44.0.0" }
pallet-society = { default-features = false, version = "44.0.0" }
pallet-staking = { default-features = false, version = "44.0.1" }
pallet-treasury = { default-features = false, version = "43.0.0" }
pallet-revive = { default-features = false, version = "0.11.3" }
pallet-timestamp = { default-features = false, version = "44.0.0" }
pallet-balances = { default-features = false, version = "46.0.0" }
pallet-assets = { default-features = false, version = "48.1.0" }
pallet-xcm = { default-features = false, version = "25.0.0" }
pallet-utility = { default-features = false, version = "45.0.0" }
pallet-proxy = { default-features = false, version = "45.0.0" }
pallet-multisig = { default-features = false, version = "45.0.0" }
pallet-vesting = { default-features = false, version = "45.0.0" }
pallet-remote-proxy = { git = "https://github.com/polkadot-fellows/runtimes.git", tag = "v2.1.1", default-features = false }
pallet-recovery = { default-features = false, version = "45.0.0" }
pallet-whitelist = { default-features = false, version = "44.0.0" }
pallet-broker = { default-features = false, version = "0.24.1" }
pallet-staking-async-ah-client = { default-features = false, version = "0.7.2" }
pallet-bags-list = { default-features = false, version = "44.0.1" }
pallet-bounties = { default-features = false, version = "44.0.0" }
pallet-grandpa = { default-features = false, version = "45.0.0" }
pallet-identity = { default-features = false, version = "45.0.0" }
pallet-referenda = { default-features = false, version = "45.0.0" }
pallet-society = { default-features = false, version = "45.1.0" }
pallet-staking = { default-features = false, version = "45.1.0" }
pallet-treasury = { default-features = false, version = "44.0.0" }
pallet-revive = { default-features = false, version = "0.12.2" }

cumulus-primitives-core = { default-features = false , version = "0.22.0" }
cumulus-primitives-parachain-inherent = { default-features = false , version = "0.22.0" }
cumulus-pallet-parachain-system = { default-features = false, version = "0.24.1" }
cumulus-test-relay-sproof-builder = { default-features = false , version = "0.23.1" }
cumulus-primitives-core = { default-features = false , version = "0.23.0" }
cumulus-primitives-parachain-inherent = { default-features = false , version = "0.23.0" }
cumulus-pallet-parachain-system = { default-features = false, version = "0.25.0" }
cumulus-test-relay-sproof-builder = { default-features = false , version = "0.24.0" }

polkadot-parachain-primitives = { default-features = false, version = "18.0.0" }
polkadot-primitives = { default-features = false, version = "20.0.0" }
polkadot-runtime-parachains = { version = "23.0.1", default-features = false }
polkadot-runtime-common = { version = "23.0.1", default-features = false }
polkadot-parachain-primitives = { default-features = false, version = "20.0.0" }
polkadot-primitives = { default-features = false, version = "22.0.0" }
polkadot-runtime-parachains = { version = "24.0.0", default-features = false }
polkadot-runtime-common = { version = "24.0.0", default-features = false }

[patch.crates-io]
ark-vrf = { git = "https://github.com/davxy/ark-vrf", tag = "v0.1.0" }
1 change: 1 addition & 0 deletions runtimes/asset-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pallet-remote-proxy = { workspace = true }
pallet-recovery = { workspace = true }
pallet-whitelist = { workspace = true }
pallet-revive = { workspace = true }
pallet-referenda = { workspace = true }

cumulus-primitives-core = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
Expand Down
18 changes: 12 additions & 6 deletions runtimes/asset-hub-kusama/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {
let mut elapsed: Duration = Duration::ZERO;

BasicExternalities::execute_with_storage(&mut genesis.clone(), || {
// Vec<(lapse, origin, extrinsic)>
let extrinsics: Vec<(u8, u8, RuntimeCall)> =
// Vec<(advance_block, origin, extrinsic)>
let extrinsics: Vec<(bool, u8, RuntimeCall)> =
iter::from_fn(|| DecodeLimit::decode_with_depth_limit(64, &mut extrinsic_data).ok())
.filter(|(_, _, x): &(_, _, RuntimeCall)| {
!recursively_find_call(x.clone(), |call| {
Expand All @@ -163,6 +163,13 @@ fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {
|| matches!(
&call,
RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. })
) || matches!(
&call,
RuntimeCall::PolkadotXcm(pallet_xcm::Call::execute { .. })
)
|| matches!(
&call,
RuntimeCall::Referenda(pallet_referenda::Call::submit { .. })
)
})
})
Expand All @@ -176,16 +183,15 @@ fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {

initialize_block(block, None);

for (lapse, origin, extrinsic) in extrinsics {
if lapse > 0 {
for (advance_block, origin, extrinsic) in extrinsics {
if advance_block {
let prev_header = finalize_block(elapsed);

// We update our state variables
block += u32::from(lapse);
block += 1;
weight = Weight::zero();
elapsed = Duration::ZERO;

// We start the next block
initialize_block(block, Some(&prev_header));
}

Expand Down
12 changes: 5 additions & 7 deletions runtimes/asset-hub-polkadot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,10 @@ fn recursively_find_call(call: RuntimeCall, matches_on: fn(RuntimeCall) -> bool)
fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {
// We build the list of extrinsics we will execute
let mut extrinsic_data = data;
// Vec<(lapse, origin, extrinsic)>

// Vec<(advance_block, origin, extrinsic)>
BasicExternalities::execute_with_storage(&mut genesis.clone(), || {
#[allow(deprecated)]
let extrinsics: Vec<(u8, u8, RuntimeCall)> =
let extrinsics: Vec<(bool, u8, RuntimeCall)> =
iter::from_fn(|| DecodeLimit::decode_with_depth_limit(64, &mut extrinsic_data).ok())
.filter(|(_, _, x): &(_, _, RuntimeCall)| {
!recursively_find_call(x.clone(), |call| {
Expand All @@ -200,16 +199,15 @@ fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {

initialize_block(block, None);

for (lapse, origin, extrinsic) in extrinsics {
if lapse > 0 {
for (advance_block, origin, extrinsic) in extrinsics {
if advance_block {
let prev_header = finalize_block(elapsed);

// We update our state variables
block += u32::from(lapse);
block += 1;
weight = Weight::zero();
elapsed = Duration::ZERO;

// We start the next block
initialize_block(block, Some(&prev_header));
}

Expand Down
9 changes: 5 additions & 4 deletions runtimes/coretime-kusama/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ fn recursively_find_call(call: RuntimeCall, matches_on: fn(RuntimeCall) -> bool)
fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {
// We build the list of extrinsics we will execute
let mut extrinsic_data = data;
let extrinsics: Vec<(/* lapse */ u8, /* origin */ u8, RuntimeCall)> =
// Vec<(advance_block, origin, extrinsic)>
let extrinsics: Vec<(bool, u8, RuntimeCall)> =
iter::from_fn(|| DecodeLimit::decode_with_depth_limit(64, &mut extrinsic_data).ok())
.filter(|(_, _, x): &(_, _, RuntimeCall)| {
!recursively_find_call(x.clone(), |call| {
Expand All @@ -156,12 +157,12 @@ fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {
BasicExternalities::execute_with_storage(&mut genesis.clone(), || {
let initial_total_issuance = pallet_balances::TotalIssuance::<Runtime>::get();

for (lapse, origin, extrinsic) in extrinsics {
if lapse > 0 {
for (advance_block, origin, extrinsic) in extrinsics {
if advance_block {
let prev_header = finalize_block(elapsed);

// We update our state variables
block += u32::from(lapse) * 393;
block += 1;
weight = Weight::zero();
elapsed = Duration::ZERO;

Expand Down
63 changes: 31 additions & 32 deletions runtimes/kusama/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use codec::{DecodeLimit, Encode};
use frame_support::{
dispatch::GetDispatchInfo,
pallet_prelude::Weight,
traits::{IntegrityTest, OriginTrait, TryState, TryStateSelect},
traits::{IntegrityTest, TryState, TryStateSelect},
weights::constants::WEIGHT_REF_TIME_PER_SECOND,
};
use frame_system::Account;
Expand Down Expand Up @@ -169,35 +169,34 @@ fn recursively_find_call(call: RuntimeCall, matches_on: fn(RuntimeCall) -> bool)
}

fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {
let mut extrinsic_data = data;
// We build the list of extrinsics we will execute
#[allow(deprecated)]
let extrinsics: Vec<(/* lapse */ u8, /* origin */ u8, RuntimeCall)> = iter::from_fn(|| {
DecodeLimit::decode_with_depth_limit(64, &mut extrinsic_data).ok()
})
.filter(|(_, _, x): &(_, _, RuntimeCall)| {
!recursively_find_call(x.clone(), |call| {
matches!(&call, RuntimeCall::System(_))
|| matches!(
&call,
RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. })
)
|| matches!(&call, RuntimeCall::VoterList(pallet_bags_list::Call::rebag { .. }))
|| matches!(
&call,
RuntimeCall::Treasury(pallet_treasury::Call::spend { valid_from, .. })
if valid_from.as_ref().copied().unwrap_or(0) >= 4_200_000_000
)
|| matches!(
&call,
RuntimeCall::Referenda(pallet_referenda::Call::submit {
proposal_origin: matching_origin,
..
}) if RuntimeOrigin::from(*matching_origin.clone()).caller() == RuntimeOrigin::root().caller()
)
let mut extrinsic_data = data;
// Vec<(advance_block, origin, extrinsic)>
let extrinsics: Vec<(bool, u8, RuntimeCall)> =
iter::from_fn(|| DecodeLimit::decode_with_depth_limit(64, &mut extrinsic_data).ok())
.filter(|(_, _, x): &(_, _, RuntimeCall)| {
!recursively_find_call(x.clone(), |call| {
matches!(&call, RuntimeCall::System(_))
|| matches!(
&call,
RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. })
)
|| matches!(
&call,
RuntimeCall::VoterList(pallet_bags_list::Call::rebag { .. })
)
|| matches!(
&call,
RuntimeCall::Treasury(pallet_treasury::Call::spend { valid_from, .. })
if valid_from.as_ref().copied().unwrap_or(0) >= 4_200_000_000
)
|| matches!(
&call,
RuntimeCall::Referenda(pallet_referenda::Call::submit { .. })
)
})
})
})
.collect();
.collect();
if extrinsics.is_empty() {
return;
}
Expand All @@ -211,11 +210,11 @@ fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) {

initialize_block(block);

for (lapse, origin, extrinsic) in extrinsics {
if lapse > 0 {
for (advance_block, origin, extrinsic) in extrinsics {
if advance_block {
finalize_block(elapsed);

block += u32::from(lapse) * 393; // 393 * 256 = 100608 which nearly corresponds to a week
block += 1;
weight = 0.into();
elapsed = Duration::ZERO;

Expand Down Expand Up @@ -311,7 +310,7 @@ fn initialize_block(block: u32) {
println!(" setting bitfields");
ParaInherent::enter(
RuntimeOrigin::none(),
polkadot_primitives::vstaging::InherentData {
polkadot_primitives::InherentData {
parent_header: grandparent_header,
backed_candidates: Vec::default(),
bitfields: Vec::default(),
Expand Down
Loading
Loading