Skip to content

Commit

Permalink
chore(genesis): add genesis hrmp
Browse files Browse the repository at this point in the history
  • Loading branch information
al3mart committed Dec 9, 2024
1 parent e4252b2 commit 871469a
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions relay/paseo/src/genesis_config_presets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ use crate::*;
use babe_primitives::AuthorityId as BabeId;
use pallet_staking::{Forcing, StakerStatus};
use paseo_runtime_constants::currency::UNITS as PAS;
use polkadot_primitives::{AccountPublic, AssignmentId, AsyncBackingParams, ExecutorParam::{MaxMemoryPages, PvfExecTimeout}, PvfExecKind};
use polkadot_primitives::{
AccountPublic, AssignmentId, AsyncBackingParams,
ExecutorParam::{MaxMemoryPages, PvfExecTimeout},
PvfExecKind,
};
use runtime_parachains::configuration::HostConfiguration;
use sp_core::{sr25519, Pair, Public};
use sp_genesis_builder::PresetId;
Expand Down Expand Up @@ -89,11 +93,13 @@ fn testnet_accounts() -> Vec<AccountId> {
fn default_parachains_host_configuration() -> HostConfiguration<polkadot_primitives::BlockNumber> {
use polkadot_primitives::{MAX_CODE_SIZE, MAX_POV_SIZE};

let executor_parameteres = ExecutorParams::from(&[
MaxMemoryPages(8192),
PvfExecTimeout(PvfExecKind::Backing, 2500),
PvfExecTimeout(PvfExecKind::Approval, 15000),
][..]);
let executor_parameteres = ExecutorParams::from(
&[
MaxMemoryPages(8192),
PvfExecTimeout(PvfExecKind::Backing, 2500),
PvfExecTimeout(PvfExecKind::Approval, 15000),
][..],
);

runtime_parachains::configuration::HostConfiguration {
validation_upgrade_cooldown: 2u32,
Expand All @@ -103,17 +109,17 @@ fn default_parachains_host_configuration() -> HostConfiguration<polkadot_primiti
max_pov_size: MAX_POV_SIZE,
max_head_data_size: 32 * 1024,
max_upward_queue_count: 174172,
max_upward_queue_size: 1024 * 1024,
max_downward_message_size: 1024 * 1024,
max_upward_queue_size: 65_531,
max_downward_message_size: 51_200,
max_upward_message_size: 50 * 1024,
max_upward_message_num_per_candidate: 16,
hrmp_sender_deposit: 0,
hrmp_recipient_deposit: 0,
hrmp_channel_max_capacity: 1000,
hrmp_channel_max_total_size: 100 * 1024,
hrmp_max_parachain_inbound_channels: 10,
hrmp_channel_max_message_size: 1024 * 1024,
hrmp_max_parachain_outbound_channels: 10,
hrmp_max_parachain_inbound_channels: 30,
hrmp_channel_max_message_size: 100 * 1024,
hrmp_max_parachain_outbound_channels: 30,
hrmp_max_message_num_per_candidate: 10,
dispute_period: 6,
no_show_slots: 2,
Expand Down Expand Up @@ -204,6 +210,9 @@ fn paseo_testnet_genesis(
"configuration": {
"config": default_parachains_host_configuration(),
},
"hrmp": {
"preopenHrmpChannels": Vec::<(u32,u32,u32,u32)>::new(),
}
})
}

Expand Down

0 comments on commit 871469a

Please sign in to comment.