Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

grandpa: reannounce voted blocks periodically#3602

Merged
gavofyork merged 4 commits into
masterfrom
andre/grandpa-reannounce-voted-blocks
Sep 12, 2019
Merged

grandpa: reannounce voted blocks periodically#3602
gavofyork merged 4 commits into
masterfrom
andre/grandpa-reannounce-voted-blocks

Conversation

@andresilva
Copy link
Copy Markdown
Contributor

In order for GRANDPA to keep progressing it is imperative that nodes sync to all forks that are being voted on, since we cannot process a vote until we import the block it refers to (and it ancestors).

This PR adds a background worker that keeps track of the block hashes of our latest votes and re-announces them through sync when GRANDPA stops progressing. It just keeps a bounded VecDeque of latest hashes and announces all of them when stalled, without tracking any context of round or set id.

@andresilva andresilva added A0-please_review Pull request needs code review. M4-core labels Sep 11, 2019
@andresilva andresilva requested a review from rphmeier September 11, 2019 23:00
@andresilva andresilva changed the title grandpa: reannounce voted blocks grandpa: reannounce voted blocks periodically Sep 11, 2019
Copy link
Copy Markdown
Contributor

@Demi-Marie Demi-Marie left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread core/finality-grandpa/src/communication/periodic.rs Outdated
Comment thread core/finality-grandpa/src/communication/periodic.rs Outdated
Comment thread core/finality-grandpa/src/communication/periodic.rs Outdated
@gavofyork gavofyork merged commit a0dd5e8 into master Sep 12, 2019
@gavofyork gavofyork deleted the andre/grandpa-reannounce-voted-blocks branch September 12, 2019 15:12
andresilva added a commit that referenced this pull request Sep 17, 2019
* grandpa: reannounce latest voted blocks periodically

* grandpa: add test for background block announcement

* grandpa: configurable delay for background block announcer

* grandpa: nits
andresilva added a commit that referenced this pull request Sep 17, 2019
* grandpa: reannounce latest voted blocks periodically

* grandpa: add test for background block announcement

* grandpa: configurable delay for background block announcer

* grandpa: nits
Demi-Marie pushed a commit to Demi-Marie/substrate that referenced this pull request Sep 17, 2019
* grandpa: reannounce latest voted blocks periodically

* grandpa: add test for background block announcement

* grandpa: configurable delay for background block announcer

* grandpa: nits
en pushed a commit to en/substrate that referenced this pull request Sep 24, 2019
* grandpa: reannounce latest voted blocks periodically

* grandpa: add test for background block announcement

* grandpa: configurable delay for background block announcer

* grandpa: nits
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants