This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Add a trie_root_hash variant for chain specs genesis#10140
Merged
bkchr merged 7 commits intoparitytech:masterfrom Nov 3, 2021
Merged
Add a trie_root_hash variant for chain specs genesis#10140bkchr merged 7 commits intoparitytech:masterfrom
trie_root_hash variant for chain specs genesis#10140bkchr merged 7 commits intoparitytech:masterfrom
Conversation
Contributor
Author
|
One open question is whether the name |
bkchr
approved these changes
Nov 1, 2021
Member
bkchr
left a comment
There was a problem hiding this comment.
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>
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.
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_hashvariant and will probably not be capable in the near future, but I'm adding this variant anyway because thechain_spec.rsfile 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_hashtostate_root_hashafter review