Making soft forks pluggable



Summary:

Eric proposes the ability to define soft forks as standalone units that can be merged with Bitcoin Core. This would require changes in some areas of the consensus code, but could cover a wide class of potential soft forks through a small number of hooks primarily in main.cpp, consensus/*, script/interpreter.cpp, and primitives/*. Other hooks could also be added in non-consensus code such as rpcblockchain.cpp or the wallet. Unit tests could be built for each independent soft fork and compared for enforcement of different combinations. Eric is concerned about objections to the idea, but believes it can be done without moving large chunks of code around. He also questions whether supporting this feature is a good idea in the first place, as it may make soft fork deployments too easy. However, he recognizes that VersionBits (BIP0009) aims to make deployments faster and wonders if this initiative could be taken even further. Finally, Eric notes that his proposal is not required by the current versionbits deployment plan, but he is open to sincere objections if he is wrong.


Updated on: 2023-06-11T00:03:24.813021+00:00