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

[Merged by Bors] - optimize ballot eligibility validation #4923

Closed

Conversation

dshulyak
Copy link
Contributor

@dshulyak dshulyak commented Aug 29, 2023

closes: #4883
related: #4841

active set is validated only for reference ballot in current epoch, for all other ballots eligibilities validated against declared slots in the reference ballot. beside making validation more efficient, it will allow to prune active set data in future changes. reference ballots is still loading data from cached datastore, i plan to remove eventually but not in this change.

additionally i rewrote all tests for eligibility validator to get to 100% coverage and make them less dependent on the implementation.

@dshulyak dshulyak marked this pull request as ready for review August 30, 2023 09:16
@dshulyak dshulyak force-pushed the optiimize-eligibility-validation branch from ccf928b to afa329f Compare August 30, 2023 09:24
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #4923 (e5d4189) into develop (115afb8) will increase coverage by 0.0%.
Report is 1 commits behind head on develop.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           develop   #4923   +/-   ##
=======================================
  Coverage     77.0%   77.0%           
=======================================
  Files          263     263           
  Lines        30532   30532           
=======================================
+ Hits         23529   23540   +11     
+ Misses        5505    5501    -4     
+ Partials      1498    1491    -7     
Files Changed Coverage Δ
proposals/eligibility_validator.go 100.0% <100.0%> (+14.1%) ⬆️
proposals/handler.go 87.1% <100.0%> (ø)
proposals/util.go 86.3% <100.0%> (+9.4%) ⬆️

... and 7 files with indirect coverage changes

@dshulyak
Copy link
Contributor Author

dshulyak commented Aug 30, 2023

i synced node with this change couple of times. another related improvement #4927

@dshulyak
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Aug 30, 2023
@bors
Copy link

bors bot commented Aug 30, 2023

try

Build failed:

@dshulyak
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Aug 30, 2023
type vrfVerifier interface {
Verify(types.NodeID, []byte, types.VrfSignature) bool
}

Copy link
Contributor

Choose a reason for hiding this comment

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

seems a no-op

@bors
Copy link

bors bot commented Aug 30, 2023

try

Build failed:

@dshulyak
Copy link
Contributor Author

bors merge

@bors
Copy link

bors bot commented Aug 30, 2023

Canceled.

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Aug 31, 2023
closes: #4883
related: #4841

active set is validated only for reference ballot in current epoch, for all other ballots eligibilities validated against declared slots in the reference ballot. beside making validation more efficient, it will allow to prune active set data in future changes. reference ballots is still loading data from cached datastore, i plan to remove eventually but not in this change.

additionally i rewrote all tests for eligibility validator to get to 100% coverage and make them less dependent on the implementation.
@dshulyak
Copy link
Contributor Author

bors cancel

@bors
Copy link

bors bot commented Aug 31, 2023

Canceled.

@dshulyak dshulyak changed the title miner/oracle: optimize eligibility validation optimize ballot eligibility validation Aug 31, 2023
@dshulyak
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Aug 31, 2023
@bors
Copy link

bors bot commented Aug 31, 2023

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Aug 31, 2023
closes: #4883
related: #4841

active set is validated only for reference ballot in current epoch, for all other ballots eligibilities validated against declared slots in the reference ballot. beside making validation more efficient, it will allow to prune active set data in future changes. reference ballots is still loading data from cached datastore, i plan to remove eventually but not in this change.

additionally i rewrote all tests for eligibility validator to get to 100% coverage and make them less dependent on the implementation.
@bors
Copy link

bors bot commented Aug 31, 2023

Pull request successfully merged into develop.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title optimize ballot eligibility validation [Merged by Bors] - optimize ballot eligibility validation Aug 31, 2023
@bors bors bot closed this Aug 31, 2023
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.

miner/oracle: optimize eligibility validation
2 participants