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

sigverify to identify and mark simple vote transaction #20021

Merged
merged 4 commits into from
Sep 21, 2021

Conversation

tao-stones
Copy link
Contributor

Problem

Changes to sigverify to identify simple vote transaction should be standalone PR

Summary of Changes

Pull the relevant changes from #19884

Fixes #

perf/src/sigverify.rs Outdated Show resolved Hide resolved
perf/src/sigverify.rs Outdated Show resolved Hide resolved
perf/src/sigverify.rs Outdated Show resolved Hide resolved
perf/src/sigverify.rs Outdated Show resolved Hide resolved
perf/Cargo.toml Show resolved Hide resolved
perf/src/sigverify.rs Outdated Show resolved Hide resolved
perf/src/sigverify.rs Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #20021 (d844ddd) into v1.6 (da7185e) will increase coverage by 0.0%.
The diff coverage is 90.7%.

@@           Coverage Diff            @@
##             v1.6   #20021    +/-   ##
========================================
  Coverage    82.3%    82.3%            
========================================
  Files         424      425     +1     
  Lines      118984   119112   +128     
========================================
+ Hits        97998    98132   +134     
+ Misses      20986    20980     -6     

@tao-stones tao-stones merged commit c17c740 into solana-labs:v1.6 Sep 21, 2021
packet_offsets: &PacketOffsets,
current_offset: usize,
) -> Result<(), PacketError> {
if packet_offsets.sig_len != 1 {
Copy link
Member

Choose a reason for hiding this comment

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

FYI (+ @sakridge) there are at least two validators on mainnet that use 2 sig votes:

I think it would be better to remove this restriction

Copy link
Member

Choose a reason for hiding this comment

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

Yea, let's allow for 1 or 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

feels like checking number of sigs is a quick way to rule out vote, if it is not 100%, might as well remove this check. Unless sig_len==1 || sig_len == 2 is all there is.
BTW, how do I see the 2 sigs vote in via above links?

Copy link
Member

Choose a reason for hiding this comment

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

Yea. sig_len == 1 || sig_len == 2 should be fine, more than 2 doesn't make sense. Could be sig_len <= 2 because I think we exclude sig_len == 0 already in another place.

Copy link
Member

Choose a reason for hiding this comment

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

feels like checking number of sigs is a quick way to rule out vote, if it is not 100%, might as well remove this check. Unless sig_len==1 || sig_len == 2 is all there is.
BTW, how do I see the 2 sigs vote in via above links?

Any of those account's transactions have two account signers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, putting in a new PR for this.

tao-stones added a commit to tao-stones/solana that referenced this pull request Sep 23, 2021
…0021)

* sigverify to identify and mark simple vote transaction

* check vote tx at get_packet_offsets to cover both cpu and gpu paths

* add pubkey_len to PacketOffsets to reduce the redundant bytes counting
tao-stones added a commit that referenced this pull request Sep 24, 2021
…20147)

* sigverify to identify and mark simple vote transaction (#20021)

* check vote tx at get_packet_offsets to cover both cpu and gpu paths

* add pubkey_len to PacketOffsets to reduce the redundant bytes counting

* allow vote to have 1 or 2 sigs (#20082)
@jstarry
Copy link
Member

jstarry commented Sep 25, 2021

@taozhu-chicago I'm porting this change to master fyi

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.

3 participants