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

discards serialized gossip crds votes if cannot parse tx#22129

Merged
behzadnouri merged 1 commit intosolana-labs:masterfrom
behzadnouri:crds-vote
Dec 29, 2021
Merged

discards serialized gossip crds votes if cannot parse tx#22129
behzadnouri merged 1 commit intosolana-labs:masterfrom
behzadnouri:crds-vote

Conversation

@behzadnouri
Copy link
Copy Markdown
Contributor

Problem

The crds value is invalid if cannot parse tx into a vote.

Summary of Changes

Discard serialized gossip crds votes if cannot parse tx.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 27, 2021

Codecov Report

Merging #22129 (f313a25) into master (a066466) will increase coverage by 0.0%.
The diff coverage is 94.8%.

@@           Coverage Diff           @@
##           master   #22129   +/-   ##
=======================================
  Coverage    81.2%    81.2%           
=======================================
  Files         520      520           
  Lines      145949   145959   +10     
=======================================
+ Hits       118533   118542    +9     
- Misses      27416    27417    +1     

@behzadnouri behzadnouri merged commit c9c7862 into solana-labs:master Dec 29, 2021
@behzadnouri behzadnouri deleted the crds-vote branch December 29, 2021 19:31
mergify Bot pushed a commit that referenced this pull request Dec 29, 2021
(cherry picked from commit c9c7862)

# Conflicts:
#	gossip/src/crds_value.rs
let self_pubkey = self.id();
let now = timestamp();
let vote = Vote::new(self_pubkey, vote, now);
let vote = Vote::new(self_pubkey, vote, now).unwrap();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any concerns with externally controlled info making it to this unwrap?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Unless replay is pushing invalid votes.
These are local nodes votes.

mergify Bot added a commit that referenced this pull request Dec 29, 2021
…2129) (#22172)

* discards serialized gossip crds votes if cannot parse tx (#22129)

(cherry picked from commit c9c7862)

# Conflicts:
#	gossip/src/crds_value.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.

2 participants