zebra_state::service::read::address

Module utxo

source
Expand description

Transparent address index UTXO queries.

In the functions in this module:

The block write task commits blocks to the finalized state before updating chain with a cached copy of the best non-finalized chain from NonFinalizedState.chain_set. Then the block commit task can commit additional blocks to the finalized state after weโ€™ve cloned the chain.

This means that some blocks can be in both:

  • the cached Chain, and
  • the shared finalized ZebraDb reference.

Structsยง

  • A convenience wrapper that efficiently stores unspent transparent outputs, and the corresponding transaction IDs.

Constantsยง

Functionsยง

  • Returns the unspent transparent outputs (UTXOs) for the supplied transparent::Addresses, in chain order; and the transaction IDs for the transactions containing those UTXOs.
  • apply_utxo_changes ๐Ÿ”’
    Combines the supplied finalized and non-finalized UTXOs, removes the spent UTXOs, and returns the result.
  • Returns the UTXO changes for addresses in the non-finalized chain, matching or overlapping the UTXOs for the finalized_tip_range.
  • Returns the unspent transparent outputs (UTXOs) for addresses in the finalized chain, and the finalized tip heights the UTXOs were queried at.
  • Returns the transaction::Hashes containing the supplied UTXOs, from the non-finalized chain and finalized db.