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

Chain-spec Builder ignores SS58 prefix for invulnerables/session keys when generating chain-specs #5271

Open
seadanda opened this issue Aug 7, 2024 · 0 comments
Labels
T0-node This PR/Issue is related to the topic “node”.

Comments

@seadanda
Copy link
Contributor

seadanda commented Aug 7, 2024

I added the coretime-kusama live preset here, but when it outputs the chain-spec it ignores the SS58 Prefix configured for the chain and prints the 5... i.e. substrate generic addresses for the invulnerables in the resulting json.

AFAICT this does not affect the chain spec in how it runs, since it can still get the account ID from this. Running a node with a chain-spec generated like this seems to sync fine.

It's the same account as shown when you check with subkey (subkey inspect -n kusama <account_id>) but just the wrong representation.

Can use string representation directly in the genesis in combination with to_ss58check_with_version but this means constructing a String representation directly in the json, instead of the real structs SessionKeys { .. } etc. which could lead to maintenance headaches.

It would be nice to get this working in general

Summary of discussion with @michalkucharczyk in chat:
Original chain-specs do not use the prefix and public key bytes are the same nevertheless
Could also post-process in the GenesisBuilder subsystem on the runtime side (as part of get_preset function)
Could be nice to include SS58 Prefix in runtime itself, then could also be used in presets.

@seadanda seadanda added the T0-node This PR/Issue is related to the topic “node”. label Aug 7, 2024
fellowship-merge-bot bot added a commit to polkadot-fellows/runtimes that referenced this issue Aug 14, 2024
…chains (#432)

Add the invulnerables set directly to the preset and generate
chain-specs for the "live" (production) networks directly from the
`chain-spec-builder` instead of using a bash script to post-process
these from generated local chain-specs.

The Kusama Coretime Chain is added here for completeness and a sanity
check with the original genesis chain-specs.

Note that the SS58 prefix is ignored when generating the chain-specs, as
noted in paritytech/polkadot-sdk#5271

Supersedes seadanda#4 since it seems
you can't change the target branch of a PR across forks.

Note that this branch was made from the tip of another, so the commit
history includes changes from that branch.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Tom <tsenseless@gmail.com>
Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

No branches or pull requests

1 participant