-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add block hash to primary keys in transactions, receipts and logs tables #100
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.
Thanks! Looks good, a few things to add:
On lines 17 and 18 of 00014, the indexes on eth.transaction_cids
(mh_key, block_number)
and (cid, block_number)
need to be made non-unique. Or header_id
needs to be added to the index, but I think we should just make the existing constraints non-unique.
And I think we need to add header_id
to the eth.access_list_elements
table and its PK as well.
Changes incorporated.
Even if a transaction is part of two blocks at the same height, the |
No you're right, that makes sense! The only way I see us needing it in the future is if we went back to using FKs- we'd need |
Part of #99
header_id
) field toreceipt_cids
andlog_cids
tablestransaction_cids
,receipt_cids
andlog_cids
tablesreceipt_cids
andlog_cids
tables usingheader_id
cid
andmh_key
ontransaction_cids
non-unique