Skip to content
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

Disallow certain message types under BIP324 v2 transport #29632

Closed
dergoegge opened this issue Mar 12, 2024 · 2 comments
Closed

Disallow certain message types under BIP324 v2 transport #29632

dergoegge opened this issue Mar 12, 2024 · 2 comments

Comments

@dergoegge
Copy link
Member

dergoegge commented Mar 12, 2024

V2 transport presents a unique opportunity to disallow a couple p2p messages that we can't deprecate under v1 given their usage. Of the top of my head, it seems like the following things could be disallowed:

  • Bloom filters should not be used and are superseded by client side filtering. filter{add,clear,load}, merkleblock and mempool could therefore be disallowed.
  • V1 address relay was superseded by V2 address relay (not to be confused with BIP324 v2 transport). addr could therefore be disallowed.
  • getblocks makes very little sense which is why Bitcoin Core no longer sends it. Syncing headers before downloading blocks should always be preferred. getblocks could therefore be disallowed.

This might be too late to squeeze in and would require BIP changes as well but long term it seems worthwhile considering. If we ever get rid of v1 transport we can delete the entire code for the things mentioned above (and maybe more?)!

@dergoegge dergoegge changed the title Deprecate certain message types under BIP324 v2 transport Disallow certain message types under BIP324 v2 transport Mar 12, 2024
@fanquake fanquake added the P2P label Mar 12, 2024
@fjahr
Copy link
Contributor

fjahr commented Mar 15, 2024

Thinking if this would become an issue if we expect other projects to adopt BIP324 via something like BIP324 Proxy. If that were to happen and stay that way mid/long term, I am not sure this is a good idea. Or, on the flipside, if it is a good idea I guess worst case something like BIP324 Proxy becomes infeasible as a quick fix for most projects.

CC @theStack

@sipa
Copy link
Member

sipa commented Mar 15, 2024

I think it's far too late to add something like this to do BIP324, and I don't see the benefit really - we need the logic to keep supporting these messages (to the extent they aren't optional like bloom filters) anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants