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

Implement Finalizable in GrandpaService #678

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

Grigorov-Georgi
Copy link
Collaborator

@Grigorov-Georgi Grigorov-Georgi commented Jan 8, 2025

Description

  • Polkadot Spec: https://spec.polkadot.network/sect-finality#algo-finalizable & https://spec.polkadot.network/sect-finality#defn-grandpa-completable
  • Calculating Grandpa Ghost seems expensive operation and to reduce overhead, I've updated certain methods to accept a precomputed Ghost as a parameter, so we can reuse it. For flexibility, if Ghost is null, the method will compute it on the spot.
  • The current implementation doesn't align fully with the spec and refactoring is required. Currently we are assuming that all of the prevotes/percommits in the state are from the current round. Refactoring on isCompatible and isFinalizable will be provided in the next PR.

Fixes #398

@Grigorov-Georgi Grigorov-Georgi self-assigned this Jan 8, 2025
@Grigorov-Georgi Grigorov-Georgi marked this pull request as ready for review January 10, 2025 12:22
@Grigorov-Georgi Grigorov-Georgi marked this pull request as draft January 10, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Finalizable
1 participant