Bitcoin Forum
June 23, 2024, 12:21:07 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Ledger  (Read 202 times)
AlexR12 (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
December 07, 2017, 06:53:59 PM
 #1

Hello!
Could someone verify if the following is true (my understanding of distributed ledger concept as applied to Bitcoin).

Each node of the network (miners and all other nodes that run Bitcoin client) has a copy of the ledger. Thus, the ledger is stored by the nodes (it is distributed in exactly this sense!). The ledger is periodically updated with new blocks of transactions being sent to the nodes. Hypothetically: If I am a miner and want to create a fork I can easily do it by creating a block and sending it to the network and the network will add it to the ledger. For example, for the chain A-B-C-D, I can add a block B2 to B, thereby creating a fork at node B. Of course, this block will most likely be orphaned because it is not the longest branch and the miner did it, say, for fun. Is my understanding right? If not, please point out what is not right.

Thank you in advance!
mayo2u
Member
**
Offline Offline

Activity: 325
Merit: 26


View Profile
December 07, 2017, 07:37:29 PM
 #2

Hello!
Could someone verify if the following is true (my understanding of distributed ledger concept as applied to Bitcoin).

Each node of the network (miners and all other nodes that run Bitcoin client) has a copy of the ledger. Thus, the ledger is stored by the nodes (it is distributed in exactly this sense!). The ledger is periodically updated with new blocks of transactions being sent to the nodes. Hypothetically: If I am a miner and want to create a fork I can easily do it by creating a block and sending it to the network and the network will add it to the ledger. For example, for the chain A-B-C-D, I can add a block B2 to B, thereby creating a fork at node B. Of course, this block will most likely be orphaned because it is not the longest branch and the miner did it, say, for fun. Is my understanding right? If not, please point out what is not right.

Thank you in advance!

The ledger is added to every 10 minutes of so. When you broadcast to the network that you have found a block your transaction is tested. At any point along the way if you have errors then the block is dropped. You need to have the hash of the previous block plus have met the diff goal on your block. This will be checked. If you have not met the diff then the block is rejected out of hand by the network.

Now, if you did meet the diff requirements then you have, indeed found a block and added it to the blockchain.

You're scenario is one where the attacker wants to reverse a transaction of a previous block (often times called a 51% attack). At the point that he puts out B2 no one on the network will acknowledge B2 as the authentic chain. Why? Because the longest chain is the correct chain - by definition. The attacker will have to do C2, D2 and now has to race with the network to become the longest. This is theoretically possible but today, 2017, is virtual impossible except for the rarest of use cases.
AlexR12 (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
December 07, 2017, 08:00:41 PM
 #3

The ledger is added to every 10 minutes of so. When you broadcast to the network that you have found a block your transaction is tested. At any point along the way if you have errors then the block is dropped. You need to have the hash of the previous block plus have met the diff goal on your block. This will be checked. If you have not met the diff then the block is rejected out of hand by the network.

Now, if you did meet the diff requirements then you have, indeed found a block and added it to the blockchain.
You use words "dropped", "rejected" without explaining how this is technically implemented. So far, only one thing is clear: the block is in the blockchain if it receives confirmations (consensus in the network). "Confirmation" means that subsequent blocks include its hash as the previous block's hash. But what happens to the blocks that were proposed, but for various reasons didn't end up in the longest chain? Are those still in the ledger?
mayo2u
Member
**
Offline Offline

Activity: 325
Merit: 26


View Profile
December 07, 2017, 09:31:59 PM
 #4

The ledger is added to every 10 minutes of so. When you broadcast to the network that you have found a block your transaction is tested. At any point along the way if you have errors then the block is dropped. You need to have the hash of the previous block plus have met the diff goal on your block. This will be checked. If you have not met the diff then the block is rejected out of hand by the network.

Now, if you did meet the diff requirements then you have, indeed found a block and added it to the blockchain.
You use words "dropped", "rejected" without explaining how this is technically implemented. So far, only one thing is clear: the block is in the blockchain if it receives confirmations (consensus in the network). "Confirmation" means that subsequent blocks include its hash as the previous block's hash. But what happens to the blocks that were proposed, but for various reasons didn't end up in the longest chain? Are those still in the ledger?


These are stale (often time called "orphaned") blocks. The block themselves are recorded. (You can see them at:  https://blockchain.info/orphaned-blocks) But the transactions in the orphaned block are now unconfirmed.  Now, as it happens, in real life, a lot of the transactions in the orphaned block would also be part of the winning block.


See:

Stale Block
A well-formed block which is no longer part of the difficultywise-longest and well-formed blockchain. Not to be confused with an Orphan Block (which has no known parent in the longest block chain).
https://en.bitcoin.it/wiki/Vocabulary#Stale_Block



odolvlobo
Legendary
*
Offline Offline

Activity: 4354
Merit: 3273



View Profile
December 07, 2017, 11:49:19 PM
 #5

Each node of the network (miners and all other nodes that run Bitcoin client) has a copy of the ledger. Thus, the ledger is stored by the nodes (it is distributed in exactly this sense!). The ledger is periodically updated with new blocks of transactions being sent to the nodes. Hypothetically: If I am a miner and want to create a fork I can easily do it by creating a block and sending it to the network and the network will add it to the ledger. For example, for the chain A-B-C-D, I can add a block B2 to B, thereby creating a fork at node B. Of course, this block will most likely be orphaned because it is not the longest branch and the miner did it, say, for fun. Is my understanding right? If not, please point out what is not right.

You are correct, except that your block will be rejected or eventually forgotten by everyone else but you. Nodes typically only keep the blocks in the longest chain, though they may keep orphaned blocks for a little while in case they somehow becomes the longest chain.

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

Activity: 1
Merit: 0


View Profile
December 08, 2017, 12:35:38 AM
 #6

i only knows ledger wallet. thank you for explaining this, ledger in blockchain.
AlexR12 (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
December 08, 2017, 01:29:56 AM
 #7

You are correct, except that your block will be rejected or eventually forgotten by everyone else but you. Nodes typically only keep the blocks in the longest chain, though they may keep orphaned blocks for a little while in case they somehow becomes the longest chain.
Thanks, but doesn't "...a little while..." proves that most of the time the nodes will have different versions of the ledger (some nodes will keep transactions a little longer than others)?
odolvlobo
Legendary
*
Offline Offline

Activity: 4354
Merit: 3273



View Profile
December 08, 2017, 08:13:14 AM
 #8

You are correct, except that your block will be rejected or eventually forgotten by everyone else but you. Nodes typically only keep the blocks in the longest chain, though they may keep orphaned blocks for a little while in case they somehow becomes the longest chain.
Thanks, but doesn't "...a little while..." proves that most of the time the nodes will have different versions of the ledger (some nodes will keep transactions a little longer than others)?


Doesn't matter. 1. There is no expectation that every node's block chain is the same because of forks. 2. Transactions in orphaned blocks are ignored.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
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!