Skip to content

Commit 313b81a

Browse files
committed
chore(genesis): add hrmp to genesis
1 parent 5cef1e3 commit 313b81a

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

chain-spec-generator/src/common.rs

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
1717

1818
use crate::{
19-
relay_chain_specs::{PaseoChainSpec},
19+
relay_chain_specs::PaseoChainSpec,
2020
system_parachains_specs::{
21-
AssetHubPaseoChainSpec,
22-
BridgeHubPaseoChainSpec,CoretimePaseoChainSpec,PeoplePaseoChainSpec,
21+
AssetHubPaseoChainSpec, BridgeHubPaseoChainSpec, CoretimePaseoChainSpec,
22+
PeoplePaseoChainSpec,
2323
},
2424
ChainSpec,
2525
};
@@ -36,16 +36,21 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result<Box<dyn Chain
3636
let chain_spec: EmptyChainSpecWithId = serde_json::from_reader(reader)
3737
.expect("Failed to read 'json' file with ChainSpec configuration");
3838
match &chain_spec.id {
39-
x if x.eq("paseo") | x.eq("paseo-local") | x.eq("paseo-dev") =>
40-
Ok(Box::new(PaseoChainSpec::from_json_file(path)?)),
41-
x if x.starts_with("asset-hub-paseo") =>
42-
Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?)),
43-
x if x.starts_with("paseo-bridge-hub") =>
44-
Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?)),
45-
x if x.starts_with("paseo-coretime") =>
46-
Ok(Box::new(CoretimePaseoChainSpec::from_json_file(path)?)),
47-
x if x.starts_with("paseo-people") =>
48-
Ok(Box::new(PeoplePaseoChainSpec::from_json_file(path)?)),
39+
x if x.eq("paseo") | x.eq("paseo-local") | x.eq("paseo-dev") => {
40+
Ok(Box::new(PaseoChainSpec::from_json_file(path)?))
41+
},
42+
x if x.starts_with("asset-hub-paseo") => {
43+
Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?))
44+
},
45+
x if x.starts_with("paseo-bridge-hub") => {
46+
Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?))
47+
},
48+
x if x.starts_with("paseo-coretime") => {
49+
Ok(Box::new(CoretimePaseoChainSpec::from_json_file(path)?))
50+
},
51+
x if x.starts_with("paseo-people") => {
52+
Ok(Box::new(PeoplePaseoChainSpec::from_json_file(path)?))
53+
},
4954
_ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")),
5055
}
5156
}

chain-spec-generator/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ fn main() -> Result<(), String> {
5656
),
5757
(
5858
"coretime-paseo-local",
59-
Box::new(|| system_parachains_specs::coretime_paseo_local_testnet_config()) as Box<_>,
59+
Box::new(|| system_parachains_specs::coretime_paseo_local_testnet_config())
60+
as Box<_>,
6061
),
6162
(
6263
"coretime-paseo-tot",

relay/paseo/src/genesis_config_presets.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,16 @@ fn default_parachains_host_configuration() -> HostConfiguration<polkadot_primiti
104104
max_head_data_size: 32 * 1024,
105105
max_upward_queue_count: 174172,
106106
max_upward_queue_size: 1024 * 1024,
107-
max_downward_message_size: 1024 * 1024,
108-
max_upward_message_size: 50 * 1024,
107+
max_downward_message_size: 51_200,
108+
max_upward_message_size: 65_531,
109109
max_upward_message_num_per_candidate: 16,
110110
hrmp_sender_deposit: 0,
111111
hrmp_recipient_deposit: 0,
112112
hrmp_channel_max_capacity: 1000,
113113
hrmp_channel_max_total_size: 100 * 1024,
114-
hrmp_max_parachain_inbound_channels: 10,
114+
hrmp_max_parachain_inbound_channels: 30,
115115
hrmp_channel_max_message_size: 1024 * 1024,
116-
hrmp_max_parachain_outbound_channels: 10,
116+
hrmp_max_parachain_outbound_channels: 30,
117117
hrmp_max_message_num_per_candidate: 10,
118118
dispute_period: 6,
119119
no_show_slots: 2,
@@ -204,6 +204,9 @@ fn paseo_testnet_genesis(
204204
"configuration": {
205205
"config": default_parachains_host_configuration(),
206206
},
207+
"hrmp": {
208+
"preopenHrmpChannels": Vec::<(u32,u32,u32,u32)>::new(),
209+
}
207210
})
208211
}
209212

0 commit comments

Comments
 (0)