From 877e4d56dab89fbfb96dafc8f37831175b87a7f9 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 8 Dec 2023 06:47:07 +1000 Subject: [PATCH 1/5] Add `ldb` RocksDB query tool to the Dockerfile --- docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index a0a4b9a9466..e520ce7d781 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -48,6 +48,7 @@ RUN apt-get -qq update && \ ca-certificates \ protobuf-compiler \ rsync \ + rocksdb-tools \ ; \ rm -rf /var/lib/apt/lists/* /tmp/* @@ -181,7 +182,8 @@ COPY --from=release /entrypoint.sh / RUN apt-get update && \ apt-get install -y --no-install-recommends \ - ca-certificates + ca-certificates \ + rocksdb-tools # Config settings for zebrad ARG FEATURES From 072c6d5ab152b24ef0c0d3de3ca6f023b65766bb Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 8 Dec 2023 06:55:08 +1000 Subject: [PATCH 2/5] Add shielded scanning link to run.md --- book/src/user/run.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/book/src/user/run.md b/book/src/user/run.md index ef2a1cd80b3..f308b8020f1 100644 --- a/book/src/user/run.md +++ b/book/src/user/run.md @@ -13,8 +13,9 @@ structure, and documentation for all of the config options can be found You can run Zebra as a: -- [`lightwalletd` backend](https://zebra.zfnd.org/user/lightwalletd.html), and -- experimental [mining backend](https://zebra.zfnd.org/user/mining.html). +- [`lightwalletd` backend](https://zebra.zfnd.org/user/lightwalletd.html), +- [mining backend](https://zebra.zfnd.org/user/mining.html), or +- experimental [Sapling shielded transaction scanner](https://zebra.zfnd.org/user/shielded-scan.html). ## Supported versions From c9bebcde9e4b77c972b75ebb440fda600a9fe498 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 8 Dec 2023 06:59:36 +1000 Subject: [PATCH 3/5] Add `ldb` tool instructions to install.md --- book/src/user/install.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/book/src/user/install.md b/book/src/user/install.md index 83e14c87254..b4ca55b7eff 100644 --- a/book/src/user/install.md +++ b/book/src/user/install.md @@ -6,7 +6,6 @@ Follow the [Docker or compilation instructions](https://zebra.zfnd.org/index.htm To compile Zebra from source, you will need to [install some dependencies.](https://zebra.zfnd.org/index.html#building-zebra). - ## Alternative Compilation Methods ### Compiling Manually from git @@ -58,7 +57,12 @@ If you're having trouble with: - use `cargo install` without `--locked` to build with the latest versions of each dependency -#### Optional Tor feature +## Experimental Shielded Scanning feature + +- install the `rocksdb-tools` or `rocksdb` packages to get the `ldb` binary, which allows expert users to + [query the scanner database](https://zebra.zfnd.org/user/shielded-scan.html). This binary is sometimes called `rocksdb_ldb`. + +## Optional Tor feature - **sqlite linker errors:** libsqlite3 is an optional dependency of the `zebra-network/tor` feature. If you don't have it installed, you might see errors like `note: /usr/bin/ld: cannot find -lsqlite3`. From 9bb856ebdee59c2548802021c3a53f53128fbe02 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 8 Dec 2023 07:06:10 +1000 Subject: [PATCH 4/5] Add a rough framework for shielded-scan.md --- book/src/user/shielded-scan.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 book/src/user/shielded-scan.md diff --git a/book/src/user/shielded-scan.md b/book/src/user/shielded-scan.md new file mode 100644 index 00000000000..4661c0b8316 --- /dev/null +++ b/book/src/user/shielded-scan.md @@ -0,0 +1,24 @@ +# Zebra Shielded Scanning + +## Build & Install + +Using the `shielded-scan` feature. TODO: add examples, document the feature in zebrad/src/lib.rs. + +## Configuration + +In `zebrad.toml`, use: +- the `[shielded_scan]` table for database settings, and +- the `[shielded_scan.sapling_keys_to_scan]` table for diversifiable full viewing keys. + +TODO: add a definition for DFVK, link to its format, and add examples and links to keys and database settings. + +## Running Sapling Scanning + +Launch Zebra and wait for 12-24 hours. + +## Expert: Querying Raw Sapling Scanning Results + +TODO: Copy these instructions and examples here: +- https://github.com/ZcashFoundation/zebra/issues/8046#issuecomment-1844772654 + +Database paths are different on Linux, macOS, and Windows. From 6a280144ed5f5df60882ab8ba4a1b2d3d7c832ae Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 8 Dec 2023 07:20:14 +1000 Subject: [PATCH 5/5] Add security warning and feature limitations to shielded-scan.md --- book/src/user/shielded-scan.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/book/src/user/shielded-scan.md b/book/src/user/shielded-scan.md index 4661c0b8316..df72b0aa753 100644 --- a/book/src/user/shielded-scan.md +++ b/book/src/user/shielded-scan.md @@ -1,5 +1,17 @@ # Zebra Shielded Scanning +This document describes how expert users can try Zebra's shielded scanning feature. + +For now, we only support Sapling, and only store transaction IDs in the scanner results database. +Ongoing development is tracked in issue [#7728](https://github.com/ZcashFoundation/zebra/issues/7728). + +## Important Security Warning + +Zebra's shielded scanning feature has known security issues. It is for experimental use only. + +Do not use regular or sensitive viewing keys with Zebra's experimental scanning feature. Do not use this +feature on a shared machine. We suggest generating new keys for experimental use. + ## Build & Install Using the `shielded-scan` feature. TODO: add examples, document the feature in zebrad/src/lib.rs.