// Spiral Q4 Report #Bitcoin
The Spiral Series
- 2024.08 Vol.2 // Spiral Goals
- 2024.09 Vol.2 // Spiral Q3 Report
- 2025.01 Vol.3 // Spiral Q4 Report
AFK for a bit due to the addition of a new family member! But work focused on the BIP324 API.
asynchronous api
The BIP324 library is written in a “sans-io” style which make it extremely adaptable to any runtime a caller happens to be using. Nowadays though, asynchronous runtimes are the most popular for light clients, so adding a usability wrapper around the sans-io primitives to make it easier to integrate the library in these contexts.
- [CODE] Async Protocol Interface in rust-bitcoin/bip324 // Add the high level
AsyncProtocol
interface for callers using asynchronous runtimes. - [CODE] Tokio Integration in rust-bitcoin/bip324 // Make it even easier for callers using the popular Tokio asynchronous runtime.
- [LOG] Cancellation Safety // There are come traps using futures and buffers. Cancellation issues were very obvious in the BIP324 library.
replace crypto implementations
The cryptography primitives worked on in Q3 have made their way into rust-bitcoin/hashes and rust-bitcoin/chacha20_poly1305. BIP324’s internal versions can now be dropped and replaced by these dependencies. The BIP324 code can focus just on the protocol specific logic.
- [CODE] Switch the HKDF Implementation in rust-bitcoin/bip324 // Drop the custom implementation for the one that lives in rust-bitcoin.
- [CODE] Switch the ChaCha20 Poly1305 Implementation in rust-bitcoin/bip324 // Woohoo! This is the big one. Nice to drop the custom implemenation.
v2 serialization
Another bit of logic to push down into rust-bitcoin/bitcoin is how V2 messages are encoded over the wire. The last “dangling” module, cleaning it up leaves the library in an extremely focused state.
- [CODE] Tweak some existing serde logic in preperation extension in rust-bitcoin/rust-bitcoin // One of those very small code changes which took quite a long time to come up with. Long description on the patch to ensure all developers see why it is necessary.
- [CODE] Add BIP324 V2 p2p network message support in rust-bitcoin/rust-bitcoin // Pretty clean upgrade. Once this is released the final “not really BIP324 encryption logic” can be dropped in the BIP324 library.
clients
With performance upgrades in place and easier integration interfaces available, let’s get this thing into some light clients!
- [CODE] Upgrade bip324 to v0.6.0 in rustaceanrob/kyoto // Rob was nice enough to upgrade to the
v0.6.0
version of the bip324 library in the kyoto client. It shows off the new async API and hopefully is a blueprint for other clients.
etc
- [LOG] Network Metadata Leakage // Took another pass at the general issue of network privacy. It is an interesting problem that appears to effect all levels of the sovereign stack, from payjoin to ecash mints.
- [LOG] Commitment Schemes // The next step in my cryptographic journey as I build up to an understanding of things like Bulletproofs.
- [LOG] Blind Signatures and [LOG] Ecash // Checked out the cryptography behind ecash and how ecash mints fit into the bitcoin ecosystem. Interesting how network metadata privacy is an issue here too.