TriangleBitDevs / TriangleBitDevs.github.io

Triangle BitDevs Website
https://trianglebitdevs.org/
MIT License
2 stars 3 forks source link

Socratic Seminar 14 #4

Closed jesseaam closed 1 year ago

jesseaam commented 1 year ago

Bitcoin Core

Bitcoin Core v24.0.1 released

Bitcoin Core 24.0.1 was published on bitcoincore.org on December 12, 2022 . This was the first announced release of the v24 branch. This version had a lot of improvements (ref) including

The releases of the bitcoin software are not regular, as they are contingent on new features and bug fixes. v24 was postponed due to the full RBF discussion. On November 24, v24.0.0 was listed in the bin directory of bitcoincore.org, however, only v24.0.1 can be found in thereleases. And also, we can see the latest release on GitHub is v24.0.1 and there is no sign of v24.0.0. So what happened to v24.0.0? It turns out that there was a bug in the release v24.0.0 that was found immediately after v24 was included in the bin directory of bitcoincore.org.

the bug

Summary You could lose money by overpaying on transaction fees. In bitcoin core you can automatically allow the Wallet to select the coins to use, or you can select the coins (coin control). Or some combination of both.

There was a bug in this. The bug was that you would select a couple of coins, then the wallet would use those coins twice to calculate the fee required. The result of this is that you could potentially be paying a very large fee. Fortunately, in Bitcoin Core there is a warning in place if you pay an absurdly high fee, like this example:

How did this get in code?

The bug was one line of code (break out of a loop). Part of refactoring: rewrite same code simpler and often easier to read and follow. The old code was doing like 12 separate steps to remove coins once you manually selected them and with the new code it was just 2 steps, so much more elegant code.

But, a mistake was made replicating the original code. Mistake was not caught during code review and also there were no tests that failed. Also, it was only in the release and not the master branch.

  1. Bug introduced through refactoring
  2. Then development branch released
  3. Then bug accidentally fixed on Master (another refactoring).

So this decreased the odds of finding it since most people are testing the master branch. Only people testing release branch.

Back-porting

Backporting is the process of porting bug fixes, patches and new features from a newer version of a program to an older version. This is done to ensure that the older version can take advantage of the improvements made in the newer version without having to upgrade to the latest version.

This is why there are multiple versions of bitcoin released on https://bitcoincore.org 23.1, 22.1, and 24.0.1

discussion points

  1. What are the advantages and disadvantages of refactoring code?
  2. What can be done to prevent bugs from being introduced through refactoring?
  3. What is the importance of back-porting bug fixes and new features from newer versions of software?
  4. Is the process of releasing new versions of software secure enough to guarantee user safety?


wallet: bugfix, invalid CoinsResult cached total amount #26560

Ref: https://podcasts.apple.com/us/podcast/bitcoin-explained-70-bitcoin-core-v24-bug/id1532957243?i=1000591680829

Side note about difference between bitcoin.org and Bitcoin Core GitHub repo
It's important to note that bitcoin.org and the official Bitcoin Core GitHub repository are maintained by different groups of people. bitcoin.org is maintained by the Bitcoin Foundation, while the official Bitcoin Core GitHub repository is maintained by Bitcoin Core contributors. It's possible that the latest version of Bitcoin Core has not yet been made available for download on bitcoin.org because it has not yet undergone sufficient testing and review by the Bitcoin Foundation. It's also possible that the version available on bitcoin.org has been modified or customized in some way for the specific needs of the Bitcoin Foundation. In general, it's recommended to download Bitcoin Core from the official Bitcoin Core GitHub repository or from a trusted source such as the Bitcoin Foundation's website. This will ensure that you are getting the latest version of the software that has undergone thorough testing and review.
jesseaam commented 1 year ago

Wasabi Wallet 2.0.2.1: The Whale Release

Previous versions max input: 1,374.3853472 BTC. Now max input 43,000 BTC (only 14 address own more than this!).

In addition to the increased maximum input, Wasabi Wallet has also implemented some enhancements to its anonymity protocol. For large amount coinjoins, multiple inputs were often consolidated in the same output, while the output as a whole inherited the lowest anonymity score of the inputs used to create it.

jesseaam commented 1 year ago

Ideas for Sats symbols

https://bitcoinmagazine.com/culture/my-suggestion-for-the-bitcoin-sats-symbol

image image