solana icon indicating copy to clipboard operation
solana copied to clipboard

Gossip Votes Held Before BankingStage

Open apfitzge opened this issue 1 year ago • 2 comments

Problem

  • Gossip votes are held in ClusterInfoVoteListener until we become leader.
  • This seems unneccessary now since both voting threads insert into a shared data-structure which only keeps the latest vote.
  • Holding the votes can lead to misleading metrics since tpu votes are a sustained throughput, whereas gossip votes come in nearly all at once

Proposed Solution

  • ClusterInfoVoteListener just verifies the votes and sends to BankingStage for it to handle

apfitzge avatar Jan 26 '24 17:01 apfitzge

@AshwinSekar Am I way off here? This appears to be no longer necessary since your changes to the vote threads have now landed.

apfitzge avatar Jan 26 '24 17:01 apfitzge

It looks like the buffer to hold 1k votes was introduced in https://github.com/solana-labs/solana/pull/20873 in order to solve the following issues:

  1. ClusterInfoVoteListener has too short of a window (20 slots) for sending votes to BankingStage
  2. ClusterInfoVoteListener sends all votes to BankingStage, even outdated/ones on wrong fork
  3. ClusterInfoVoteListener may send votes out of order

With the new vote format enabled last year VoteStateUpdate I believe these issues are no longer a concern as only the latest vote matters, so there is no reason to hold gossip votes at all in ClusterInfoVoteListener. cc: @carllin since you wrote the initial change

AshwinSekar avatar Jan 26 '24 18:01 AshwinSekar