delvingbitcoin

BIP324 Proxy: easy integration of v2 transport protocol for light clients (PoC)

BIP324 Proxy: easy integration of v2 transport protocol for light clients (PoC)

Original Postby 0xB10C

Posted on: March 14, 2024 10:57 UTC

In exploring the nuances of peer-to-peer (P2P) client compatibility with BIP324 proxy, a discussion unveils the intricacies involved in ensuring proper functionality and the necessary prerequisites for seamless integration.

The conversation highlights a particular focus on the correct setting of addr_recv, which is essential for compatibility with the BIP324 proxy. It's noted that not all clients adhere to this requirement, with specific reference to inbound connections from LinkingLion setting 127.0.0.1 and inbound connections from i2p and Tor, as used by Bitcoin Core, defaulting to 0.0.0.0. This discrepancy raises considerations for the README.md documentation to possibly include a section on prerequisites, identifying compatible clients and those known to be incompatible.

Further examination reveals that the current implementation of the proxy focuses solely on outbound connections, contrary to an initial assumption that it would cater to both inbound and outbound traffic. This clarification underscores the proxy's limited scope at this stage, though there is mention of investigating support for inbound connections via a reverse proxy as a future task. Moreover, the conversation touches upon a technical limitation concerning address serialization. Specifically, only version 1 address serialization is achievable within version messages for both inbound and outbound scenarios. This constraint means that the BIP-155 address serialization, which includes formats such as TorV3, I2P, and CJDNS, cannot be accommodated. As a result, these addresses will invariably be represented as 0.0.0.0, as detailed in the Bitcoin codebase (source). This limitation presents a significant challenge for achieving comprehensive compatibility and necessitates further exploration and potential solutions to accommodate a broader range of P2P client implementations in relation to the BIP324 proxy.