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

feat(scanner): Don't scan and log if we are below sapling height #8121

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

oxarbitrage
Copy link
Contributor

@oxarbitrage oxarbitrage commented Dec 20, 2023

Motivation

We want to log when the tip is below sapling and the scanner is activated.

Close #8041

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?

Solution

Get the current tip at each scanning loop iteration and compare it with sapling activation height. Do not scan if the tip is below the sapling activation height.

Testing

The scan_task_starts was modified to test this feature.

Review

Anyone can review.

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.

@oxarbitrage oxarbitrage added P-Low ❄️ A-blockchain-scanner Area: Blockchain scanner of shielded transactions labels Dec 20, 2023
@oxarbitrage oxarbitrage self-assigned this Dec 20, 2023
@oxarbitrage oxarbitrage requested a review from a team as a code owner December 20, 2023 22:58
@oxarbitrage oxarbitrage requested review from upbqdn and removed request for a team December 20, 2023 22:58
@github-actions github-actions bot added the C-feature Category: New features label Dec 20, 2023
zebra-scan/src/scan.rs Outdated Show resolved Hide resolved
mergify bot added a commit that referenced this pull request Dec 21, 2023
@mergify mergify bot merged commit 085bfdc into main Dec 21, 2023
103 checks passed
@mergify mergify bot deleted the issue8041 branch December 21, 2023 13:44
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-feature Category: New features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scanner should log a message when Zebra is before the Sapling activation block
2 participants