This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Gossip the most recent votes#3702
Closed
sagar-solana wants to merge 2 commits into
Closed
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3702 +/- ##
========================================
- Coverage 79.6% 79.6% -0.1%
========================================
Files 155 155
Lines 24976 24966 -10
========================================
- Hits 19896 19883 -13
- Misses 5080 5083 +3 |
pgarg66
reviewed
Apr 10, 2019
| } | ||
|
|
||
| pub fn push_vote(&mut self, vote: Transaction) { | ||
| if self.vote_cache.len() == MAX_CACHED_VOTES { |
Contributor
There was a problem hiding this comment.
Maybe while len >= MAX remove(0)?
If push vote is ever called from two threads, it can go over MAX votes, and will never recover
rob-solana
approved these changes
Apr 10, 2019
Contributor
Author
|
I'll reopen this when its ready |
brooksprumo
added a commit
to brooksprumo/solana
that referenced
this pull request
Nov 19, 2024
brooksprumo
added a commit
to brooksprumo/solana
that referenced
this pull request
Nov 21, 2024
(cherry picked from commit bf33b8c) # Conflicts: # accounts-db/src/accounts_db.rs # accounts-db/src/accounts_db/tests.rs # runtime/src/bank.rs
brooksprumo
added a commit
to brooksprumo/solana
that referenced
this pull request
Nov 22, 2024
…3702)" (solana-labs#3735) This reverts commit bf33b8c.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since Gossip only keeps the newest vote arround, some votes could block older ones from being recorded on some nodes. This can result in different locktower results depending on what order votes reached the nodes
Summary of Changes
Always submit the last N(configurable) votes to gossip.