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
[WIP] Serve BIP 157 compact filters #18876
Conversation
This has Concept NACKs and should not be merged. |
@Empact @jamesob @Talkless @sipa @fjahr @pinheadmz @jonasnick @jkczyz @practicalswift @marcinja @MarcoFalke @kilrau @TheBlueMatt - thank you for your reviews on the original PR. I'm going to try to respond to feedback quickly to make progress on this. Please help by reviewing the linked PRs! |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
08ebd9e
to
4e9e004
Compare
Concept ACK Current Travis linter error:
|
Withdrawing my Concept NACK on the previous PR, ecosystem-wise, BIP157 is better that current light client solutions. Even if there is still long-term serious concerns, it's a broader point that this specific protocol. I can also envision people always servicing filters-headers only to provide filters correctness cheap services. Few points, maybe for follow-up works:
|
Concept ACK. I need a stronger, more convincing argument that improved light client protocols will drive the number of independent parties running and using a listening full node down. If I can be convinced of that I'd consider reversing the Concept ACK. It is clear that that metric is critically important to network health, I don't think there is any disagreement there. But I think a future where every mobile is a light client is just as likely to drive that number up. I will continue to follow the discussion on the mailing list. |
@michaelfolkson for discussion clarity, and maybe it isn't clear in my mail sorry, I don't think in any case it will drive the number of independent parties running and using a listening full node down. If bandwidth cost is too high, node operators are just going to stop turn |
Sure, that was clear from your mail @ariard. I'm referring to some of the responses to your mailing list post which make arguments for this specific PR to be NACKed. All this project (Bitcoin Core) can do is facilitate superior light client protocols (assuming they are not harmful to the full node ecosystem which I haven't been convinced they are). If the light client ecosystem doesn't take off or if node operators all choose to turn Personally, I think Concept ACK, Concept NACKs are fine to post here with a short explanation. But if we can keep as much of the discussion on the mailing list as possible I think that is preferable. |
Currently, there is a strong incentive to use your own node for privacy. Widely-deployed on nodes, BIP157 destroys this incentive. |
Running a full node will always be the superior option for privacy (and trust minimization) versus using a light client (improved or otherwise). If your primary objective is privacy the incentive is still there to run a full node. BIP157 reduces the gap between full node privacy and light client privacy that is true (light client privacy is improving). But this only affects a cohort of people who are wavering on whether to run a full node or not and see the privacy improvements of light clients as a reason not to. I have no idea how to quantify this cohort of people but I would be shocked if it was significant. Hence "destroys" seems to me to be a superlative. On the upside, if the light client ecosystem was to grow and prosper post BIP157 it would need an increased number of full nodes to serve them filters. If the number of full nodes didn't increase to serve this filter demand then the light client ecosystem will be stunted forcing the cohort discussed above to lean back towards running a full node. If the metric is "number of independent parties running and using a listening full node" I think growth of one ecosystem (light clients) has a positive impact on the growth of another (full nodes). If the metric is the ratio of light clients to "number of independent parties running and using a listening full node" then I think you have a point. I was of the understanding that we are more interested in the former than the latter. |
re-𝔸ℂ𝕂 0ab77d4 🐯 Only change since my previous review #16442 (comment) is:
Though, I was wondering why you dropped this hunk in the test:
Show signature and timestampSignature:
Timestamp of file with hash |
That was removed for the first PR (since |
Why would you download 144 MB/day if you could download 1MB/day? Think embedded/IoT devices, etc. Also, not everyone is privileged to have bandwidth where downloading 144 MB/day is nothing. It was not very far history when I had a FUP of 100MB/month on my cellphone plan. |
@chris-belcher if you assume this kind of chain backend are going to be primarily used for LN wallets, you may just bookmark confirmation of every of your funding outpoint. Even this kind of wallet may not expose at all onchain addresses. You already have to backup channel state, so their storage must already be stateful, you may just increase the scope of it to avoid rescan at all. |
Just as a general note, I think we should use pull requests for code review of the code changes, not for general protocol and design discussions. Otherwise, it will be hard to follow the review process in the noise. Also, GitHub will start hiding comments if there are too many, making it painful to even read the code review and previous review comments. This can lead to review comments being overlooked and be left unaddressed. |
🐙 This pull request conflicts with the target branch and needs rebase. |
The next PR in this sequence is #19010: net processing: Add support for getcfheaders |
Github-Pull: bitcoin#18876 Rebased-From: 4f159aa
if -peerblockfilter is configured, handle requests for cfheaders. Github-Pull: bitcoin#18876 Rebased-From: a4bbc4f
Github-Pull: bitcoin#18876 Rebased-From: 0ec5258
This only changes network serialization. Disk serialization is defined in ReadFilterFromDisk() and WriteFilterToDisk() and does not include the filter_type. Github-Pull: bitcoin#18876 Rebased-From: 5335fa8
if -peerblockfilter is configured, handle requests for cfilters. Github-Pull: bitcoin#18876 Rebased-From: 802c850
Github-Pull: bitcoin#18876 Rebased-From: 1e8a696
if -peerbloomfilters is configured, signal the NODE_COMPACT_FILTERS service bit to indicate that we are able to serve compact block filters, headers and checkpoints. Github-Pull: bitcoin#18876 Rebased-From: 94167bf
Test that a node configured to serve compact filters will signall NODE_COMPACT_FILTER service bit. Github-Pull: bitcoin#18876 Rebased-From: e8f40bb
…er index. Since the block filter index is updated asynchronously by proxy of the ValidationInterface queue, lazily synchronize the net thread with the block filter index in case lookups fail. Github-Pull: bitcoin#18876 Rebased-From: 5488ce9
Forgive me if this was discussed before, but do the served cfilters count against |
Yes, the number of bytes will be counted towards the upload target (but peers will still be able to download compact filters after the target is reached, just as they can still download transactions). |
This is almost the same change set as #16442 but:
This PR is marked WIP as it's a demonstration of the entire change. I'll split off commits into smaller PRs for merge.
The original PR has already received a lot of review, so I think it should be possible to get this merged over the next few weeks. To hold myself accountable, I'm targeting the following timeline. Obviously, the PRs shouldn't be merged until they've received thorough review.