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] - use atx grading for hare #4718

Closed
wants to merge 13 commits into from

Conversation

countvonzero
Copy link
Contributor

@countvonzero countvonzero commented Jul 17, 2023

Motivation

Closes #4089
Closes #4757

Changes

  • hare only vote for proposals with grade 1/acceptable and 2/good atxs in the activeset

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #4718 (334d91b) into develop (a873af8) will decrease coverage by 0.1%.
The diff coverage is 48.7%.

❗ Current head 334d91b differs from pull request most recent head ba914a7. Consider uploading reports for the commit ba914a7 to get more accurate results

@@            Coverage Diff            @@
##           develop   #4718     +/-   ##
=========================================
- Coverage     76.9%   76.9%   -0.1%     
=========================================
  Files          259     259             
  Lines        29297   29361     +64     
=========================================
+ Hits         22557   22579     +22     
- Misses        5315    5351     +36     
- Partials      1425    1431      +6     
Files Changed Coverage Δ
hare/hare.go 75.7% <41.1%> (-4.7%) ⬇️
hare/eligibility/oracle.go 73.3% <100.0%> (ø)
miner/oracle.go 74.4% <100.0%> (+0.5%) ⬆️
miner/util.go 71.4% <100.0%> (ø)

... and 5 files with indirect coverage changes

hare/hare.go Show resolved Hide resolved
Good
)

func GradeAtx(msh mesh, nodeID types.NodeID, atxReceived, epochStart time.Time, delta time.Duration) (AtxGrade, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this function can be more generic to make it reusable, i think there is no need for it to load malfeasance proof.
there could be one more on top that loads it and can error

func GradeAtx(atxReceived, proofReceived, epochStart time.Time, delta time.Duration) Grade

const (
Evil AtxGrade = iota
Acceptable
Good
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add two more grades? it also makes sense to call them Grade1-5 explicitly, as this Evil/Acceptable/Good won't work anymore

i don't remember deltas in those grades, but there should be a picture somewhere

Copy link
Contributor

@dshulyak dshulyak left a comment

Choose a reason for hiding this comment

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

i realized that we don't persist grades, so it doesn't matter that much if this change is 3-graded or 5-graded

miner/util.go Show resolved Hide resolved
miner/util_test.go Show resolved Hide resolved
@countvonzero
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Aug 1, 2023
## Motivation
<!-- Please mention the issue fixed by this PR or detailed motivation -->
Closes #4089
Closes #4757

## Changes
- hare only vote for proposals with grade 1/acceptable and 2/good atxs in the activeset
@bors
Copy link

bors bot commented Aug 1, 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 use atx grading for hare [Merged by Bors] - use atx grading for hare Aug 1, 2023
@bors bors bot closed this Aug 1, 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.

add test for ActiveSetFromBlock implement hare active set
3 participants