Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sassafras Consensus Pallet #1577

Merged
merged 132 commits into from
Dec 1, 2023
Merged

Sassafras Consensus Pallet #1577

merged 132 commits into from
Dec 1, 2023

Conversation

davxy
Copy link
Member

@davxy davxy commented Sep 14, 2023

This PR introduces the pallet for Sassafras consensus.

Note for reviewers

ignore the modifications to substrate/bin/node-template folder (see before merge actions)

Before merge actions:

  • remove patches from Cargo.toml
  • revert modifications applied to substrate/bin/node-template (used only to run benches)
  • remove benchmark script (benchmark.sh)

Non Goals

The pallet delivers only the bare-bones and doesn't deliver support for auxiliary functionalities such as equivocation report and support for epoch change via session pallet.

These functionalities were drafted in the main PR, but IMO is better to introduce this auxiliary stuff in a follow up PR and after client code.

About SRS initialization

SRS material in thehttps://github.com//issues/41 context of the pallet is maintained by the RingContext struct.

Proper construction of SRS is out of the scope of this PR and will follow an RFC dedicated to the topic to discuss the trusted setup machinery (aka ceremony).

However, regardless of the origin of the SRS, we need a way to write the constructed data into the pallet's storage.

This will be addressed in a dedicated, follow-up, PR. Currently the pallet tests are using a test string.


@paritytech paritytech deleted a comment from paritytech-cicd-pr Sep 14, 2023
@paritytech paritytech deleted a comment from paritytech-cicd-pr Sep 14, 2023
@davxy davxy mentioned this pull request Sep 14, 2023
5 tasks
@davxy davxy added the T0-node This PR/Issue is related to the topic “node”. label Sep 14, 2023
@davxy davxy self-assigned this Sep 14, 2023
Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a full expert. However, left some review as requested :P

Please revert the changes to the node template. There is really no need to add the Sassafras stuff there. Otherwise left some comments in the pallet. I think the most problematic point being the validate_unsigned that prevents nodes from outside the current active set, but part of the next active set to send their tickets.

benchmark.sh Outdated Show resolved Hide resolved
substrate/bin/node-template/node/Cargo.toml Outdated Show resolved Hide resolved
substrate/frame/sassafras/src/mock.rs Show resolved Hide resolved
substrate/primitives/core/src/bandersnatch.rs Show resolved Hide resolved
substrate/frame/sassafras/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/sassafras/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/sassafras/src/lib.rs Show resolved Hide resolved
substrate/frame/sassafras/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/sassafras/src/lib.rs Show resolved Hide resolved
substrate/frame/sassafras/src/lib.rs Show resolved Hide resolved
Co-authored-by: Bastian Köcher <git@kchr.de>
@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 29, 2023 15:39
@paritytech paritytech deleted a comment from paritytech-cicd-pr Nov 30, 2023
@paritytech paritytech deleted a comment from paritytech-cicd-pr Dec 1, 2023
@davxy davxy merged commit 095f4bd into master Dec 1, 2023
115 of 117 checks passed
@davxy davxy deleted the davxy-sassafras-pallet branch December 1, 2023 15:39
bkchr added a commit that referenced this pull request Dec 6, 2023
This will make more sense after
#2524 since the
schnorrkel type for VRF outputs is also renamed in the latest version.
Can be reviewed independently though.

Can be merged after #1577
so that there is less pain for @davxy.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
@Polkadot-Forum
Copy link

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/polkadot-release-analysis-v1-5-0/5358/1

bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
This PR introduces the pallet for Sassafras consensus.

## Non Goals

The pallet delivers only the bare-bones and doesn't deliver support for
auxiliary functionalities such as equivocation report and support for
epoch change via session pallet.

These functionalities were drafted in the [main
PR](paritytech#1336), but IMO is
better to introduce this auxiliary stuff in a follow up PR and after
client code.

## Potential follow ups

paritytech#2364

---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
This will make more sense after
paritytech#2524 since the
schnorrkel type for VRF outputs is also renamed in the latest version.
Can be reviewed independently though.

Can be merged after paritytech#1577
so that there is less pain for @davxy.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

None yet

9 participants