Post
Topic
Board Bitcoin Discussion
Re: Aug 1 summary
by
mmgen-py
on 03/08/2017, 16:12:04 UTC
Whether they have adequate replay protection is yet to be seen.

Post-HF transactions on the BCH chain use a different sighash algorithm (it's adapted from BIP143) to compute the transaction hash that the spender of the output signs. In other words, the transaction hash of a post-fork BCH transaction prevout is completely different data than the transaction hash of its corresponding prevout on the BTC chain. The signature is signing different data on each chain, so each chain's signature is invalid on the other, making transaction replay impossible.

The spec for the replay protection is in doc/abc/replay-protected-sighash.md and the relevant function is SignatureHash() in the file script/interpreter.cpp. It's useful to compare with the same file in the Core repository to see what changes were made.

How to review the Bitcoin ABC code:

    git clone https://github.com/Bitcoin-ABC/bitcoin-abc
    cd bitcoin-abc
    git diff --word-diff=color 964a185
    
(Commit 964a185 was the last commit before the ABC repository forked from Core)