-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
evidence: introduction of LightClientAttackEvidence and refactor of evidence lifecycle #5361
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5361 +/- ##
==========================================
+ Coverage 60.90% 61.46% +0.56%
==========================================
Files 258 259 +1
Lines 23080 23346 +266
==========================================
+ Hits 14056 14349 +293
+ Misses 7588 7536 -52
- Partials 1436 1461 +25
|
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.
15/55 files viewed
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.
51/55 files reviewed
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.
55/55 files reviewed
bz := make([]byte, tmhash.Size+n) | ||
copy(bz[:tmhash.Size-1], l.ConflictingBlock.Hash().Bytes()) | ||
copy(bz[tmhash.Size:], buf) | ||
return tmhash.Sum(bz) |
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.
do we want to memoize the hash to avoid recomputing it several times?
same question for duplicate vote evidence
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'll check how many times we compute the hash. I actually don't think we do it that often
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.
So we compute the hash at most three times when evidence passes through the evidence pool. Do you thing that warrants saving the hash?
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.
yes
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.
Description
For more description see ADR-059