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

Scheduled and Forced Authority Set Change Handling #686

Merged
merged 11 commits into from
Jan 16, 2025

Conversation

Grigorov-Georgi
Copy link
Collaborator

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

Description

  • Change the place of the AuthoritySetChanges PriorityQueue and its methods for adding and handling from WarpSyncState to RoundState. I assume that the RoundState would be renamed to GrandpaSetState or something similar.
  • Merge incrementSetId and resetRound methods in RoundState into startNewSet(List)
  • Create FocedAuthoritySetChange and ScheduledAuthoritySetChange classes which extend AuthoritySetChange
  • Add a comparator to AuthoritySetChange to return a ForceAuthoritySetChange object with priority over ScheduledAuthoritySetChange objects
  • Change the delay type in the GrandpaConsensusMessage from long to BigInteger
  • Handle the additional offset 'm' in ForcedAuthoritySetChange

Fixes #401

@Grigorov-Georgi Grigorov-Georgi marked this pull request as ready for review January 15, 2025 11:27
@georg-getz
Copy link
Member

We had a discussion with the team about numeric types about 2 years ago. I think it was mostly because of Java's lack of unsigned values which forced us to save u32 into a long and u64 into a BigInteger. We then agreed that having all the values as BigInteger, although more memory consuming, is the direction we wanna go in to reduce the need for parsing when comparing and to increase readability. Writing this because you have switched the type of the offset in GRANDPA consensus message.

If you feel like this decision needs revisiting feel free.

@Grigorov-Georgi Grigorov-Georgi merged commit e76171c into dev Jan 16, 2025
3 checks passed
@Grigorov-Georgi Grigorov-Georgi deleted the 401-scheduled-and-forced-authority-set-changes branch January 16, 2025 07:57
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.

Forced authority set changes detection and handling
3 participants