feat(node): Add GetCFHeaders to the node handle#1088
Open
Davidson-Souza wants to merge 1 commit into
Open
Conversation
11 tasks
jaoleal
reviewed
May 28, 2026
| /// Remote peer sent us a Utreexo proof, | ||
| UtreexoProof(UtreexoProof), | ||
|
|
||
| CFHeaders(CFHeaders), |
Member
There was a problem hiding this comment.
Suggested change
| CFHeaders(CFHeaders), | |
| /// Remote peer sent us compact block filter headers | |
| CFHeaders(CFHeaders), |
| /// leaf data are the actual data of the leaves (i.e., the txouts). | ||
| GetBlockProof((BlockHash, Bitmap, Bitmap)), | ||
|
|
||
| GetCFHeaders { |
| extract_variant!(Ping, val) | ||
| } | ||
|
|
||
| pub async fn get_cfilters_headers( |
| return Err(PeerError::MessageTooBig); | ||
| } | ||
|
|
||
| if cfheaders.filter_type != 0 { |
Member
There was a problem hiding this comment.
Suggested change
| if cfheaders.filter_type != 0 { | |
| if cfheaders.filter_type != BASIC_FILTER_VERSION { |
luisschwab
reviewed
May 28, 2026
Comment on lines
+111
to
116
|
|
||
| GetCFHeaders { | ||
| start_height: u32, | ||
| stop_hash: BlockHash, | ||
| }, | ||
| } |
Member
There was a problem hiding this comment.
rust-bitcoin already implements this: https://github.com/rust-bitcoin/rust-bitcoin/blob/master/p2p/src/message_filter.rs#L236-L245
/// getcfheaders message
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct GetCFHeaders {
/// Byte identifying the type of filter being returned
pub filter_type: u8,
/// The height of the first block in the requested range
pub start_height: BlockHeight,
/// The hash of the last block in the requested range
pub stop_hash: BlockHash,
}
Member
Author
There was a problem hiding this comment.
This method doesn't allow you to pick the filter type. Is this useful in any kind?
Member
There was a problem hiding this comment.
Not currently, but you can just hardcode filter_type to 0.
Member
Author
There was a problem hiding this comment.
Oh, we can't use it because it doesn't implement Hash.
This message allows fetching Compact Block Filter Headers from some peer, and will be used both for implemeting the equivalent RPC and by getfloresta#1079 to sync the filter header store.
f80e83a to
a901701
Compare
Member
Author
|
Pushed a901701:
|
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.
Split off from #1079
This message allows fetching Compact Block Filter Headers from some peer, and will be used both for implemeting the equivalent RPC and by #1079 to sync the filter header store.
Changelog