-
Notifications
You must be signed in to change notification settings - Fork 40
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
Rework event logs and transaction database schema #1961
Conversation
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 so far. Went through over the phone with Tudor too and the table structure etc. makes sense. Left a few minor comments and I'll scan through your new changes once you've dealt with the todos you added.
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 except for the tenscan contract count changing from 2 to 7 as discussed (the +1/+2 adjustments not quite right), and the segfault you mentioned
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 - looking forward to having this one in!
Why this change is needed
Event logs must be queried efficiently from the enclave, so we need to store them in normalised db tables, which are easy to index.
The normalisation has a knock-on effect, requiring some clarification of responsibilities and refactoring of transaction storage.
Transactions were stored twice in the database, loaded into memory and cached even though they were only needed during execution.
What changes were made as part of this PR
batch_body
table, which was really just the "batch_height"PR checks pre-merging
Please indicate below by ticking the checkbox that you have read and performed the required
PR checks