-
Notifications
You must be signed in to change notification settings - Fork 107
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
add(scan): Start scanner gRPC server with zebrad
#8241
Conversation
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
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.
This looks really good however i found a bug that i think we should fix.
Zebra crashes if the shielded-scan database is not ephemeral with error:
The application panicked (crashed).
Message: Opening database "/home/alfredo/.cache/zebra/private-scan/v1/mainnet" failed: Error { message: "IO error: lock hold by current process, acquire time 1707322113 acquiring thread 359173: /home/alfredo/.cache/zebra/private-scan/v1/mainnet/LOCK: No locks available" }. Hint: Check if another zebrad process is running. Try changing the state cache_dir in the Zebra config.
Works fine if the shielded-scan.ephemeral
config field is true
. This is the reason why the test does not detect this.
I am not sure why this is happening and if it was introduced in this PR but the ephemeral is false by default so we should fix before merging.
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
I think it's because the default 'cache_dir' is the same for zebra-state and zebra-scan's Storage, I added a TODO in the zebra-scan config to add a const generic to `DbConfig' for specifying the default cache_dir. |
I think this is not the case, i tried used different directories and the same error happens. Relevant config parts:
Starting zebra with:
|
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.
That worked, thanks again.
Motivation
We want the zebrad start command to start the scanner gRPC server.
Closes #8242
PR Author Checklist
Check before marking the PR as ready for review:
For significant changes:
If a checkbox isn't relevant to the PR, mark it as done.
Solution
spawn_init()
fn for the rootinit()
fn inzebra_scan
ScanTask::spawn()
in zebrad start command with the newspawn_init()
fnTesting
Review
Anyone can 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.