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
Compute event hashes in separate thread [Verifiable events part 4] #868
Conversation
…compute-hash-in-commiter
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
go func() { | ||
bc.Run() | ||
wg.Done() | ||
}() | ||
|
||
go func() { | ||
eh.Run() |
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.
Does it make sense to make the eventHasher
a ReadyDoneAware
implementation?
Lines 3 to 7 in f861f31
// ReadyDoneAware provides easy interface to wait for module startup and shutdown | |
type ReadyDoneAware interface { | |
Ready() <-chan struct{} | |
Done() <-chan struct{} | |
} |
…compute-hash-in-commiter
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.
👏
Codecov Report
@@ Coverage Diff @@
## master #868 +/- ##
==========================================
- Coverage 56.89% 56.87% -0.02%
==========================================
Files 429 429
Lines 25635 25652 +17
==========================================
+ Hits 14584 14589 +5
- Misses 9079 9086 +7
- Partials 1972 1977 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
As noted in previous PR, computing hashes can be CPU intensive, hence similar approach as with block commitments - separate comiter whish shouldn't block execution of further collections