-
Notifications
You must be signed in to change notification settings - Fork 77
refactor(code): Simplify implementation by only retrieving evidence on decide #1009
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
refactor(code): Simplify implementation by only retrieving evidence on decide #1009
Conversation
✅ Semver Check PassedGreat job! All semver violations have been resolved. This PR now complies with semantic versioning rules. If you made version updates, please ensure that:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## bastien/equivocation-evidence #1009 +/- ##
===============================================================
Coverage ? 0
===============================================================
Files ? 0
Lines ? 0
Branches ? 0
===============================================================
Hits ? 0
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. |
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.
LGTM, thank you!
I just read the comment of @ancazamfir here. Should we keep the |
I would suggest to remove it in this PR for now and add logging (via tracing) in the driver whenever we see a misbehavior. |
Having events would be nice but we need to find a way to implement those nicely and I am not yet sure how to go about that. Having mutable state in the driver that we check and clear every time is brittle, hence why I attempted to remove it here, but maybe there is a better way. Perhaps by changing the EvidenceMap structs to store the latest evidence that was recorded so that we can check if it matches the last vote/proposal that was processed and then emit the event. What do you think? On my side I will think more on this and come back to you. |
I agree that adding a field
What do you think? |
Sounds good to me! @ancazamfir? |
Can we still keep all evidence and only log the "last" one? Eventually we will send some information to the app if/ when we decide, based on the overall evidence. In Cosmos for example iirc we only send the list of validators that equivocated and not the vote details. |
Can we also add evidence metrics. Not sure in which PR we do what but I am ok with either. |
That is precisely what we are planning to do. This |
…stems/malachite into romac/equivocation-evidence-refactor
04374df
into
bastien/equivocation-evidence
No description provided.