Replay Protection (BIP 143)
Replay Protection: BIP 143 & SIGHASH_FORKID
One of the biggest technical risks of a Chain Split is a Replay Attack. This occurs when a valid transaction on one chain is broadcast and successfully "replayed" on the other chain, potentially causing a user to lose funds unintentionally.
1. What is a Replay Attack?
Since both chains share the same Private Keys and UTXO history, a transaction you sign to send 1.0 BTC on the main chain is also a perfectly valid signature to send 1.0 BCH on the forked chain. * The Scenario: You try to sell your BCH on an exchange. * The Attack: An observer sees your signed BCH transaction and broadcasts it to the BTC network. * The Result: You lose your BTC too, even though you only intended to move your BCH.
2. Strong Replay Protection
To prevent this, hard forks usually implement Strong Replay Protection. This involves changing the Transaction Serialization format so that a signature for one chain is mathematically invalid on the other.
The BIP 143 Mechanism
Originally developed for SegWit, BIP 143 introduced a new way to hash transaction data for signing. Forked chains (like Bitcoin Cash) adopted a modified version of this called SIGHASH_FORKID.
When signing a transaction on the forked chain, the miner/wallet includes a unique ForkID in the signature hash.
* BTC Signature: Hashes standard transaction data.
* Fork Signature: Hashes (Data + ForkID).
Because the hashes are different, the signature from the forked chain will fail validation on the BTC chain, and vice versa.
3. Opt-in vs. Mandatory Protection
- Mandatory: The protocol requires the new signature format. This is the safest approach.
- Opt-in: Users must manually add "dust" or use specific opcodes to separate their coins. This is highly risky and led to the failure of several proposed forks.
4. The Role of the Checksum
Beyond signatures, forked chains often change their Address Format (like BCH's CashAddr) or P2P Magic Bytes to ensure that nodes and wallets don't accidentally talk to the wrong network.
Without Strong Replay Protection, a hard fork is considered an "attack" by many in the community because it forces users to risk their primary assets to interact with the new chain.
Next, we will analyze the most famous Historical Hard Forks in Bitcoin's history.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: