Tracking: Enable `zebra-scan` to run as a separate independent process from `zebrad`
Motivation
In order to keep private key material outside of zebra, we need to decouple zebra-scan functionality from zebrad.
Design
Some diagrams for the design can be found in https://github.com/oxarbitrage/zebra-grpc-scan-spec/blob/main/zebra-scanner-process.md
We want to get started with the finalized state (reading from the database) part of the blockchain:
- [x] The scanner will communicate with Zebra for the finalized part of the blockchain with a
ReadStateService::initmethod: https://github.com/ZcashFoundation/zebra/issues/8520 - [ ] We need a replacement for
ChainTipChangeso we can use it inzebra_scanner::spawn_init: https://github.com/ZcashFoundation/zebra/issues/8580 - [ ] Create a new binary for the new process: https://github.com/ZcashFoundation/zebra/issues/8581
- [ ] Get rid of scanner startup code from zebrad: https://github.com/ZcashFoundation/zebra/issues/8582
- [ ] Move or remove the possibility of keys in the scanner: https://github.com/ZcashFoundation/zebra/issues/8584
- [ ] Testing: https://github.com/ZcashFoundation/zebra/issues/8585
- [ ] Documentation: https://github.com/ZcashFoundation/zebra/issues/8586
Non finalized state:
- [ ] https://github.com/ZcashFoundation/zebra/issues/8576
- [ ] https://github.com/ZcashFoundation/zebra/issues/8633
We should also evaluate if it makes sense to keep the zebra-scan crate inside the zebra repo as it is now or whether we need to move it to another repo.
Related work
This a step towards enabling zcashd deprecation by replacing the zcashd built in wallet with a zebra backed equivalent as per zcash/librustzcash#1373 .
Related:
- https://github.com/ZcashFoundation/zebra/issues/8141
- https://github.com/ZcashFoundation/zebra/issues/7937
- https://github.com/ZcashFoundation/zebra/issues/7926
We've finished all the required tasks here