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
Hash events collection [Verifiable events part 1] #734
Conversation
# Conflicts: # engine/execution/computation/computer/computer.go
engine/execution/ingestion/engine.go
Outdated
@@ -1078,7 +1078,7 @@ func (e *Engine) saveExecutionResults( | |||
collectionID = flow.ZeroID | |||
} | |||
|
|||
chunk := generateChunk(i, startState, endState, collectionID, blockID) | |||
chunk := generateChunk(i, startState, endState, collectionID, blockID, result.Events[i].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.
I don't think it is a good idea to do the result.Events[i].Hash()
operation here, this is not a negligible operation and directly impact TPS slowdown. We probably should do the hashing operation as part of committer and just pass the final root hash to generateChunk.
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.
That was planned as a next step, to keep this PR simple
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.
My only concern is if this gets merge into master before the next step and make it to an spork
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.
Sure, I can prepare PR on top of this to before merging this one
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 #734 +/- ##
==========================================
+ Coverage 56.61% 56.69% +0.07%
==========================================
Files 429 429
Lines 25472 25495 +23
==========================================
+ Hits 14422 14455 +33
+ Misses 9077 9062 -15
- Partials 1973 1978 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
# Conflicts: # engine/execution/computation/computer/computer.go
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.
👌
# Conflicts: # engine/execution/ingestion/engine.go
Adds EventsList type which captures list of events and hashes them, propagating it to the Chunk.
It's the first part of changes to add verifiable events to the system, kept here for ease of review