OP_HALLOWEEN21 and Bitcoin Knots

We are a group of information security researchers who organized a Bitcoin meetup in Bangalore, India on 26 October 2021. More than 100 Computer science students who are good in one of the programming languages and interested in contributing to open source projects were a part of this meetup. I gave a presentation about Bitcoin development, slides, pics and other details are shared on meetup website: https://oph21.bitcoinmeetup.info/

This was the first Bitcoin meetup in India focused only on development. The goal is to make a small team of developers and start contributing to Bitcoin Knots and other Bitcoin projects in the next few months.

What is Bitcoin Knots?

Bitcoin Knots is a derivative of Bitcoin Core (since 2011 December) with a collection of improvements back-ported from and sometimes maintained outside of the master git tree by Luke Dashjr. You can download it from https://bitcoinknots.org and use the same as Bitcoin Core.

Why Bitcoin Knots?

Alternative full node implementations are important for decentralization and depending on one repository doesn’t help. Luke Dashjr is a Bitcoin developer who has been contributing to Bitcoin Core and Bitcoin Knots since years. Few people have helped with small donations but it needs more support. Bitcoin Knots is used by Wasabi, ABCore, Bull Bitcoin and a few others. More developers getting involved in this repository will help the project and Bitcoin.

3 main things in the roadmap for our contribution are mentioned in this discussion which includes improving website, privacy and meetings: https://github.com/bitcoinknots/bitcoin/discussions/39

Bitcoin Knots vs Bitcoin Core

Bitcoin Core removed code for miners to limit block sizes, so miners can run Knots if they want to use smaller blocks: http://web.archive.org/web/20200523193758/https://twitter.com/LukeDashjr/status/1264271981072969729

Users have more control, options in GUI and better UX. Mempool statistics are helpful for users as they won’t depend on third party websites or other tools.

Lots of bug fixes and improvements which are only present in Bitcoin Knots. Details for each are shared with the release. Next release is v22.0 which will be done in a few days and has a lot of differences from v22.0 for Bitcoin Core.

Improving privacy is one of the important things in Bitcoin projects. One of the pull request that fixes a bug with ‘onlynet’ config option which can be used to control outbound connections based on type of network (ipv4, ipv6, onion, i2p) is not merged in Bitcoin Core yet but will be implemented in Bitcoin Knots: https://github.com/bitcoin/bitcoin/pull/22834

I have written a post about it: https://blockchaincommons.github.io/Bitcoin-Camouflage//blog/onlynet/

listwalletdir RPC will not iterate through whole datadir which fixes a bug described in a closed pull request by Saibato: https://github.com/bitcoin/bitcoin/pull/19419

Bitcoin Knots has -acceptnonstdtxn option to allow miners to easily accept non-standard transactions: https://github.com/bitcoin/bitcoin/pull/559 This can be helpful in cases where few users request miners to include non-standard transactions because of some bug in wallet or other errors during transactions. One such example is mentioned in this issue: https://github.com/bitcoin/bitcoin/issues/20178 This user had used Bluewallet v4.0.2 which had uncompressed private keys for segwit wallets and resulted in non-standard transaction. The issue was resolved in a few months.

mempoolreplacement option can be used to configure RBF in Knots. Bitcoin Knots also provides an option in GUI to enter port number used:

Pairing tab with Tor onion address as copy-able text and QR code is available in Bitcoin Knots. Privacy should be easy for GUI users and such options help in motivating users to try Onion service is Bitcoin node: https://github.com/bitcoin/bitcoin/pull/15428

Feerate histogram is added in Knots which is helpful for power users and developers that want to use fee rate distribution in charts etc. It was initially proposed in https://github.com/bitcoin/bitcoin/pull/15836 by Jonas Schnelli, later taken over in https://github.com/bitcoin/bitcoin/pull/21422 by kiminuo which I had reviewed and created a fee rate distribution chart using it:


Pruning flushes are reduced in Knots, speeding up IBD with pruning on systems that have a sufficient dbcache. Pruning almost everything up until we get close to where we need to be keeping blocks: https://github.com/bitcoin/bitcoin/pull/20827

If the user selects a directory for block storage, Core will change the prune checkbox based on space available. In Knots, the prune checkbox will never change once the user has touched it. This was not merged in Core because of the lack of review: https://github.com/bitcoin/bitcoin/pull/18729

Only one maintainer who is a Bitcoin Core contributor since years as mentor, some help from me in weekly meetings discussing one technical topic, less controversies and arguments will help new contributors learn things in a better way. This is good for Bitcoin as well since more people will run Bitcoin Knots nodes, help in development and improve things.

Accepting the problems, looking for solutions and trying to improve things is the best approach we as engineers can follow to do better things in Bitcoin. Irrational optimism is as toxic as irrational pessimism: https://twitter.com/SayBitcoiners/status/1292613268905684992

PGP public key: http://git.io/fjFyU
Twitter: https://twitter.com/prayankgahlot
Github: https://github.com/prayank23