Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a column family to zebra-state tracking [spent Outpoint] -> [transaction::Hash that spent the output] #8837

Closed
Tracked by #8610
arya2 opened this issue Sep 4, 2024 · 0 comments · Fixed by #8895
Assignees
Labels
A-state Area: State / database changes

Comments

@arya2
Copy link
Contributor

arya2 commented Sep 4, 2024

Motivation

This index is needed for the zcashd replacement wallet.

@arya2 arya2 added the A-state Area: State / database changes label Sep 4, 2024
@github-project-automation github-project-automation bot moved this to New in Zebra Sep 4, 2024
@mpguerra mpguerra moved this from New to Sprint Backlog in Zebra Sep 9, 2024
@arya2 arya2 moved this from Sprint Backlog to In progress in Zebra Sep 25, 2024
arya2 added a commit that referenced this issue Sep 25, 2024
…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.
arya2 added a commit that referenced this issue Oct 21, 2024
…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.
arya2 added a commit that referenced this issue Nov 19, 2024
…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.
arya2 added a commit that referenced this issue Nov 19, 2024
…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.
arya2 added a commit that referenced this issue Nov 22, 2024
…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.
mergify bot pushed a commit that referenced this issue Jan 27, 2025
…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
@mergify mergify bot closed this as completed in #8895 Jan 27, 2025
@github-project-automation github-project-automation bot moved this from Review/QA to Done in Zebra Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-state Area: State / database changes
Projects
Status: Done
2 participants