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

remove txid table if txindex is enabled #871

Closed
wants to merge 2 commits into from

Conversation

antonilol
Copy link
Contributor

@antonilol antonilol commented Apr 9, 2023

fixes #798
depends on #773 for clippy in the ci to succeed (there is a clippy bug in this rust version)

With bitcoind's txindex the txid column family (i called this 'table' in the linked issue) is not necessary and takes up about a quarter of the DB on disk. On testnet my DB was 2.62 GB before this PR, and 1.91 after, on mainnet I expect it to free around 10 GB of the 40 GB currently used.

If txindex is turned on, the txid cf will be emptied and not indexed, if it is turned off, electrs will reindex this cf

todo:

  • Working change that checks if txindex is on and empties the txid cf
  • Reindex the txid cf if txindex is turned off
  • Resolve todos
  • Test
  • Doc comments if any changes need explanation

@antonilol
Copy link
Contributor Author

i let this rot for too long, will look into it again after #1043

@antonilol antonilol closed this May 25, 2024
@antonilol antonilol deleted the optional-txid branch May 25, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: no txid table when txindex is enabled
2 participants