The ccoins are virtual now - This Week in Bitcoin Core #39
This week there was a PR review club after a long time...
Hello 👋 folks, I’m kevkevin. I’m an open-source developer and reporter for Insider Edition. Last week, I reviewed several pull requests from the Bitcoin Core repo.
This week l0rinc made CCoinsView in to a pure virtual class. Learn more about it in the merged pr’s section.
Merged PR’s
Every week, several changes are officially added to Bitcoin Core. This week, 10 changes were merged. Here are some I thought were interesting from this week.
validation: make CCoinsView a pure virtual interface by l0rinc
This change is an improvement to the
CCoinsViewinterface. What this PR does is make CCoinsView a pure virtual interface. It introducesCoinsViewEmptywhich is a noop coins view. Instead of declaring a dummy coinsDummy and then creating aCCoinsViewCachefrom that, we can just useCoinViewEmpty::Get().
All of these methods were made to be pure virtual,PeekCoin,GetCoin,HaveCoin,GetBestBlock,GetHeadBlocks,BatchWrite,Cursor,EstimateSize.This change also removed the legacy default implementation from coins.cpp.
This change is a refactor, so it does not give any functional change to the codebase, but it does make interfacing with CCoinsView much more straightforward to understand. Refactoring the confusing codebase of Bitcoin Core to become easier to understand is always a win.test: modernize interface_http and cover more libevent behavior by pinheadmz
This is a follow-up to tests: Expand HTTP coverage to assert libevent behavior and a prerequisite to Replace libevent with our own HTTP and socket-handling implementation. If you have been following these posts, you would know that the Libevent removal is moving forward.
This is yet again another PR that helps get Libevent removed in favor of our own HTTP socket handling implementation. This PR was only a testing change updatingtest/functional/interface_http.pyto cover more Libevent behavior, so when the migration is fully complete, there are no hidden bugs or functionality that was expected to exist.
If you want to keep up to date on the Libevent changes, be sure to follow the tracking issue.
There are always changes being updated and reviewed in real-time. Here are some notable PR’s that are still up and looking for reviews.
fuzz: add p2p_private_broadcast harness by frankomosh
Add a fuzz harness for ConnectionType::PRIVATE_BROADCAST, a privacy-preserving transaction relay mechanism whose p2p code paths had no meaningful fuzz coverage.
Current process_message touches it but is insufficient in exercising it. It creates PRIVATE_BROADCAST nodes via ConsumeNode(), but some structural problems prevent it from covering the relevant logic:
m_tx_for_private_broadcast is never seeded, PushPrivateBroadcastTx always takes the immediate disconnect path (7 accidental hits, all on lines 3559–3562). Lines 3564–3570 (the actual INV send) had 0 hits.
ALL_NET_MESSAGE_TYPES is used as the message pool. CConnman::PushMessage silently drops anything outside the five-type allowlist for private broadcast connections, wasting most iterations.
Connection types are picked randomly, hence private broadcast coverage is accidental.
To solve the issues above;this harness explicitly constructs nodes with ConnectionType::PRIVATE_BROADCAST
seeds m_tx_for_private_broadcast via InitiateTxBroadcastPrivate before the peer connects, so PushPrivateBroadcastTx reaches the transaction send path
constrains the message pool to the five types permitted by CConnman::PushMessage on private broadcast connections (VERSION, VERACK, INV, TX, PING)
passes ServiceFlags{NODE_NONE} to InitializeNode, matching what PushNodeVersion advertises for private broadcast peers.
IRC meeting notes
Every week on Thursday, there is an IRC meeting. Here are some short notes from that meeting.
<abubakarsadiq> #topic Benchmarking WG Update (l0rinc, andrewtoth)
<l0rinc> #34124 was merged, thanks for the reviews!
<l0rinc> Based on the discussion there, I opened #35078 as the next step in the coins cleanups.
<l0rinc> #34132 and #34320 were rebased after the recent merge - the Ubuntu PPA is probably still down, so CI doesn't always pass, but they're ready for review again.
<l0rinc> I'll be at a conference for the next few days, but want to focus on #34887 and #31132 again next week.
<l0rinc> I have also remeasured full reindex-chainstate on my Mac with our pending optimizations: it finished in 1h 14m
<l0rinc> on Umbrel is ~5h, full IBD aroun 8-10
<l0rinc> that's it from me - andrewtoth?<abubakarsadiq> #topic Net Split WG Update (cfields)
<cfields> been working on other things, no update this week<abubakarsadiq> #topic QML GUI WG Update (johnny9dev)
<johnny9dev> Finished up external signer support with bitcoin-core/gui-qml#547. Now working on the remaining set of wallet functionality bitcoin-core/gui-qml#548, bitcoin-core/gui-qml#550, and have a “Wallet Settings” page designed and will be implementing backup, password change, and delete with that. Finally, fixing an onboarding regression update with bitcoin-core/gui-qml#549
<johnny9dev> Also have had a lot of success with AI assisted designing using Figma and Christoph’s web prototype to generate some of these settings pages. So am pretty excited about that.
<johnny9dev> epicleafies: any update?
<johnny9dev> I don’t see him here but he has been focused on finishing all of the Receiving features
<johnny9dev> we;re getting really close to having the core features have some sort of implementation now.
<johnny9dev> that is all<abubakarsadiq> #topic Libevent removal (pinheadmz, fjahr)
<pinheadmz> I think we can target v32 for libevent removal
<pinheadmz> Some goodies merged this week
<pinheadmz> #32061 I’m gonna rebase and close and reopen a fresh PR with latest comments from hodlinator and basil’s
<pinheadmz> Oops vasild
<pinheadmz> That’s all!
<abubakarsadiq> There are no pre-proposed meeting topics this week. Any last minute ones?
<abubakarsadiq> Anything else to discuss?
<janb84> pinheadmz: pleas also look at my comments, they are hand checked / poc hand crafted
<pinheadmz> Oh yes artisanal comments
<pinheadmz> Really great actually. ThanksReleases
Thank you for reading. Be sure to tune in again next week for your updates on Bitcoin Core!
If there are any comments, suggestions, or errors, do not hesitate to reach out or comment



