Module scan

Source
Expand description

The scanner task and scanning APIs.

Modules§

scan_range 🔒
Functions for registering new keys in the scan task

Structs§

ScanRangeTaskBuilder
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 given scanning_keys.
scan_height_and_store_results
Get the block at height from state, scan it with the keys in parsed_keys, and store the results in storage. If height is lower than the key_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 DiversifiableFullViewingKeys 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 in storage, and then writes the results to storage.
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 provided tip_height
zp_network
Returns the [zcash_protocol::consensus::Network] for this network.

Type Aliases§

State
The read state type used by the scanner.