This repository was archived by the owner on Nov 15, 2023. It is now read-only.
subkey: display SS58 encoding of public key - #8674
Merged
2 commits merged intoApr 29, 2021
Merged
2 commits merged into
2 commits merged into
Conversation
Contributor
|
Thanks for this @tomusdrw ! 🙇🏼 I will update the devhub once this lands. Will this also apply to nodes CLI |
This was referenced Apr 27, 2021
…utput (#8694) * Update Cargo.toml * update cargo, readme for subkey Co-authored-by: Dan Shields <danwshields@gmail.com>
Member
|
bot merge |
|
Trying merge. |
|
Bot will approve on the behalf of @bkchr, since they are a team lead, in an attempt to reach the minimum approval count |
ghost
approved these changes
Apr 29, 2021
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In case of sr25519 and ed25519 crypto, the account id matches public key, hence SS58 encoded account-id address is the same as SS58 public key encoding.
In case of ECDSA, we blake2 the public key to get the address (due to size difference 33 vs 32 bytes), so the SS58 encoding was different.
Why is SS58 encoding of public key necessary at all?
Default Ser/De implementation for public keys is using SS58 encoding, hence every time we use public keys in encoded form we are going to need it's SS58 encoding. A notable case is chain spec JSON file and encoding of session keys (most importantly BEEFY).
This PR adds display of SS58 encoding of raw public key to make it easy to add BEEFY keys to chain spec json file.
CC @nukemandan