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

checks for authorized voter early on in the vote-listener pipeline #22169

Merged

Conversation

behzadnouri
Copy link
Contributor

Problem

Before votes are verified that they are signed by the authorized voter,
they might be dropped in verified-vote-packets code. If there are
enough many spam votes from unauthorized voters, this may potentially
drop valid votes but keep the false ones.
https://github.com/solana-labs/solana/blob/57986f982/core/src/verified_vote_packets.rs#L165-L168

Summary of Changes

Check for authorized voter early on in the vote-listener pipeline

Before votes are verified that they are signed by the authorized voter,
they might be dropped in verified-vote-packets code. If there are
enough many spam votes from unauthorized voters, this may potentially
drop valid votes but keep the false ones.
https://github.com/solana-labs/solana/blob/57986f982/core/src/verified_vote_packets.rs#L165-L168
@carllin
Copy link
Contributor

carllin commented Dec 29, 2021

Now that we've moved the authorized voter check earlier, can we delete this later authorized voter check?

.filter_map(|gossip_tx| {
vote_transaction::parse_vote_transaction(gossip_tx)
.filter(|(vote_pubkey, vote, _)| {
Self::filter_gossip_votes(vote_tracker, vote_pubkey, vote, gossip_tx)
})
.map(|v| (true, v))
})

@behzadnouri
Copy link
Contributor Author

Now that we've moved the authorized voter check earlier, can we delete this later authorized voter check?

.filter_map(|gossip_tx| {
vote_transaction::parse_vote_transaction(gossip_tx)
.filter(|(vote_pubkey, vote, _)| {
Self::filter_gossip_votes(vote_tracker, vote_pubkey, vote, gossip_tx)
})
.map(|v| (true, v))
})

yeah, I think we can remove that.
I will send a follow up change not to slow down merging this one.

@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #22169 (e6deb59) into master (b1d9a2e) will decrease coverage by 0.0%.
The diff coverage is 97.3%.

@@            Coverage Diff            @@
##           master   #22169     +/-   ##
=========================================
- Coverage    81.1%    81.1%   -0.1%     
=========================================
  Files         521      521             
  Lines      146316   146340     +24     
=========================================
+ Hits       118802   118810      +8     
- Misses      27514    27530     +16     

@behzadnouri behzadnouri merged commit c0c6038 into solana-labs:master Dec 30, 2021
@behzadnouri behzadnouri deleted the authorized-voter-check-lite branch December 30, 2021 15:03
mergify bot pushed a commit that referenced this pull request Dec 30, 2021
…22169)

Before votes are verified that they are signed by the authorized voter,
they might be dropped in verified-vote-packets code. If there are
enough many spam votes from unauthorized voters, this may potentially
drop valid votes but keep the false ones.
https://github.com/solana-labs/solana/blob/57986f982/core/src/verified_vote_packets.rs#L165-L168

(cherry picked from commit c0c6038)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 30, 2021
solana-labs#22169
verifies authorized-voter early on in vote-listener; so VoteTracker no
longer needs to maintain and check for epoch authorized voters.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 30, 2021
solana-labs#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.
mergify bot added a commit that referenced this pull request Dec 30, 2021
…ackport #22169) (#22188)

* checks for authorized voter early on in the vote-listener pipeline (#22169)

Before votes are verified that they are signed by the authorized voter,
they might be dropped in verified-vote-packets code. If there are
enough many spam votes from unauthorized voters, this may potentially
drop valid votes but keep the false ones.
https://github.com/solana-labs/solana/blob/57986f982/core/src/verified_vote_packets.rs#L165-L168

(cherry picked from commit c0c6038)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 30, 2021
solana-labs#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 30, 2021
solana-labs#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 31, 2021
solana-labs#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.
mergify bot pushed a commit that referenced this pull request Dec 31, 2021
…22169)

Before votes are verified that they are signed by the authorized voter,
they might be dropped in verified-vote-packets code. If there are
enough many spam votes from unauthorized voters, this may potentially
drop valid votes but keep the false ones.
https://github.com/solana-labs/solana/blob/57986f982/core/src/verified_vote_packets.rs#L165-L168

(cherry picked from commit c0c6038)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs
mergify bot added a commit that referenced this pull request Dec 31, 2021
…ackport #22169) (#22206)

* checks for authorized voter early on in the vote-listener pipeline (#22169)

Before votes are verified that they are signed by the authorized voter,
they might be dropped in verified-vote-packets code. If there are
enough many spam votes from unauthorized voters, this may potentially
drop valid votes but keep the false ones.
https://github.com/solana-labs/solana/blob/57986f982/core/src/verified_vote_packets.rs#L165-L168

(cherry picked from commit c0c6038)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 31, 2021
solana-labs#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.
behzadnouri added a commit that referenced this pull request Jan 3, 2022
#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.
mergify bot pushed a commit that referenced this pull request Jan 3, 2022
#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.

(cherry picked from commit 69d71f8)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs
mergify bot pushed a commit that referenced this pull request Jan 3, 2022
#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.

(cherry picked from commit 69d71f8)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs
mergify bot added a commit that referenced this pull request Jan 4, 2022
…22248)

* removes epoch_authorized_voters from VoteTracker (#22192)

#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.

(cherry picked from commit 69d71f8)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
mergify bot added a commit that referenced this pull request Jan 4, 2022
…22250)

* removes epoch_authorized_voters from VoteTracker (#22192)

#22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.

(cherry picked from commit 69d71f8)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants