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
Conversation
Codecov Report
@@ 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
|
miner/atx_grader.go
Outdated
Good | ||
) | ||
|
||
func GradeAtx(msh mesh, nodeID types.NodeID, atxReceived, epochStart time.Time, delta time.Duration) (AtxGrade, error) { |
There was a problem hiding this comment.
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
miner/atx_grader.go
Outdated
const ( | ||
Evil AtxGrade = iota | ||
Acceptable | ||
Good |
There was a problem hiding this comment.
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
There was a problem hiding this 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
bors merge |
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. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Motivation
Closes #4089
Closes #4757
Changes