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
Sassafras primitives #14768
Open
davxy
wants to merge
24
commits into
paritytech:master
Choose a base branch
from
davxy:sassafras-primitives
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sassafras primitives #14768
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
davxy
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
labels
Aug 14, 2023
davxy
requested review from
koute,
skunert,
andresilva,
michalkucharczyk,
bkchr and
a team
August 14, 2023 17:07
skunert
reviewed
Aug 15, 2023
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.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
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-experimental
feature 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
Keystore
trait.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-experimental
feature.I haven't found a better technique, but IMO makes sense to keep sassafras behind the
sassafras-experimental
until is not a bit more mature.Step towards: paritytech/polkadot-sdk#41
Extracted from: #11879