bitcoin-dev

Great Consensus Cleanup Revival

Great Consensus Cleanup Revival

Original Postby Eric Voskuil

Posted on: July 4, 2024 14:45 UTC

The discussion begins with an explanation of how libbitcoin uses a special fork of the secp256k1 library, which is primarily written in C.

The necessity for maintaining separate versions on different git branches emerged due to regular breaking changes to its API before it started being versioned, leading to a gradual phase-out of this practice. Highlighting the project's scale, it is mentioned that among 10 repositories and over half a million lines of code, the project predominantly does not maintain external code, with the exception of an embedded qrencode copy and a singular .c file utilized across the entire initiative. This file, mmap.c, is specifically employed for msvc builds.

Continuing, the conversation shifts towards the broader topic of programming languages and their suitability for various tasks within software development. There is an explicit caution against the widespread use of C across an entire codebase due to its lack of memory safety. However, it acknowledges C’s unparalleled utility in understanding low-level memory management, particularly in critical areas of code execution. The narrative contrasts this with the ease of use associated with C++ or Rust, noting however that choosing these languages may not always yield optimal performance or guarantee protection against side-channel attacks. Furthermore, it touches upon the controversies and challenges surrounding language preference, indirectly referring to debates (termed as "language Jihad") without delving into specifics.

Lastly, the email clarifies that the initial query did not concern the handling or implications of null pointer values in C or C++, whether directly or through abstractions. This point underscores the technical specificity often required in discussing programming languages and their applications, reinforcing the importance of clarity and accuracy in such debates.