Bitcoin Forum
June 27, 2024, 01:16:09 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Begginer's Doubt About Fork  (Read 184 times)
velhoti (OP)
Member
**
Offline Offline

Activity: 84
Merit: 28


View Profile
December 31, 2019, 05:01:57 AM
 #1

When the chain forks, let suppose that the network followed the stronger chain. If some transaction in the stale block is not duplicated in the chain is it reversed?

If the fork extend to some number of blocks, is not clear to me if is possible (and if is easy) a node verify transactions considering two chains, so it make sense to revert transactions from stale blocks.
velhoti (OP)
Member
**
Offline Offline

Activity: 84
Merit: 28


View Profile
December 31, 2019, 05:44:32 AM
 #2

Now say you had your wallet offline and knowing about the fork, decided you wanted to doublespend.
What you would do is keep your current wallet offline, export your private keys,
create a new wallet & import your private keys into it.  Delete your old wallet.
(Even easier just restore the wallet from a backup before you send out the coins on the original fork.)
Now you can bring your new wallet online, which won't resend your old transaction.
This transfers your balance but excludes the transactions, so that the transaction is not resend and you double spend.

The way you explained suggest that I can double spend and create new BTC from that, but I understood, thanks.
odolvlobo
Legendary
*
Offline Offline

Activity: 4368
Merit: 3276



View Profile
December 31, 2019, 10:28:10 AM
Last edit: December 31, 2019, 10:38:59 AM by odolvlobo
 #3

When the chain forks, let suppose that the network followed the stronger chain. If some transaction in the stale block is not duplicated in the chain is it reversed?

If the fork extend to some number of blocks, is not clear to me if is possible (and if is easy) a node verify transactions considering two chains, so it make sense to revert transactions from stale blocks.
...
Now say the chain fork at 5 and the old 5-6-7 were overwritten.
1-2-3-4-5-6-7

What happens is this, if your node is up that you sent your transaction out on, it will see the fork and try an resend the transaction
so instead of your transaction being included in block 7, it will be included in a later block.
In the new chain your transaction would be in block 8 or later. (depending on when you brought your wallet online)
1-2-3-4-5-6-7-8

Now say you had your wallet offline and knowing about the fork, decided you wanted to doublespend.
What you would do is keep your current wallet offline, export your private keys,
create a new wallet & import your private keys into it.  Delete your old wallet.
(Even easier just restore the wallet from a backup before you send out the coins on the original fork.)
Now you can bring your new wallet online, which won't resend your old transaction.
This transfers your balance but excludes the transactions, so that the transaction is not resend and you double spend.
...

That is not quite correct. When the chain is re-orged, then all transactions in the stale blocks that aren't already in the new chain are returned to the mempool. The result is ultimately the same, but it is not necessary for the wallet to resubmit the transaction.

The double-spend happens when a transaction in the new chain invalidates a transaction that was previously confirmed in the stale branch, and the already confirmed transaction is rejected. In order to do that successfully, that attacker must be able to add blocks more quickly than the rest of the network so that they can force a re-org with a branch containing the double-spending transaction. Such an attack requires more than 50% of the total hash rate, and that is why it is called a 51% attack.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
buwaytress
Legendary
*
Offline Offline

Activity: 2856
Merit: 3544


Join the world-leading crypto sportsbook NOW!


View Profile
December 31, 2019, 11:34:27 AM
 #4

Although, in practical sense, a lot of bitcoin services already do accept deposits on 0 confirmations. The common case here would be casinos, where deposits are instantly credited, as soon as the tx is detected in mempool. So even without the tx not in a stale branch, it is theoretically possible to attempt a douple-spend without a 51% attack.

Also, as pointed out several times and most recently by Antonopoulos, a successful 51% attack right now -- while economically unviable-- would immediately be marked out by the majority of network as a malicious attempt. And they would all anyway vote to reject the chain and return to previous state. It would cause some chaos and lost resources for most, but it would totally bankrupt the attacker (since his chain would be rejected anyway).

 

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!