Post
Topic
Board Beginners & Help
Merits 3 from 2 users
Re: What is the tie-breaker between transactions of same fee and size?
by
mprep
on 04/12/2020, 14:05:54 UTC
⭐ Merited by DdmrDdmr (2) ,markcolls (1)
The first time my transaction is included in the block and hashed by the miners I get a confirmation. What does the second confirmation mean? And the third and so on?
From https://en.bitcoin.it/wiki/Confirmation (emphasis added by me):

Quote
After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.

tl;dr number of blocks (within the currently dominant chain) the transaction exists in.

EDIT: By "exists", I mean that if you took the entire dominant chain at a certain number of blocks and parsed it (e.g. in Bitcoin wallet app), the transaction would be included in some block within that chain (either the newest or any older one). So if, hypothetically, your transaction was included in block 5 in the dominant chain and the newest block is now 6, your transaction has 2 confirmations since it "exists" in blocks 5 and 6.


 Cry I didn't understand what you said.
Completely understandable. As you've mentioned, you understand that when a miner includes your transaction in a block, it has 1 confirmation. Well, these blocks aren't free floating. Each block references (points to) a different block in the past essentially saying "I'm building on top of this block". So if you took some sort of recently mined block and started going backwards (block X points to block Y which points to Block U) you'd get a blockchain. However, since the entire system is decentralized (there is no definitive be-all-end-all authority), as long as a blockchain matches the rules of the Bitcoin protocol, it's considered valid. As such, whenever I'm talking about the "dominant chain", I'm talking about on blockchain that matches the rules and is the longest one publicly available.

However, nobody is stopping someone from taking an existing blockchain, taking not the newest block in it and starting to secretly mine blocks on top of it (essentially making his own private branch, like in a tree). If he manages to produce a longer branch than the currently "dominant" one and then reveals it by broadcasting it, most clients (wallet apps, miners, explorer websites, etc.) will switch to that branch. Meaning that if your transaction was mined / included into a block that only exists in the old branch, it will suddenly become unconfirmed again. This is why most vendors wait for 6 or so confirmations before they consider the payment as received. Beating the rest of the network mining on top of an already public chain with your own private branch requires tons of resources and keeping it up for several blocks increases that resource requirement immensely. Meaning the more confirmations there are, the smaller the chance your "confirmed" becomes unconfirmed again.

Going back to the question, your transaction's data / information isn't included in every single block - it's included in a single block (1 confirmation). A new block is mined that points to that block (2 confirmations). An even newer block is mined and points to the new block that points to the block your transaction is in (3 confirmations). Repeat ad nauseam. When you're paying a transaction fee, that fee gets received only by the block that included your transaction. So when estimating what fee you should pay, the wallet application uses transaction fee data from previous blocks to, for example, estimate a probability that your transaction gets included in the next block or in one of the next N number of blocks.