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): migrate vote tally #1139

Draft
wants to merge 14 commits into
base: feat/topdown-enchancement
Choose a base branch
from

Conversation

cryptoAtwill
Copy link
Contributor

@cryptoAtwill cryptoAtwill commented Sep 20, 2024

Following previous PR, this one migrates the vote tally process over.

In this PR, the following key changes are made:

  • Migrating current main VoteTally over. Most of the logic is unchanged. The key changes are removing the stm module, removing chain field (not relevant to vote tally anymore) and remove pause_votes (not needed). Also dump_votes that dump all the votes currently collected is added. This is mainly to aid debugging in case of stuck finality.
  • Implemented the VoteTallyClient that utilises tokio channels to communicate with the underlying reactor.
  • Introduced VoteStore trait that stored votes collected. Currently it's in memory store by default. Will merge with Add persistent top-down finality cache #897 when recovery modes are introduced.
  • Introduced GossipClient trait that vote tally uses to communicate with the underlying libp2p gossip channel. Previously it's using ipld-resolver directly. But that crate is under utilised and quite heavy. Introducing this trait to decouple with ipld-resolver for easier testing as well.
  • Added RecoverableECDSASignature to validate signed votes from peers and sign votes for peers.
  • Vote is now versioned. The first byte is the version number, the rest of the bytes are the payload depending on the version.

@cryptoAtwill cryptoAtwill requested a review from a team as a code owner September 20, 2024 12:15
@cryptoAtwill cryptoAtwill marked this pull request as draft September 20, 2024 12:15
@cryptoAtwill cryptoAtwill changed the title feat(node): vote tally initial commit feat(node): migrate vote tally Sep 20, 2024
@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