feat(core): make block data generic - #172
Merged
Merged
Conversation
Collaborator
|
concept ACK |
|
Concept ACK. The initial backend interface was coupled with blindbit. This is good step towards integrating other backend. |
cygnet3
force-pushed
the
feat/add-generic-blockdata-trait
branch
from
September 12, 2026 12:49
1f593ed to
16d90e4
Compare
cygnet3
marked this pull request as ready for review
September 12, 2026 12:51
cygnet3
force-pushed
the
feat/add-generic-blockdata-trait
branch
from
September 12, 2026 14:07
16d90e4 to
0423c12
Compare
sdmg15
reviewed
Sep 12, 2026
| fn tweaks(&self) -> Vec<PublicKey>; | ||
|
|
||
| // temporary, will be dropped later | ||
| fn input_hashes_map( |
There was a problem hiding this comment.
When I initially checked this when it was draft I wanted to mention this. This seems like more specific to blindbit if I'm not mistaken, what do you think about having a default implementation?
cygnet3
force-pushed
the
feat/add-generic-blockdata-trait
branch
from
September 12, 2026 22:57
0423c12 to
23ae37a
Compare
Instead of doing all bip158 filter checking on the spdk-wallet side, the scanner should accept any generic input/output checking, whether we use bip158 or not. Instead of returning the Filters in a BlockData struct and have the scanner check for matches, we keep the BlockData struct generic (it is now a Trait). This trait exposes 'check_block_inputs' and 'check_block_outputs' functions, which internally use either bip158 or whatever else.
Instead of having the chain backend return a spent_index, which is interpreted by the scanner, have the chain backend expose an endpoint for detecting all spent outpoints at the given block height.
cygnet3
force-pushed
the
feat/add-generic-blockdata-trait
branch
from
September 12, 2026 23:21
23ae37a to
459929d
Compare
sdmg15
approved these changes
Sep 14, 2026
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.
check_match_inputsandcheck_match_outputs, which implements either bip158 filters or any other type, depending on the backend typeChainBackend::spent_indexwithdetect_spent_outpoints. Instead of having the scanner parse the spent index, move the responsibility to the chain backend.