[bitcoin-dev] An implementation of BIP102 as a softfork.

joe2015 at openmailbox.org joe2015 at openmailbox.org
Wed Dec 30 05:46:01 UTC 2015

Below is a proof-of-concept implementation of BIP102 as a softfork:


BIP102 is normally a hardfork.  The softfork version (unofficial
codename BIP102s) uses the idea described here:

The basic idea is that post-fork blocks are constructed in such a way
they can be mapped to valid blocks under the pre-fork rules.  BIP102s
is a softfork in the sense that post-fork miners are still creating a
valid chain under the old rules, albeit indirectly.

 From the POV of non-upgraded clients, BIP102s circumvents the
block-size limit by moving transaction validation data "outside" of
the block.  This is a similar trick used by Segregated Witness and
Extension Blocks (both softfork proposals).

 From the POV of upgraded clients, the block layout is unchanged,
- A larger 2MB block-size limit (=BIP102);
- The header Merkle root has a new (backwards compatible)
- The coinbase encodes the Merkle root of the remaining txs.
Aside from this, blocks maintain their original format, i.e. a block
header followed by a vector of transactions.  This keeps the
implementation simple, and is distinct from SW and EB.

Since BIP102s is a softfork it means that:
- A miner majority (e.g. 75%, 95%) force miner consensus (100%).  This
   is not true for a hardfork.
- Fraud risk is significantly reduced (6-conf unlikely depending on
   activation threshold).
This should address some of the concerns with deploying a block-size
increase using a hardfork.


- The same basic idea could be adapted to any of the other proposals
   (BIP101, 2-4-8, BIP202, etc.).
- I used Jeff Garzik's BIP102 implementation which is incomplete (?).
   The activation logic is left unchanged.
- I am not a Bitcoin dev so hopefully no embarrassing mistakes in my
   code :-(


More information about the bitcoin-dev mailing list