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

feat(node): refactor parent view syncer #1151

Draft
wants to merge 23 commits into
base: vote-tally
Choose a base branch
from

Conversation

cryptoAtwill
Copy link
Contributor

@cryptoAtwill cryptoAtwill commented Sep 26, 2024

In this PR, the parent view syncer is refactored to follow a reactor pattern that follows the topdown spec V2.

This PR has the following changes:

  • Most of the polling logic from the current main remains unchanged. Similar to VoteTally in the previous PR, stm is removed in favour of tokio reactor.
  • Previously, topdown checkpoint only has parent block hash and parent block height, now a cumulative hash for parent side effects are included as outlined in the highlevel doc. Idea is to make the side effects verifiable.
  • Introduced ParentViewStore trait to store parent subnet observations. Only in memory store is implemented by default. Will merge with Add persistent top-down finality cache #897 when recovery modes are introduced.
  • The proposal creation logic is triggered every time a new non-null parent block is polled. Keeps the implementation simpler.
  • Added broadcast::Sender<TopDownSyncEvent> to notify subscriber of topdown syncing events, such as new parent observation made and new proposal made.

@cryptoAtwill cryptoAtwill requested a review from a team as a code owner September 26, 2024 06:43
@cryptoAtwill cryptoAtwill marked this pull request as draft September 26, 2024 06:44
Base automatically changed from integrate-vote-tally to vote-tally October 1, 2024 05:39
@raulk raulk added the topdown label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

2 participants