forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 11
Add filter_spent to getsilentpaymentblockdata rpc #99
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
Open
macgyver13
wants to merge
17
commits into
Sjors:2025/04/bip352-index
Choose a base branch
from
macgyver13:macgyver/bip352-index-filtering
base: 2025/04/bip352-index
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add filter_spent to getsilentpaymentblockdata rpc #99
macgyver13
wants to merge
17
commits into
Sjors:2025/04/bip352-index
from
macgyver13:macgyver/bip352-index-filtering
Conversation
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
2948a9bf61 docs: update README 7100b18655 ci: enable silentpayments module 2f554e456a tests: add constant time tests aa15f37fe5 tests: add BIP-352 test vectors 0362ce3bdf silentpayments: add benchmarks for scanning 74246c4a0b silentpayments: add examples/silentpayments.c 3c75f1a436 silentpayments: receiving 7cc950bb2a silentpayments: recipient label support 84d7b9e763 silentpayments: sending 7cedb6cd5d build: add skeleton for new silentpayments (BIP352) module git-subtree-dir: src/secp256k1 git-subtree-split: 2948a9bf619ba97a0acf38056e6b27005448ebb6
Add a method for passing a KeyPair object to secp256k1 functions expecting a secp256k1_keypair. This allows for passing a KeyPair directly to a secp256k1 function without needing to create a temporary secp256k1_keypair object.
Wrap the silentpayments module from libsecp256k1. This is placed in common as it is intended to be used by: * RPCs: for parsing addresses * Wallet: for sending, receiving, spending silent payment outputs * Node: for creating silent payment indexes for light clients
Have `IsValidDestination` return false for silent payment destinations and set an error string when decoding a silent payment address. This prevents anyone from sending to a silent payment address before sending is implemented in the wallet, but also allows the functions to be used in the unit testing famework.
Use the test vectors to test sending and receiving. A few cases are not covered here, namely anything that requires testing specific to the wallet. For example: * Taproot script path spending is not tested, as that is better tested in a wallets coin selection / signing logic * Re-computing outputs during RBF is not tested, as that is better tested in a wallets RBF logic The unit tests are written in such a way that adding new test cases is as easy as updating the JSON file
This allows indexing to start from a specified start_height (default 0). This is particularly useful for blockfilter indexes in that a new filter type could be defined where the filter is only relevant after a certain block height (e.g. a filter for only taproot scriptPubKeys). Although this is currently not possible, start_height would also be needed if we wanted to enable an index in pruned mode (e.g. having a txindex for recent blocks). Co-Authored-by: Fabian Jahr <[email protected]>
Co-Authored-By: w0xlt <[email protected]> Co-Authored-By: furszy <[email protected]>
Adds an index identical to -bip352index that can be enabled with -bip352ctindex. Actual cut-through functionality is added in the next commit.
Existing index are not updated, so in order to advantage of cut-through for new blocks, it needs to be occasionally deleted and rebuilt.
This enables dust filtering. It has very little overhead.
…filtering (cut-through) is desired
1 task
Owner
|
Thanks, I'll see if I can use this in my next rebase round. |
cdf7de3 to
03ce1ad
Compare
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.
This PR improves the ability to audit with spent filtering (cut-through) conditionally when requesting tweaks
bitcoin node -bip352index -bip352ctindexto support spent filtering (cut-through)