This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add a trie_root_hash
variant for chain specs genesis
#10140
Merged
Merged
Conversation
This file contains 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
tomaka
added
A0-please_review
Pull request needs code review.
B5-clientnoteworthy
C1-low
PR touches the given topic and has a low impact on builders.
labels
Nov 1, 2021
One open question is whether the name |
bkchr
approved these changes
Nov 1, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides bike-shedding it looks good to me :P state_root
is the more common term that is used in the context of Substrate.
Regarding support these kind of chain specs, I think we should create an issue? As Substrate now also supports fast sync/warp sync. I assume that we could also make it work with only the hash for genesis? CC @arkpar
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
arkpar
approved these changes
Nov 1, 2021
23 tasks
grishasobol
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Mar 28, 2022
) * Add a `hash` variant for chain specs * Add doc * Rename to TrieRootHash * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Rustfmt * More cargo fmt I guess * Ok I have to use nightly cargo fmt Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
) * Add a `hash` variant for chain specs * Add doc * Rename to TrieRootHash * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Rustfmt * More cargo fmt I guess * Ok I have to use nightly cargo fmt Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
C1-low
PR touches the given topic and has a low impact on builders.
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.
Right now, chain specs can look like this:
Or like this:
This PR adds a third variant:
Substrate isn't capable of loading chain specs with this
trie_root_hash
variant and will probably not be capable in the near future, but I'm adding this variant anyway because thechain_spec.rs
file of Substrate is kind of the reference of the format of the chain specs.I would like to add support for this variant in smoldot (paritytech/smoldot#1566), and this PR will provide a nice error message for people trying to load "smoldot chain specs" into Substrate.
EDIT: changed
trie_root_hash
tostate_root_hash
after review