This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Sassafras primitives#14768
Closed
davxy wants to merge 24 commits intoparitytech:masterfrom
davxy:sassafras-primitives
Closed
Sassafras primitives#14768davxy wants to merge 24 commits intoparitytech:masterfrom davxy:sassafras-primitives
davxy wants to merge 24 commits intoparitytech:masterfrom
davxy:sassafras-primitives
Conversation
skunert
reviewed
Aug 15, 2023
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.
This PR introduces a new crate with the primitives required by Sassafras consensus.
Quoting the crate
README:Nevertheless, the strategy here is to incrementally drain the main PR by upstreaming smaller components in order to make the overall protocol inclusion and analysis more manageable.
The structures and functions were found to satisfy the requirements of the protocol.
A more in depth analysis of the structures obviously requires to dig into the client and frame pallets in the main PR.
Because minor changes may be required, IMO is useful to keep this stuff behind an experimental feature flag, mostly to explicitly assert that the this is still a WiP.
This crate requires to enable
bandersnatch-experimentalfeature in some of its dependencies.This feature ends up being transitively enabled in:
sp-consensus-sassafras → sp-application-crypto → sp-io → sp-keystore
Thus the bandersnatch experimental api is exposed in the
Keystoretrait.Follows that we require to expose these functions implementation in the client keystore as well.
At this stage, by default, we don't want this.
IMO is better to keep Sassafras crates (and thus bandersnatch feature) out of workspace default build and optionally enable them via the
sassafras-experimentalfeature.I haven't found a better technique, but IMO makes sense to keep sassafras behind the
sassafras-experimentaluntil is not a bit more mature.Step towards: paritytech/polkadot-sdk#41
Extracted from: #11879