Bitcoin Forum
April 19, 2024, 05:53:05 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help; what happens to transaction in deactivated blocks  (Read 124 times)
NdaMk (OP)
Full Member
***
Offline Offline

Activity: 303
Merit: 136


Defend Bitcoin and its PoW: bitcoincleanup.com


View Profile
May 04, 2022, 05:01:39 PM
Merited by Welsh (2), ABCbits (1)
 #1

A chain organisation is said to take place after more than a block is mined same time. The blocks in older chain are deactivated for those in the newest chain. When more than a block is mined at same time nodes receive different blocks causing disparity to which block was actually mined first. Then chain reorganisation happens when another block is mined. The most recent block is received as the newest longest chain. Each mode then perform chain organisation.

My questions are;
1. What if the nodes receive blocks shorter than the active chain, does chain organisation also occurs?
2. Does this mean only the transaction present in the longest chain remain valid after reorganisation?

3. What happens to the transaction in deactivated blocks?

The OGz Club     [ [ [ [ [   The 1st & Only #MemeFi Project   ] ] ] ] ]
Website     ◢ Reddit     ◢ Telegram     ◢ Twitter     ◢ TikTok     ◢ Facebook
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄     ►► Powered by BOUNTY DETECTIVE     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
]
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713505985
Hero Member
*
Offline Offline

Posts: 1713505985

View Profile Personal Message (Offline)

Ignore
1713505985
Reply with quote  #2

1713505985
Report to moderator
1713505985
Hero Member
*
Offline Offline

Posts: 1713505985

View Profile Personal Message (Offline)

Ignore
1713505985
Reply with quote  #2

1713505985
Report to moderator
1713505985
Hero Member
*
Offline Offline

Posts: 1713505985

View Profile Personal Message (Offline)

Ignore
1713505985
Reply with quote  #2

1713505985
Report to moderator
garlonicon
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1932


View Profile
May 04, 2022, 05:51:54 PM
Merited by Welsh (3), pooya87 (2), BlackHatCoiner (2)
 #2

Quote
The blocks in older chain are deactivated for those in the newest chain.
This is not always the case, because the total chainwork is counted, the block time can be older, but it has to meet the consensus.

Quote
What if the nodes receive blocks shorter than the active chain, does chain organisation also occurs?
It depends on chainwork.

Quote
Does this mean only the transaction present in the longest chain remain valid after reorganisation?
Yes, in the heaviest chain, not the longest, Satoshi changed it from "the longest" to "the heaviest" by adding code for checking Proof of Work for that reorged chain.

Quote
What happens to the transaction in deactivated blocks?
It does not exist, unless it is also included in the heaviest chain. You can use your CPU and mine today a new block, on top of the Genesis Block, and pretend it happened in 2009. And guess what: those coins will never exist, so you will not get 50 BTC for doing that. This case is the same for any transaction, coinbase or not.

Hold your horses before deploying blockchain-related things. You don't want to deploy SHA-1 collision without deploying hardened SHA-1. Once you reveal some code, and make it Open Source, there is no "undo" button. Once you share some idea, there is no way to erase it from reader's memory.
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5814


not your keys, not your coins!


View Profile WWW
May 05, 2022, 12:51:29 AM
Merited by pooya87 (2), ABCbits (2)
 #3

A chain organisation is said to take place after more than a block is mined same time. The blocks in older chain are deactivated for those in the newest chain. When more than a block is mined at same time nodes receive different blocks causing disparity to which block was actually mined first. Then chain reorganisation happens when another block is mined. The most recent block is received as the newest longest chain. Each mode then perform chain organisation.

My questions are;
1. What if the nodes receive blocks shorter than the active chain, does chain organisation also occurs?
2. Does this mean only the transaction present in the longest chain remain valid after reorganisation?

3. What happens to the transaction in deactivated blocks?
To put it simply, you only have to reorg if you get a 'longer' chain. If such a chain is submitted to you, some blocks will become stale and the transactions that were mined in them, go back to 0 confirmations (they're not in the blockchain anymore). That's the main reason it's usually recommended to wait for 6 confirmations; since I believe the biggest reorgs we've had were never more than 2 or 3 blocks.
The transaction will go back to the mempool and will be mined later. I'm not 100% sure if the client has to retransmit it though or if full nodes put it back into the mempool after dropping their existing, shorter chain for a longer one where that transaction is not included.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10489



View Profile
May 05, 2022, 02:31:59 AM
Merited by n0nce (1)
 #4

The transaction will go back to the mempool and will be mined later.
Not necessarily. You see when another miner finds block A' they also have pretty much the same mempool as the first miner that mined block A. Consequently block A' could have almost identical transactions as block A and if A' replaces A the confirmed state of those transactions won't change, only the block hash that contained them will.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
garlonicon
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1932


View Profile
May 05, 2022, 04:44:28 AM
Merited by n0nce (1)
 #5

Quote
since I believe the biggest reorgs we've had were never more than 2 or 3 blocks
You are right if you think about present times, but historically, we had a bigger reorg during Value Overflow Incident. We also had some 6 blocks reorgs when mining pools used SPV mining.

Quote
I'm not 100% sure if the client has to retransmit it though or if full nodes put it back into the mempool after dropping their existing, shorter chain for a longer one where that transaction is not included.
They will put it back into their mempools, unless it is already mined in the reorged chain, or unless it is now invalid.

Hold your horses before deploying blockchain-related things. You don't want to deploy SHA-1 collision without deploying hardened SHA-1. Once you reveal some code, and make it Open Source, there is no "undo" button. Once you share some idea, there is no way to erase it from reader's memory.
NdaMk (OP)
Full Member
***
Offline Offline

Activity: 303
Merit: 136


Defend Bitcoin and its PoW: bitcoincleanup.com


View Profile
May 05, 2022, 06:10:33 AM
 #6

A chain organisation is said to take place after more than a block is mined same time. The blocks in older chain are deactivated for those in the newest chain. When more than a block is mined at same time nodes receive different blocks causing disparity to which block was actually mined first. Then chain reorganisation happens when another block is mined. The most recent block is received as the newest longest chain. Each mode then perform chain organisation.

My questions are;
1. What if the nodes receive blocks shorter than the active chain, does chain organisation also occurs?
2. Does this mean only the transaction present in the longest chain remain valid after reorganisation?

3. What happens to the transaction in deactivated blocks?
To put it simply, you only have to reorg if you get a 'longer' chain.

So the reorg will not take place when it is a shorter chain?
What then happens to the disparity of blocks in each Node ?..... Will they remain different till a longer chain is mined

The OGz Club     [ [ [ [ [   The 1st & Only #MemeFi Project   ] ] ] ] ]
Website     ◢ Reddit     ◢ Telegram     ◢ Twitter     ◢ TikTok     ◢ Facebook
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄     ►► Powered by BOUNTY DETECTIVE     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
]
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18504


View Profile
May 05, 2022, 08:27:26 AM
Merited by pooya87 (2)
 #7

So the reorg will not take place when it is a shorter chain?
Nodes follow the chain with the most proof of work. If they are sent a block or chain of blocks which build on older blocks but do not have more combined work than the chain they are currently following, then they will simply ignore them.

Let's say my node has a chain of blocks which goes A-B1-C1-D1-E1. You then send a chain of blocks which goes A-B2-C2. Provided the difficulty of all blocks is the same, then my node will simply ignore the blocks you have sent. If my chain then receives block F1, and then later you send me block F2, then again, I'll simply ignore your block since I already have a verified block at the same height. If, on the other hand, my latest block was F1, and you sent F2-G2, then I would drop F1 and replace it with F2-G2, since your chain now contains more work than mine.
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!