Bitcoin RBF, Bitcoin Knots and Bitcoin Addrindex: Three Core Forks That Don’t Break With Consensus

Bitcoin Core, descendant of the original Bitcoin software launched by Satoshi Nakamoto in 2009, has always been Bitcoin’s reference client. The implementation, formerly known as Bitcoin QT, proposes standards for the Bitcoin protocol itself. But these standards are not binding. Based on open source software, anyone can take the code, modify it as they see fit, and offer the adjusted version to the world.

This was recentlyhighlighted by the launch ofBitcoin Classic andBitcoin Unlimited, andBitcoin XT before that. But these implementations did something that hadn’t been attempted before, at least not in serious form. They forked the software such that it could become incompatible with Bitcoin’s existing consensus rules, essentially proposing that users switch to a network that is not backwards-compatible. Bitcoin Classic, Bitcoin Unlimited and Bitcoin XT are not just software forks, they areconsensus forks.

Forking Bitcoin Core’s software itself, however, has been done several times before without raising consensus issues. At least three prominent developers, all of whom contribute to Bitcoin Core, maintain their own forks, adjusted to fit their vision and preferred use cases for Bitcoin. Because none of these break with existing consensus rules, they are fully compatible with the current Bitcoin network.

Bitcoin RBF (by Peter Todd)

Bitcoin RBF” (it has no official name) is a Bitcoin Core fork maintained by Peter Todd, and was launched in early 2014. It’s a straight copy of Bitcoin Core, except for its memory pool (“mempool”) policy: the rules that decide which unconfirmed transactions are accepted and rejected.

Most Bitcoin nodes currently apply a “first seen” mempool policy, which means they reject incoming transactions if they conflict with earlier unconfirmed transactions. And Bitcoin Core recently introduced “opt-in replace-by-fee,” which replaces a transaction with a conflicting transaction that includes a higher fee – but only if the initial transaction was specifically flagged by the sender to allow this. These policies make it harder – but not impossible – to double-spend unconfirmed transactions.

Bitcoin RBF, instead, applies full replace-by-fee, which means it replaces unconfirmed transactions any time a newer – conflicting – transaction pays a higher fee. This allows senders to, among other advantages, get a transaction “un-stuck” if the Bitcoin network is bearing a heavy load. It also allows users to double-spend unconfirmed transactions more easily.

Furthermore, to ensure that unconfirmed double-spends propagate across the Bitcoin network, Bitcoin RBF includes special networking code. This connects Bitcoin RBF to other Bitcoin RBF nodes, in addition to nodes that do not apply replace-by-fee. As such, users who want to broadcast a conflicting unconfirmed transaction really only need to connect to one Bitcoin RBF node; the transaction will find its way over the network from there.

Importantly, however, Bitcoin RBF is not at odds with Bitcoin’s blockchain-based consensus model; mempool and transaction relay policies cannot be.

Todd does not really aim for mainstream adoption of Bitcoin RBF. A small minority of users running the implementation allows conflicting unconfirmed transactions to reach miners (even if these miners don’t run Bitcoin RBF.) This already makes itrelativelyeasy to replace some unconfirmed transactions.

And if miners (or pools) choose to run Bitcoin RBF themselves, full replace-by-fee could even become common policy on the whole network, proportional to the amount of hash power represented by these miners. Major Chinese mining pool F2Pool adopted Bitcoin RBF for a very short period of time last year, but has since switched back to typical mempool policy. Whether any other miners run Bitcoin RBF is unclear.

For more information on replace-by-fee, see: ‘The Case for Replace-by-fee (and the Case Against)‘.

Bitcoin Knots (by Luke Dashjr)

Bitcoin Knots (until recently known as Bitcoin LJR) is a Bitcoin Core fork maintained by Luke Dashjr, and was launched in 2011. The name is a nod to the biblical passage in which Jesus expels the money changers from the Temple with a whip of knots (Dashjr is Catholic), and also refers to merging code.

Compared to Bitcoin Core, Bitcoin Knots offers significantly more mempool and mining configurability to node operators and miners. Node operators and miners should have that configurability, Dashjr believes, because they need to verify, store and transmit transactions and blocks over the Bitcoin network; all of which comes at a cost to them.

With Bitcoin Knots, node operators and miners can enable first-seen, opt-in replace-by-fee, as well as full replace-by-fee mempool policies, plus select a myriad of additional conditions to accept or reject (unconfirmed) transactions. Miners, furthermore, can easily lower the maximum size of blocks they mine, from 1 megabyte downward. They can also change the priority size in blocks reserved for bitcoins that have not been used for a while, and can adjust how many low-fee transactions they are willing to include: two anti-spam measures.

And again, none of this is at odds with Bitcoin’s blockchain-based consensus model.

Lastly, Bitcoin Knots serves as a testbed for Bitcoin Core to some extent. Dashjr often implements software optimizations that are adopted by Bitcoin Core at a later stage. Since having rebranded his implementation as Bitcoin Knots and marketing it towards a wider audience, Dashjr took a slightly more conservative approach, however. He now only includes optimizations that he considers reasonably secure.

Bitcoin Knots has been adopted by a number of miners, including the relatively small mining pool Eligius, which Dashjr launched in 2011, but is currently run by “wizkid057.”

Bitcoin Addrindex (by BtcDrak)

Bitcoin Addrindex is a Bitcoin Core fork maintained by the pseudonymous developer “BtcDrak,” and was launched in late 2014. Bitcoin Addrindex is a straight copy of Bitcoin Core with one added feature: It allows users to look up any Bitcoin address to explore its history, much like a typical block explorer.

Bitcoin Addrindex is especially useful for applications built on top of Bitcoin’s blockchain: these don’t need to rely on a (centralized) API to fetch blockchain data. Bitcoin Addrindex currently powersCounterParty and CounterParty block explorerBlockscan. It could potentially be adopted by a variation of other services, including block explorers, wallets and more.

Bitcoin Addrindex is not really designed for average Bitcoin users, as the added feature has no convenient user interface. Bitcoin Addrindex is specifically intended as a building block for programmers.

Note: Bitcoin Magazinehas not tested or reviewed the code of any of these implementations.Thanks to Bryan Bishop for added suggestions.

 

The post Bitcoin RBF, Bitcoin Knots and Bitcoin Addrindex: Three Core Forks That Don’t Break With Consensus appeared first on Bitcoin Magazine.