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

Integrate Grandpa Standalone Package #3387

Open
6 of 16 tasks
jimjbrettj opened this issue Jul 13, 2023 · 1 comment
Open
6 of 16 tasks

Integrate Grandpa Standalone Package #3387

jimjbrettj opened this issue Jul 13, 2023 · 1 comment
Assignees
Labels
Epic Issue used to track development status of a complex feature, aggregates several issues S-grandpa issues related to block finality.

Comments

@jimjbrettj
Copy link
Contributor

jimjbrettj commented Jul 13, 2023

Issue summary

This epic is created to describe and track the effort to intergrate our standalone grandpa package into the gossamer codebase.

Tasks needed for the integration:

  • Create the logic for handling authority set changes in grandpa. This logic can be found within substrate here. Being addressed by client(consensus/grandpa): Implement ChangeTree and AuthoritySet logic #3283
  • Make the authority set type thread safe. Being addressed by client(consensus/grandpa): implement shared data structure #3351
  • Use the db to store grandpa state, found here, although we should be able to simplify this logic for our use cases. Starting to be addressed here client(consensus/grandpa): implement grandpaDb and environment types #3383
  • Write all the grandpa networking/communication logic, found in the substrate communication folder
  • The logic from lib.rs, which is the entrypoint to grandpa. This creates a wrapper around block_import object, which every imported block has to go through. Then a HalfLink object is created to link together the import object to the grandpa worker. Then using a HalfLink and a local config are used to run a granpda voter. Other logic this file contains is some communication logic, SharedVoterState, GrandpaParams, and VoterWork(future that powers the worker). Note: This file does not contain tests.
  • Logic for environment.rs. The environment in which grandpa executes. Contains VoterSetState, grandpa environment, completed round data, and equivocation logic. NOte: this file does not contain tests.
  • Logic for finality proof. This file contains the logic to prove grandpa finality. Tests included! Addressed in feat(client/grandpa): Implement finality proof logic #3582
  • Custom voting rules for grandpa. Also has tests!
  • block import logic. Block import handler for granpda. Justification import. Detect and make authority set changes. Import state logic. Note: No tests
  • justification for block finality found here. Verifies commits and has AncestryChain logic. Note: no tests
  • notification streams for grandpa.
  • Grandpa tests, almost all of which can be found here.
  • until_imported is a helper stream for waiting until one or more blocks are imported before bassing through inner items. Buffers incoming messages until given hashes are imported. Note: need to come up with a way to keep track of the number of outstanding blocks that we are waiting on for the same message. Substrate uses the reference counting feature of the Arc pointer for this. Tests included!
  • rpc api for grandpa.

Tasks will be marked as complete when they are merged into the feature branch for this issue. This issue will be updated as more tasks are discovered and as progress is made. This issue will be closed when the feature branch is merged into development.

Subtasks

@jimjbrettj jimjbrettj added the Epic Issue used to track development status of a complex feature, aggregates several issues label Jul 13, 2023
@timwu20 timwu20 added this to the Full Node MVP milestone Dec 5, 2023
@timwu20
Copy link
Contributor

timwu20 commented Dec 5, 2023

Given that the Polkadot full node calls sc_consensus_grandpa::run_grandpa_voter I'm adding this epic to the Full Node milestone.

@P1sar P1sar added the S-grandpa issues related to block finality. label Jan 18, 2024
@P1sar P1sar removed this from the Full Node MVP milestone Apr 2, 2024
@LernaJ LernaJ added this to the Objective 1 - Gossamer reaches production state milestone Apr 12, 2024
@P1sar P1sar removed this from the Objective 1 - Gossamer reaches production state milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Issue used to track development status of a complex feature, aggregates several issues S-grandpa issues related to block finality.
Projects
None yet
Development

No branches or pull requests

4 participants