2

Bitcoin cash is a hard fork of bitcoin which means that before a certain block number (478558 according to Wikipedia) the blocks are the same for both bitcoin cash and bitcoin. I was looking at one of these blocks before the hard fork using a blockchain explorer (Blockchain.com) and I noticed that all the information seems to be the same apart from the transaction addresses. It seems like the bitcoin and bitcoin cash addresses are different even though other information such as the block hash and Merkle root hash. What is the reason for this?

3
  • 2
    I'm the crypto-SE moderator who migrated the question here. I know bitcoin cash is off-topic, but I hope the question is more general and on-topic: about the effect of forks on the blocks. If it turns out that not, the question should be closed IMHO.
    – fgrieu
    Jun 4 at 8:10
  • Does this answer your question? Bitcoin Cash accidentally sent to Bitcoin address. Can I get them back?
    – darosior
    Jun 5 at 22:31
  • Not exactly, I'm not trying to send/unsend bitcoin cash to a bitcoin wallet or vice versa. I'm just trying to understand why even though bitcoin and bitcoin cash share the exact same blocks before the hard fork, some information within those blocks appears to be different.
    – grenmester
    Jun 6 at 3:09
3

Addresses do not exist on-chain. In fact, they don't exist at the protocol level at all, but are a human representation of the "script" language that is used internally. Bitcoin Cash uses a different human-readable representation for the same scripts.

Transactions have outputs, and every output is "locked" by a script that specifies the conditions under which that output can be spent. Those scripts are the ones that end up on chain.

The more common classes of scripts have associated human-readable encodings, called addresses. In particular, P2PKH (pay to public key hash, 1... addresses in Bitcoin) and P2SH (pay to script hash, 3... addresses in Bitcoin) do. However, many possible locking scripts exist that could feasibly be used on-chain have no corresponding address at all in Bitcoin. Of course, it would be hard to make someone send to them, as there is no address you could give the sender to pay to, but in theory, nothing prevents people from manually constructing such outputs.

Early after Bitcoin Cash's fork, they used the same address encoding as Bitcoin. This was a problem, as it caused confusion, and resulted in people sending coins on the wrong chain, by simply inputting the address in the wrong software. This was later addressed by introducing a new address encoding. It also means that it now "looks" like those pre-fork and early post-fork transactions used that new address scheme as well.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.