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 theStack

Posted on: March 17, 2024 19:48 UTC

The development and enhancement of BIP324, particularly focusing on peer-to-peer (p2p) communication towards version 2, have sparked notable interest among programming enthusiasts.

A collaborative effort is underway to create a Rust implementation aimed at integrating seamlessly with pre-existing TCP logic through an API. This initiative emphasizes minimizing dependencies, achieving significant progress by narrowing down to a few essential ones from rust-bitcoin. The forthcoming task involves constructing a top-level API around the Floresta Rust client, with efforts concentrated on this aspect within the current week. The project repository can be accessed here.

The motivation behind reducing cryptographic dependencies and opting for their reimplementation has been questioned, considering whether it stems from specific limitations within available Rust crates or represents a broader philosophical approach akin to strategies employed in Bitcoin Core. Despite Rust's efficient package management system and the potential advantages of relying on well-supported cryptographic libraries for optimization purposes, the decision leans towards dependency minimization.

Furthermore, a related project has initiated a Rust rewrite, currently in its nascent stages. This early version establishes a local server socket capable of acknowledging incoming client connections without engaging in thread creation. The immediate strategy includes developing a basic proxy (v1<->v1) before incorporating BIP324-specific functionalities. This endeavor and its progress can be followed through the repository located at https://github.com/theStack/bip324-proxy/tree/rust_rewrite. Contributions across various forms, including code, recommendations on network programming in Rust, and insights into common pitfalls, are highly encouraged to foster these projects' growth and refinement.