Expand description
Sapling-specific database reading and writing.
The sapling scanner database has the following format:
name | Reading & Writing Key/Values |
---|---|
SAPLING_TX_IDS | SaplingTxIdsCf & WriteSaplingTxIdsBatch |
And types:
SaplingScannedResult
: same as transaction::Hash
, but with bytes in display order.
None
is stored as a zero-length array of bytes.
SaplingScannedDatabaseIndex
= SaplingScanningKey
| TransactionLocation
TransactionLocation
= Height
| TransactionIndex
This format allows us to efficiently find all the results for each key, and the latest height for each key.
If there are no results for a height, we store None
as the result for the coinbase
transaction. This allows is to scan each key from the next height after we restart. We also use
this mechanism to store key birthday heights, by storing the height before the birthday as the
“last scanned” block.
Constants§
- SAPLING_
TX_ IDS - The name of the sapling transaction IDs result column family.
Traits§
- Delete
Sapling 🔒Keys - Utility trait for deleting sapling keys in a WriteSaplingTxIdsBatch.
- Insert
Sapling 🔒Height - Utility trait for inserting sapling heights into a WriteSaplingTxIdsBatch.
Type Aliases§
- Sapling
TxIds Cf - The type for reading sapling transaction IDs results from the database.
- Write
Sapling TxIds Batch - The type for writing sapling transaction IDs results from the database.