-
Notifications
You must be signed in to change notification settings - Fork 106
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
change(scan): Store one transaction ID per database row, to make queries easier #8062
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
teor2345
added
C-enhancement
Category: This is an improvement
P-High 🔥
I-usability
Zebra is hard to understand or use
A-blockchain-scanner
Area: Blockchain scanner of shielded transactions
labels
Dec 6, 2023
github-actions
bot
added
the
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
label
Dec 6, 2023
teor2345
changed the title
Upgrade the scanner database major version to 1
change(scan): Store one transaction ID per database row, to make queries easier
Dec 6, 2023
teor2345
force-pushed
the
scan-db-tx-row
branch
from
December 6, 2023 01:03
74f7d6b
to
e20b92b
Compare
teor2345
commented
Dec 6, 2023
teor2345
commented
Dec 6, 2023
teor2345
commented
Dec 6, 2023
teor2345
commented
Dec 6, 2023
Closed
4 tasks
oxarbitrage
approved these changes
Dec 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-blockchain-scanner
Area: Blockchain scanner of shielded transactions
C-enhancement
Category: This is an improvement
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
I-usability
Zebra is hard to understand or use
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We want technical users to be able to use
ldb
to query the scanner database. This means we need one transaction ID per row.Close #8050.
PR Author Checklist
Check before marking the PR as ready for review:
There is already a summary for this project in the changelog.
If a checkbox isn't relevant to the PR, mark it as done.
Complex Code or Requirements
This changes the format from:
ScannerKey | Height -> Vec<transaction::Hash>
to:ScannerKey | Height | TransactionIndex -> Option<transaction::Hash>
.None
can be used to represent birthday heights and scanner progress in #8022.This format isn't ideal, because handing
None
is harder to code and review. We can change it to use a custom enum later, or track keys, birthdays, and progress in a separate column family. But that's for after the MVP.Solution
Testing
I updated the existing tests where needed, and they pass.
Review
This is blocking finishing off the scanner, so it seems like a high priority for review.
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.
Follow Up Work