Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

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

Merged
behzadnouri merged 1 commit intosolana-labs:masterfrom
behzadnouri:authorized-voter-check-lite
Dec 30, 2021
Merged

checks for authorized voter early on in the vote-listener pipeline#22169
behzadnouri merged 1 commit intosolana-labs:masterfrom
behzadnouri:authorized-voter-check-lite

Conversation

@behzadnouri
Copy link
Copy Markdown
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
@behzadnouri behzadnouri force-pushed the authorized-voter-check-lite branch from a39eaca to e6deb59 Compare December 29, 2021 18:37
@carllin
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants