Expand description
The scanner task and scanning APIs.
Modules§
- scan_
range 🔒 - Functions for registering new keys in the scan task
Structs§
- Scan
Range Task Builder - A builder for a scan until task
Constants§
- CHECK_
INTERVAL - The amount of time between checking for new blocks and starting new scans.
- INFO_
LOG_ 🔒INTERVAL - We log an info log with progress after this many blocks.
- INITIAL_
WAIT 🔒 - Wait a few seconds at startup for some blocks to get verified.
Functions§
- block_
to_ compact - Converts a zebra block and meta data into a compact block.
- dfvk_
to_ ufvk - Turns a
DiversifiableFullViewingKey
to [UnifiedFullViewingKey
]. - get_
min_ 🔒height - Get the minimal height available in a key_heights map.
- sapling_
key_ to_ dfvk - Converts a Zebra-format scanning key into diversifiable full viewing key.
- scan_
block - Returns the transactions from
block
belonging to the givenscanning_keys
. - scan_
height_ and_ store_ results - Get the block at
height
fromstate
, scan it with the keys inparsed_keys
, and store the results instorage
. Ifheight
is lower than thekey_birthdays
for that key, skip it. - scanned_
block_ 🔒to_ db_ result - Convert a scanned block to a list of scanner database results.
- scanning_
keys - Turns an iterator of
DiversifiableFullViewingKey
s to [ScanningKeys
]. - spawn_
init - Initialize the scanner based on its config, and spawn a task for it.
- start
- Start a scan task that reads blocks from
state
, scans them with the configured keys instorage
, and then writes the results tostorage
. - tip_
height 🔒 - Get tip height or return genesis block height if no tip is available.
- transaction_
to_ 🔒compact - Converts a zebra transaction into a compact transaction.
- wait_
for_ height - Polls state service for tip height every
CHECK_INTERVAL
until the tip reaches the providedtip_height
- zp_
network - Returns the [
zcash_protocol::consensus::Network
] for this network.
Type Aliases§
- State
- The read state type used by the scanner.