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

fix(consensus): vote extensions verified multiple times #867

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

lklimek
Copy link
Collaborator

@lklimek lklimek commented Aug 12, 2024

Issue being fixed or feature implemented

Right now, each vote we receive is sent to Drive using VerifyVoteExtension.
It means that if each peer has exactly the same 100 votes, and we have 10 peers, this call is executed 1000 times.

What was done?

Added check to skip verification of vote extensions if the vote was already verified and added to the VoteSet.

How Has This Been Tested?

On a "big" network.

$ egrep 'sending ABCI response.*VerifyVoteExtension","height":5255,' drive-json.log |wc -l
66

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek lklimek changed the title feat( fix(consensus): vote extensions verified multiple times Aug 12, 2024
@lklimek lklimek force-pushed the feat/verify-vote-ext-caching branch from 61cd830 to 716f585 Compare August 12, 2024 10:52
@lklimek lklimek added this to the v1.2 milestone Aug 14, 2024
@lklimek lklimek marked this pull request as ready for review August 14, 2024 09:09
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

👍

@lklimek lklimek merged commit eac51c1 into v1.2-dev Aug 14, 2024
16 checks passed
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.

2 participants