Taproot BIP 9 deployment DELETED - This week in Bitcoin Core #36
This week Bitcoin Core removed the Taproot deployment code...
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, Sjors Provoost has his PR merged, which deleted the DEPLOYMENT_TAPROOT from consensus.vDeployments. This might sound scary, but this is just some cleanup work done now that, since v24.0, taproot is enforced for all blocks.
Read below for more information!
Merged PR’s
Every week, several changes are officially added to Bitcoin Core. This week, 42 changes were merged. Here are some I thought were interesting from this week.
rpc, logging: add backgroundvalidation to getblockchaininfo by polespinasa
Pol Espinasa opened this PR last year in August to update the getblockchaininfo RPC. This is because, before this change, it would return
verificationprogress=1andinitialblockdownload=falseeven if there was background validation.
What Espinasa’s change does is add information about background validation to thegetblockchaininfoRPC is similar to how thevalidationprogressRPC does.Policy: Report debug message why inputs are non standard by ismaelsadeeq
This PR is the second attempt at making this work. Abubakar Sadiq Ismail took a second attempt at a PR that was closed in 2018 that when a transaction goes through its validation checks and fails thePreChecksdue to it being non-standard now returns an invalid validation state and a debug error message.
Before this the debug error message would not specify why the inputs were considered non-standard. This means it would be difficult for a developer or user to understand why their transaction was marked as non-standard and failed.Remove Taproot BIP 9 deployment by Sjors
As mentioned earlier, it has been a while since we have included the taproot upgrade to Bitcoin Core. Since v24.0, all blocks enforce taproot to be exact. Sjors Provoost figured that it made sense to drop any code that might be related to the delployment of Taproot since we can safely assume that it has been successfully deployed and no longer needed.
This change removesconsensus.vDeploymentsfromconsensus.vDeployments. The logic for removing and not marking it at burried is because the activation height has been removed from the codebase, unlikeDEPLOYMENT_SEGWITof which the height is still relied on.
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.
net: fix premature stale flagging of unpicked private broadcast txs by Mccalabrese
Motivation
Currently, freshly added transactions inprivate_broadcastare almost immediately flagged and logged as stale by theresend-stalejob.The Bug
m_transactionsmaps a transaction to astd::vector<SendStatus>. Whentry_emplaceadds a new transaction, this vector is empty. WhenGetStale()runs,DerivePriority()evaluates the empty vector and returns a defaultPrioritystruct wherelast_confirmedevaluates to the Unix Epoch (Jan 1, 1970). The stale checker sees a 50-year-old timestamp and flags it on the next resend-stale cycle.The Fix
Rather than modifying the transientPrioritystruct or creating a “Zombie Transaction” edge case by ignoring transactions with 0 picks, this PR modifies the state container:Wraps the
SendStatusvector in a newTxSendStatusstruct insideprivate_broadcast.h.TxSendStatusautomatically capturestime_addedupon emplace.GetStale()now checksp.num_confirmed == 0to measure age againsttime_addedusing a new 5-minuteINITIAL_STALE_DURATIONgrace period, falling back tolast_confirmedand the standard 1-minuteSTALE_DURATIONonce network interaction begins.
IRC meeting notes
Every week on Thursday, there is an IRC meeting. Here are some short notes from that meeting.
<fjahr> #topic Kernel WG Update (sedited)
<sedited> no updates from me this week, and am going afk for the next three weeks.<fjahr> #topic Benchmarking WG Update (l0rinc, andrewtoth)
<andrewtoth_> nothing from me this week<fjahr> #topic Net Split WG Update (cfields)
<cfields> Finally some progress! I have a branch which cleans up all of the local address handling which is currently just a bunch of global functions used all over the place (GetLocal(), AddLocal(), etc). Ultimately they are all used for GetLocalAddrForPeer().
<cfields> My first step has been just to remove the dependencies on CNode and move all of the functions into a new LocalAddressManager. For now, it’s instantiated as a static global. Functionally there’s no change but it’s now 10x easier to understand how it all works and test. The next step will be to actually instantiate it and store it in node.
<cfields> While working on it, I discovered a few nasty leaks that should potentially be fixed. I’m working on testing and documenting so that I can propose some fixes and behavioral changes.
<cfields> Both streams (refactor and fixes) could potentially happen in parallel, but imo it’s _much_ easier to understand what’s going on and test after refactoring to a sane manager class. So I’ll probably PR that work first.
<fjahr> Cool, anything else on net split?
<cfields> Nope, that’s it for now.<fjahr> #topic QML GUI WG Update (johnny9dev)
<johnny9dev> The decoupling of qml from the qt widgets gui is done. A part of that also included the last piece of automated test tools for the project. Specifically gmock for mocking the wallet and node interfaces
<johnny9dev> so the project now has comprehensive testing. unittests, qml tests, and end to end gui tests
<johnny9dev> Feature wise wallet import/restore was merged and a pr for wallet migration is up and this week i did all of the features for fee setting. Those will be PR’d the next couple of days
<johnny9dev> epicleafies has a bunch of PRs lingering for features he completed so my top priority is to finish reviews of all of those now that the test frameworks are settled and they all no longer have conflicts
<johnny9dev> epicleafies: can you share your status?
<fanquake> gmock as in Google Test / Mock?
<epicleafies> Yeah, this past week I’ve created PRs for adding desktop tray icon/functionality and the rpc console page
<johnny9dev> yeah thats what I know for mocking. open to swapping it out later but I’ve always liked it.
<johnny9dev> only using gmock, nothing from gtest
<fjahr> seems like that’s it for gui?
<johnny9dev> yeah thats it. we’ll be PRing a few more features and then i will likely do another assestment to see what the remaining gap is and I will share that<fjahr> #topic Libevent removal (pinheadmz, fjahr)
<pinheadmz> #32061 has been rebased following great reviews on code style and deeper http protocol. I am running fuzzers on the branch this week and will re-run my integration tests with lnd, electrs, etc as well. The first 7 commits add tests and utilities, and are split off in to two small PRs which are in review, and I’m pushing updates today: #34772 and #34905
<fjahr> From my side, I am still getting some good on the torcontrol PR (#34158) and respond to that as quickly as possible. I think it looks to be in pretty good shape by now.
<fjahr> *good review
<fjahr> That concludes the WGs unless I missed someone<fjahr> #topic asmap file format & tooling (sipa)
There was quite a bit of conversation on this topic, read the full meeting in minutes to get the full scoopReleases
https://github.com/bitcoin/bitcoin/tree/v31.0rc1
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



