Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add genesis presets for glutton westend #7481

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

clangenb
Copy link
Contributor

@clangenb clangenb commented Feb 5, 2025

Extracted from #7473.

Part of: #5704.

I did not use the genesis presets in the parachain-bin, as we rely on passing custom para-ids to the chains specs to launch many glutton chains on one relay chain (is this still true?). This is currently not compatible with the genesis presets, which hard code the para ID, see #7618 and #7384.

However, the parachain-bin genesis config for glutton at least refers to the one from the runtime to prevent duplication.

@clangenb clangenb requested review from a team as code owners February 5, 2025 14:16
@clangenb clangenb changed the title add glutton westend genesis presets add genesis presets for glutton westend Feb 5, 2025
@clangenb clangenb marked this pull request as draft February 19, 2025 21:48
@clangenb clangenb marked this pull request as ready for review February 20, 2025 08:01
@clangenb
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump minor

Copy link
Contributor

@bkontur bkontur left a comment

Choose a reason for hiding this comment

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

@clangenb also please clean cumulus/polkadot-parchain/src/chain_spec/glutton.rs

@clangenb
Copy link
Contributor Author

@clangenb also please clean cumulus/polkadot-parchain/src/chain_spec/glutton.rs

Hmm, I don't think this is a good idea, polkadot-parachain-bin CLI wants to extract the para-id from the command, see

para_id.expect("Must specify parachain id"),
.

But we can't do this with the genesis presets, as the para-id is hardcoded. So I think I should only clean this up, if we decide to remove the option for passing custom para-ids from the CLI. What is your take on this?

@bkontur
Copy link
Contributor

bkontur commented Feb 20, 2025

@clangenb also please clean cumulus/polkadot-parchain/src/chain_spec/glutton.rs

Hmm, I don't think this is a good idea, polkadot-parachain-bin CLI wants to extract the para-id from the command, see

para_id.expect("Must specify parachain id"),

.

But we can't do this with the genesis presets, as the para-id is hardcoded. So I think I should only clean this up, if we decide to remove the option for passing custom para-ids from the CLI. What is your take on this?

I see, so you don't need to use .with_genesis_config_preset_name(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET), but you can still use

.with_genesis_config_patch(glutton_westend_runtime::genesis_config_presets::glutton_westend_genesis(
		para_id,
		vec![Sr25519Keyring::Alice.public().into()],
	))

at least we will use one source of this genesis, and it should be ok, while we are referencing the glutton_westend_runtime::WASM_BINARY above.

@clangenb
Copy link
Contributor Author

Ahh, damn you are right. I could have thought of this too. Thanks. 🚀

@clangenb
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump minor

Copy link
Contributor

Command "prdoc --audience runtime_dev --bump minor" has failed ❌! See logs here

@clangenb
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump minor --force

@clangenb
Copy link
Contributor Author

PR is ready for more reviews. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants