Add tx_loc_by_transparent_addr_loc index to the finalized state #3951
Labels
A-state
Area: State / database changes
C-enhancement
Category: This is an improvement
lightwalletd
any work associated with lightwalletd
Motivation
We want to answer transparent address RPCs quickly, so we need new indexes in the finalized state.
Designs
tx_loc_by_transparent_addr_loc
stores transaction locations by address. This list includes transactions containing spent UTXOs.It also includes the
TransactionLocation
of transaction for theAddressLocation
. (This duplicate data is small, and helps simplify the code.)Types
TransactionLocation
: the height and transaction index of a transaction. Used instead of the hash, to make indexes smaller.OutputLocation
: the height, transaction index, and output index of a transparent output. Used instead of the outpoint, to make indexes smaller.AddressLocation
: the firstOutputLocation
used by atransparent::Address
. Always has the same value for each address, even if the first output is spent.https://github.com/ZcashFoundation/zebra/blob/main/book/src/dev/rfcs/0005-state-updates.md#rocksdb-data-structures
Tasks
Implementation:
Testing:
CI:
The text was updated successfully, but these errors were encountered: