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

Use chain_spec_path to detect asset hub polkadot #1500

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

svyatonik
Copy link
Contributor

There's no way now to use polkadot-parachain with --chain=asset-hub-polkadot-local, so we need to use chain spec path. But zombienet only uses the chain parameter to detect polkadot AH and generate proper keystore files (for which workaround is to explicitly specify aura_ed in keystore_key_types) + properly modify chain validators in spec (for which there's no easy workaround).

@pepoviola
Copy link
Collaborator

Hi @svyatonik thanks for your contribution, I think this is related to the new runtimes repo right? We add support for using a custom external tool to build the chain-spec here.
If this is the case you can follow the instructions from #1449 (comment) and use the chain-spec-generator tool from the runtimes repo.

Please let me know if this cover your case?
Thanks!

@pepoviola pepoviola added the question Further information is requested label Nov 9, 2023
@svyatonik
Copy link
Contributor Author

Nope, that doesn't solve our problem :) I'm also using that tool, but because there were no support of chain_spec_generator for parachains, I had to write a script that emulated old polkadot-parachain behavior and either starts chain-spec-generator or the actual polkadot-parachain depending on args.

The "core" problem is that the Asset Hub Polkadot is a special case and when zombienet is generating/patching chain spec for this chain, it does two things:

  1. it writes ed keys for Aura to the keystore;
  2. and yet it writes address, associated with ed key to the chain spec (validators set).

Without those two points, the local Polkadot Asset Hub simply won't produce blocks (as I said in description, there's a workaround for (1), but no easy workaround for (2)). Before fellowship repo, the polkadot-parachain was supporting the --chain=asset-hub-polkadot-local argument && everyone used that. But now with AH moved to fellowship, we have to provide external chain spec, so it doesn't work anymore. So the parachain.chain here and parachain.chain here are undefined and this hack doesn't work. So what I suggest is to also check the chain_spec_path there, where we could actually use the asset-hub-polkadot name to trigger it.

@pepoviola
Copy link
Collaborator

Hi @svyatonik, thanks for the reply 👍 . @NachoPal add system parachains in this pr polkadot-fellows/runtimes#81 but isn't yet merged, I will merge this and then we can review if the chain-spec-generator works as expected as external generator set in chain_spec_command.
Again, thanks for your contribution!!

@pepoviola pepoviola merged commit e48b6dc into main Nov 10, 2023
11 checks passed
@pepoviola pepoviola deleted the use-chain-spec-path-to-detect-asset-hub-polkadot branch November 10, 2023 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants