Skip to content
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): Create a function that scans one block by height, and stores the results in the database #8045

Merged
merged 8 commits into from
Dec 6, 2023

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Dec 4, 2023

Motivation

This is a quick follow up to a bunch of recent scanner changes.

@upbqdn or @oxarbitrage this might conflict with what you're working on, but I'm happy to re-do it, because your PRs are actually changing things.

PR Author Checklist

Check before marking the PR as ready for review:

  • Will the PR name make sense to users?
  • Does the PR have a priority label?
  • Have you added or updated tests?
  • Is the documentation up to date?

If a checkbox isn't relevant to the PR, mark it as done.

Solution

  • Create a function that scans one block by height, gets it from the state, and puts the results in the database
  • Add some TODOs and update some function comments

Most of these arguments are cheap to clone, but if we have a lot of keys the key sets could be very large, so I used Arc.

Testing

This is just a cleanup of the previous PR.

Review

This is a routine cleanup.

Reviewer Checklist

Check before approving the PR:

  • Does the PR scope match the ticket?
  • Are there enough tests to make sure it works? Do the tests cover the PR motivation?
  • Are all the PR blockers dealt with?
    PR blockers can be dealt with in new tickets or PRs.

And check the PR Author checklist is complete.

@teor2345 teor2345 added C-cleanup Category: This is a cleanup P-Medium ⚡ C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG A-blockchain-scanner Area: Blockchain scanner of shielded transactions labels Dec 4, 2023
@teor2345 teor2345 self-assigned this Dec 4, 2023
@teor2345 teor2345 requested review from a team as code owners December 4, 2023 05:10
@teor2345 teor2345 requested review from oxarbitrage and removed request for a team December 4, 2023 05:10
upbqdn
upbqdn previously approved these changes Dec 5, 2023
zebra-scan/src/scan.rs Outdated Show resolved Hide resolved
upbqdn
upbqdn previously approved these changes Dec 5, 2023
@teor2345
Copy link
Contributor Author

teor2345 commented Dec 5, 2023

Just an import merge conflict, should be fixed now.

zebra-scan/src/scan.rs Outdated Show resolved Hide resolved
@mergify mergify bot merged commit 358e52b into main Dec 6, 2023
128 checks passed
@mergify mergify bot deleted the scan-todos branch December 6, 2023 01:57
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-cleanup Category: This is a cleanup C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants