bitcoin-antithesis - This Week in Bitcoin Core #53
This week bitcoin-antithesis repo was made...
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, dergoegge posted the Bitcoin Antithesis test repo calling for developers to help contribute. See more info in the IRC meeting notes.
Merged PR’s
Every week, several changes are officially added to Bitcoin Core. This week, multiple changes were merged. Here are some I found interesting this week.
wallet: store all witness variants of a transaction by achow101
In this pull request, Ava Chow fixed a long-standing wallet gap where a same-txid transaction with a different witness would just get ignored. Now the wallet keeps those witness variants alongside the known tx, so it actually knows about every wtxid version of its own transactions.That also helps with fee math on replacements, since different witnesses can mean different feerates. One variant is picked as the canonical tx (confirmed if there is one, otherwise the lightest), older wallets can still load the data, and
gettransaction/listtransactionsnow surface the extras via analternate_wtxidsfield. Nice close to an issue that had been open for years.fuzz: exercise the transaction-handling path in process_message(s) by HowHsu
More fuzz coverage landed this week. HowHsu had a PR merged that finally gets theprocess_messageandprocess_messagesharnesses into the transaction-handling path that was basically unreachable before.Those targets used to stay stuck in IBD and mine bare
OP_TRUEcoinbases, so net processing bailed early and anything that did spend those coinbases got rejected as nonstandard. The mempool stayed empty the whole time. Now the fuzz input can toggle IBD, coinbases use a spendableP2WSH_OP_TRUEoutput, and the reused mempool gets rebuilt when it goes dirty.As always, more fuzzing is welcome, and who knows, maybe this one finds something interesting down the line.
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.
refactor: Add util::Result failure types and ability to merge result values by ryanofsky
Add `util::Result` support for returning more error information and make use of it in [LoadChainstate method](https://github.com/bitcoin/bitcoin/pull/25665/commits/753b8678ac98c8753f9db17cc92d56d4d58d9e7e) as an initial application. Followup PRs [#25722](https://github.com/bitcoin/bitcoin/pull/25722) and [#29700](https://github.com/bitcoin/bitcoin/pull/29700) use it more broadly to return errors and warnings from wallet and kernel functions as well. This change adds two major features to the result class: - For better error handling, adds the ability to return a value on failure, not just a value on success. This is a key missing feature that makes the result class not useful for functions like `LoadChainstate()` which produce different errors that need to be handled differently [^1]. - For better error reporting, adds the ability to return warning messages and multiple errors, not just a single error string. This provides a way for functions to report errors and warnings in a standard way, and simplifies interfaces
IRC meeting notes
Every week on Thursday, there is an IRC meeting. Here are some short notes from that meeting.
--- Topic 1 ---
fjahr: #topic Fuzzing WG Update (dergoegge, marcofleon)
dergoegge: https://github.com/dergoegge/bitcoin-antithesis
dergoegge: I've published the antithesis test repo
dergoegge: Please come contribute if you are interested
dergoegge: Some more docs on how the tests are structured: https://antithesis.com/docs/product/test_templates/
dergoegge: lmk if there are any questions
dergoegge: that's it
fjahr: dergoegge: any specifc area where you think more tests are most interesting?
dergoegge: I think we could test assumeutxo with this really well
dergoegge: I have some more ideas on this, feel free to join the bitcoin-core-fuzzing channel to discuss
fjahr: thanks!
--- Topic 2 ---
fjahr: #topic Kernel WG Update (sedited)
sedited: I've pushed an update to #35187
sedited: The introduced block validation function there now takes a callback to fetch coins supplied by the caller
sedited: purpleKarrot opened #35904 as a proposed plan for factoring out a separate validation library.
sedited: The idea being that this library lives one level underneath the kernel library.
sedited: The kernel library would eventually link against it and re-use some of its headers.
sedited: maybe purpleKarrot wants to add something?
willcl-ark: I like the idea of the stateless validation library
cfields: hi
fjahr: purpleKarrot: speak now or... ;)
purpleKarrot: Yes, please have a look #35904. If you want more background information, read my blog at purplekarrot.net and also have a look at std::bitcoin.
cfields: willcl-ark: +1
purpleKarrot: https://github.com/purpleKarrot/std-bitcoin
fjahr: thanks
--- Topic 3 ---
fjahr: #topic QML GUI WG Update (johnny9dev)
johnny9dev: Deciding on what to finish before theoretically merging upstream. Those will be tagged as Beta in the project board.
johnny9dev: I think we have most of that tagged.
johnny9dev: Working on the staging branch in parallel
johnny9dev: https://github.com/johnny9/bitcoin/pull/1
johnny9dev: This is a theoretical first chunk
johnny9dev: The preview build has some significant performance fixes in and published at bitcoincore.app
johnny9dev: That's all for now
willcl-ark: so +5k lines in 247 commits (to review); does that all need to go in together? Or are there ways to break that down for review
fanquake: Where does the base of that PR start? Looks like the first commit is also modifying files that don't exist in master?
fanquake: i.e src/qml/bitcoin.cpp
johnny9dev: Github renders the order strange for me by date.
johnny9dev: And the it goes right into the qml app commit history
fjahr: it?
johnny9dev: The PR. It is based on a recent master and it starts with cmake files and the initial app module
johnny9dev: Then goes into the qml app commit history
johnny9dev: Sorry just had spotty network.
willcl-ark: ok
--- Topic 4 ---
fjahr: #topic QA WG Update (brunoerg)
brunoerg: no updates this week
--- Topic 5 ---
fjahr: #topic Benchmarking WG Update (l0rinc, andrewtoth_)
andrewtoth_: l0rinc made some pretty cool benchmarks https://github.com/bitcoin/bitcoin/pull/35531#issuecomment-5170999892
andrewtoth_: not much else to report, thanks
--- Topic 6 ---
fjahr: #topic static builds (fanquake)
fanquake: Just wanted to raise that #25573 is now in a state where it can get some proper testing.
fanquake: It's switched to glibc 2.44, which has some changes we upstreamed, and the final (cross arch) reproducibility issues have been fixed.
fanquake: There are some bins up here https://github.com/fanquake/bitcoin/releases/tag/static_bitcoind_ff01e5af948d
fanquake: It would be great to have some testing in more environments/setups.
fanquake: I've posted something with a bit of info to the mailing list as well: https://groups.google.com/g/bitcoindev/c/UgGHs-_YGvw
fanquake: Thats all
sedited: nice :D
fjahr: Anything else to discuss?
fjahr: Feature freeze is in 2 weeks I think?
sedited: yes, feature freeze
sedited: It would be nice to get #35642 before feature freeze (though it needs rebase and I guess sipa is not here).
sedited: Also would be good to get some eyes on #35351.
sedited: Release schedule at #35122
darosior: I'll take a look at 35351
darosior: Sorry, 35642
fjahr: Anything else?
darosior: I started setting up a ckpool for testnet5. Configuring it for testnet4 for now, so we can have some hashrate pointed to it. Then i could use it to mine the genesis block (maybe at the end of the month?) and support the network until professional miners take over.
fanquake: Would be good to get another set of eyes over #35699, can probably put that in soon, before it gets any chunkier
darosior: Hosting it at Chaincode. Anybody who has some hashpower they can plug for a couple months would be welcome
darosior: fanquake: will review that too.Read here for the full meeting
Releases
No releases
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



