I'm currently doing a research on bitcoin and I would like to know if there is anyway to replicate double spending in the testnet or regtest? If isn't possible is there any other type of "attacks" that can be replicated?
For a double spend, on
-testnet create a transaction and let it broadcast. Restart bitcoind or bitcoin-qt with
-tesnet -zapwallettxes=2 and then go ahead and respend your utxo's.
Note: I'll be honest, I haven't actually any BTC on testnet to try this with, you may also have to delete your testnet
mempool.dat before restarting the node - try it?