Libconsensus separated repository (was Bitcoin Core and hard forks)



Summary:

In a recent email exchange between Jorge Timón and Tamas Blummer, they discussed the use of libconsensus, which separates the script engine from Bitcoin Core. The purpose of this separation was to wrap the piece of consensus that would least likely be captured exactly with an implementation from scratch. Bits of Proof now uses its own or alternatively libconsensus for full validation. However, Tamas expressed skepticism about extracting a “full” consensus lib from Satoshi’s code due to the antique tool set. The rules outside the script engine are simpler and therefore easier to capture exactly, but they are scattered around in the spaghetti and often just a single if statement, also repeated elsewhere. Refactoring the code extensively or reading Satoshi’s code and rewriting the same are the only options to achieve this.Jorge proposed three steps to implement libconsensus in Bitcoin Core, but there will be some consensus fork bug risks during the process, which could take three to four years. On the bright side, we may be able to have a full libconsensus this year.


Updated on: 2023-06-10T03:37:43.732416+00:00