Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

some tweaks to rococo-local #3996

Merged
2 commits merged into from
Oct 2, 2021
Merged
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
14 changes: 11 additions & 3 deletions node/service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,10 @@ pub fn rococo_testnet_genesis(
authority_discovery: rococo_runtime::AuthorityDiscoveryConfig { keys: vec![] },
sudo: rococo_runtime::SudoConfig { key: root_key.clone() },
configuration: rococo_runtime::ConfigurationConfig {
config: default_parachains_host_configuration(),
config: polkadot_runtime_parachains::configuration::HostConfiguration {
max_validators_per_core: Some(1),
..default_parachains_host_configuration()
},
},
hrmp: Default::default(),
paras: rococo_runtime::ParasConfig { paras: vec![] },
Expand Down Expand Up @@ -1820,13 +1823,18 @@ pub fn westend_local_testnet_config() -> Result<WestendChainSpec, String> {
fn rococo_local_testnet_genesis(wasm_binary: &[u8]) -> rococo_runtime::GenesisConfig {
rococo_testnet_genesis(
wasm_binary,
vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")],
vec![
get_authority_keys_from_seed("Alice"),
get_authority_keys_from_seed("Bob"),
get_authority_keys_from_seed("Charlie"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably break tons of stuff, like tutorials and what else. Everything assumes 2 authorities. Could you please revert this.

You could just copy the function and have a different chain spec for your testing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the catch! Do you think we could reuse wococo-local for that as we currently disable bridges modules in rococo runtime, so it doesn't serve its original purpose?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have used a custom chain spec name (as you can use whatever you want), but as wococo isn't used currently it should be fine as well.

get_authority_keys_from_seed("Dave"),
],
get_account_id_from_seed::<sr25519::Public>("Alice"),
None,
)
}

/// Rococo local testnet config (multivalidator Alice + Bob)
/// Rococo local testnet config (multivalidator Alice + Bob + Charlie + Dave)
#[cfg(feature = "rococo-native")]
pub fn rococo_local_testnet_config() -> Result<RococoChainSpec, String> {
let wasm_binary = rococo::WASM_BINARY.ok_or("Rococo development wasm not available")?;
Expand Down