-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(state): Track spending transaction ids by spent outpoints and rev…
…ealed nullifiers (#8895) * Adds new column family for [spent_out_loc] -> [spending_tx_loc] with a read method and an update to `prepare_spending_transparent_tx_ids_batch()` for maintaining it when committing blocks to the finalized state. Adds TODOs for remaining production changes needed for issue #8837. * add spending tx ids for spent outpoints to non-finalized chains * adds a `spending_transaction_hash()` read fn for the new column family * Adds a `TransactionIdForSpentOutPoint` ReadRequest and a `TransactionId` ReadResponse * Updates snapshots, removes outdated TODOs, moves a TODO. * Clarifies `spent_utxos` field docs, fixes an assertion * import TypedColumnFamily from `finalized_state` instead of from the crate. * adds db format upgrade for spent outpoints -> tx hash * adds revealing tx ids for nullifiers in finalized and non-finalized states * updates nullifiers column families to include revaling transaction locations in db format upgrade * Renames new read state request to `SpendingTransactionId` and updates its type to a `Spend` enum * refactor db format upgrade and prepare_nullifiers_batch() to use ZebraDb instead of DiskDb, checks cancel_receiver before every db operation * Adds acceptance test for checking that the finalized state has spending transaction ids * Adds variant docs to zebra_state::request::Spend enum * Updates Zebra book with the latest changes to the rocks db column families * Updates acceptance test to check non-finalized state * adds a few log messages to the acceptance test, reduces frequency of logs for progress updates * fixes docs lint and skips test when there is no cached state * Avoids returning genesis coinbase tx hash when indexes are missing * Adds `indexer` compilation feature in zebra-state and build metadata in db format version file * stops tracking new indexes in finalized state when feature is unselected * stops tracking new indexes in non-finalized state when indexer feature is unselected * condenses imports * - adds build metadata when writing db version file, if any. - adds the build metadata to the db version file before adding indexes. - deletes indexes when running without the `indexer` feature * Replaces dropping cf with deleting range of all items to avoid a panic when trying to open the db with that column family. * Fixes lint, avoids reading coinbase transactions from disk * updates db column families table * Document need for having an indexed cached state and use a multi-threaded tokio runtime in has_spending_transaction_ids test * fixes call to renamed `future_blocks` test fn * improves test logs and fixes a disk format deserialization bug * Replaces a new expr with a previously existing constant, fixes typo
- Loading branch information
Showing
43 changed files
with
1,008 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.