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

GRANDPA pre-vote selection algorithm #733

Open
AlistairStewart opened this issue Jan 13, 2025 · 2 comments · Fixed by #734
Open

GRANDPA pre-vote selection algorithm #733

AlistairStewart opened this issue Jan 13, 2025 · 2 comments · Fixed by #734

Comments

@AlistairStewart
Copy link
Contributor

The spec for prevoting is inconsistent with Substrate and the GRANDPA paper.

Best-PreVote-Candidate returns either the primaries block or the ghost of the prevotes apparently from this round r.

What the validator should prevote for is for the last audited block (or 3 blocks from the end in single-chain Substrate) in the longest chain (or chain with the most primary blocks for BABE) including a block B defined as follows

If the primaries' block is between the last finalused block L and the ghost of the prevotes from round r-1, then that is B

else use the ghost of the prevotes from round r-1.

We should probably check whether Substrate works like this.

@AlistairStewart
Copy link
Contributor Author

AlistairStewart commented Jan 13, 2025

I think 3 things need fixing:

  1. In Best-PreVote-Candidate, GRANDPA-GHOST should be called on round r-1 and the resulting variable renamed to include r-1.
  2. At the end of Best-Prevote candiate, we should call Best-Chain(N)
  3. Best-Chain should defined somewhere.

@AlistairStewart
Copy link
Contributor Author

We still need a best chain algorithm somewhere.

@bhargavbh bhargavbh reopened this Jan 17, 2025
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 a pull request may close this issue.

2 participants