anza-xyz / agave

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://www.anza.xyz/
Apache License 2.0
305 stars 137 forks source link

BankingStage: Gossip votes held #2183

Closed apfitzge closed 3 weeks ago

apfitzge commented 1 month ago

Problem

Migrating issue from https://github.com/solana-labs/solana/issues/34973

Proposed Solution

apfitzge commented 1 month ago

@carllin @AshwinSekar - I migrated this issue. My understanding from previous issue is it is not necessary for us to continue doing this holding.

@carllin if that is not the case, please let us know.

AshwinSekar commented 1 month ago

Confirmed with carl in April that votes do not need to be held in ClusterInfoVoteListener with the caveat that banking stage only drains the votes for slots on the working_bank's fork and leaves the remaining untouched.

The benefit of holding votes in ClusterInfoVoteListener is that if the leader decides to build it's first block off of fork1 and it's second block off of fork2, gossip votes for fork2 will still make it into the second block, even if they are filtered out for the first block.

Essentially we want to move this check: https://github.com/anza-xyz/agave/blob/a2eaf6d189a4316c6f5ef8d9508dc628c7548e7b/core/src/verified_vote_packets.rs#L89-L90

Into here: https://github.com/anza-xyz/agave/blob/a2eaf6d189a4316c6f5ef8d9508dc628c7548e7b/core/src/banking_stage/latest_unprocessed_votes.rs#L322-L323