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

Checking PC validity performance improvement #89

Merged

Conversation

stana-miric
Copy link
Contributor

Description

This PR include changes related to validation of PreparedCertificate messages. Earlier there were separate functions for checking height,round,senders and proposal hash. Now they are merged into AreValidPCMessages to avoid iterating 5 times instead of once. We decided to do this because the code will still remain readable.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have added sufficient documentation in code

@stana-miric stana-miric requested a review from a team October 6, 2023 11:35
@stana-miric stana-miric self-assigned this Oct 6, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2023

Codecov Report

Attention: Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.48%. Comparing base (628065c) to head (43b9a86).
Report is 7 commits behind head on main.

Files Patch % Lines
messages/helpers.go 87.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
+ Coverage   88.53%   89.48%   +0.94%     
==========================================
  Files           7        7              
  Lines        1527     1502      -25     
==========================================
- Hits         1352     1344       -8     
+ Misses        134      119      -15     
+ Partials       41       39       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

Generally LGTM

messages/helpers.go Show resolved Hide resolved
messages/helpers.go Outdated Show resolved Hide resolved
core/ibft.go Outdated Show resolved Hide resolved
messages/helpers.go Show resolved Hide resolved
@Stefan-Ethernal Stefan-Ethernal requested a review from a team October 9, 2023 11:44
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM neat

@stana-miric stana-miric merged commit 14ef0b7 into main Oct 10, 2023
4 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.

6 participants