Witness transaction index#117
Open
Sjors wants to merge 3 commits into
Open
Conversation
This was referenced Jun 13, 2026
Owner
Author
|
Rebased after bitcoin#34636 |
Owner
Author
|
Rebased after bitcoin#35173 and shortened thread name. |
Owner
Author
|
Adopted the more compact encoding from bitcoin#35531. No backward compatibility since this would be a new index. |
|
If we have no need for backwards compatibility, we will only be doing iterator seeks. In that case, we don't need to have bloom filters enabled on the txindex db, since only Get point reads consult the bloom filters. That should shave off some GBs and make it a little faster to index. |
Owner
Author
I mean specifically for the new |
Owner
Author
|
Found it, will disable that for |
9902d40 to
19b804d
Compare
Introduce BaseTransactionIndex and move transaction-position writing into an index-specific WriteBlock hook. Subclasses receive block context and choose how to write and match their own transaction identifiers.
Co-authored-by: Andrew Toth <andrewstoth@gmail.com>
LevelDB bloom filters are useful for exact key lookups, but compact txindex keys are looked up with a prefix seek followed by collision scanning. Make BaseIndex bloom-filter use configurable so compact-key -wtxindex can opt out while legacy -txindex keeps the existing default. Co-authored-by: Andrew Toth <andrewstoth@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kind of hoping we don't need this.
This uses the new encoding proposed in bitcoin#35531. Once that's merged, this PR should be rebased, and move much of the implementation to the
BaseTransactionIndexclass. The-txindexneeds to support both encodings, while-wtxindexdoesn't need to be backward compatible. The current code retains the old encoding for-txindexand only uses the new encoding for-wtxindex, so that needs to be made flexible.100% vibe coded
Can be combined with #116, see #118.