Can I do a replay attack to spend my testnet bitcoin on the mainnet?

2

1

I think it would be possible to create a legitimate seeming transaction on the Bitcoin testnet that the Bitcoin mainnet would accept.

I've read a bit about the ETC replay attacks, and it seems like it would be impossible, since there was never any hard fork to create testnet.

https://medium.com/@timonrapp/how-to-deal-with-the-ethereum-replay-attack-3fd44074a6d8

But I'm not sure about this. Has anyone successfully done it?

Do you know a good reason why it 100% would not work?

Nathan Basanese

Posted 2017-03-26T18:44:47.443

Reputation: 303

Answers

6

The answer is no, you can't, because the two chains don't share a common history.

Internally, transactions don't spend "from" an address. Instead, they refer to a specific output created by an earlier transaction which they consume.

In order for a replay attack to work, that same transaction whose outputs are being spent must exist on both chains. This is only possible when the two chains share a common history, and the earlier transaction either occurred before the fork (so it exists on both sides), or it itself was already a replay.

As soon as a transaction's history is not identical - meaning it consists of the same transactions leading up all the same to the same coinbase outputs that created the coins - they cannot be replayed, as the txids of the inputs will not exist in both chains.

Pieter Wuille

Posted 2017-03-26T18:44:47.443

Reputation: 54 032

-2

I think it would be possible to create a legitimate seeming transaction on the Bitcoin testnet that the Bitcoin mainnet would accept.

no

amaclin

Posted 2017-03-26T18:44:47.443

Reputation: 5 763

1// , soul + witNathan Basanese 2017-03-26T21:22:53.493