The checkpoints that a batch of scanned blocks adds to the wallet’s note commitment trees
beyond those its own commitments create, as put_blocks computes them before it builds
the batch’s subtrees (batch_checkpoints).
The note commitment data accumulated by put_blocks_rows across a sequence of scanned
blocks: exactly the input that the note commitment tree stage of put_blocks consumes.
The maximum number of blocks the wallet is allowed to rewind. This is
consistent with the bound in zcashd, and allows block data deeper than
this delta from the chain tip to be pruned.
The number of trailing blocks in a batch whose spend-map entries are always retained,
even when put_blocks_rows can prove that insertion is skippable. This keeps the
maps’ contents aligned with a LowLevelWalletWrite::prune_tracked_spends pruning
depth of the same value, and comfortably exceeds the maximum reorg depth the wallet
tolerates.
Computes the checkpoints that the batch of scanned blocks above from_state through
last_scanned_height must add to each note commitment tree beyond those its own
commitments create. Each *_commitments slice is a pool’s commitment stream for the batch
as put_blocks_rows returns it, with the scanner’s Checkpoint retention still on every
block end: the stream is read before any demotion, so that a checkpoint ensured below the
window (a retained anchor) still lands on the right tree state.
Given the checkpoint heights present in each of the three shielded pools’ note commitment trees,
in the order (Sapling, Orchard, Ironwood), returns for each pool the complete set of checkpoint
heights it must ensure for a batch of scanned blocks covering range.
The checkpoint floor of a batch of scanned blocks ending at last_scanned_height: the
height at and below which no block end of the batch keeps its own checkpoint.
Given the checkpoint heights present in each of the three shielded pools’ note commitment
trees, in the order (Sapling, Orchard, Ironwood), returns for each pool the set of checkpoint
heights it must ensure so that every pool ends up checkpointed at every height that is
checkpointed in any pool.
Returns the transparent outputs of tx for which the wallet should store records: those
paying an address of a wallet account, and, when funding_account is given, those paying
anyone else.
Produces the checkpoints that must be added to a pool’s note commitment tree so that it
gains a checkpoint at each of the requested heights. A height in created_checkpoints is
skipped, since inserting the batch’s subtrees creates its checkpoint. Any other height
receives a checkpoint at the position recorded in block_end_positions for the nearest block
at or below it that carries a commitment, or at the provided frontier’s position when no
such block precedes it in the batch.
Whether a block end at height keeps its own checkpoint: it does inside the checkpoint
window (above checkpoint_floor, see checkpoint_floor), and at a height the
anchor-retention policy retains.
Persists the row-level (non-tree) data for a sequence of scanned blocks: block metadata,
transaction and note rows, spent-note marking, nullifier tracking and pruning, and — when
the transparent-inputs feature is enabled — transparent gap address maintenance for the
involved accounts.
Returns the account to record as having sent a decrypted shielded output, the recipient to
record against it, and its value; or None where the wallet has no send to record.