Bitcoin Forum
April 25, 2018, 04:06:40 AM *
News: Latest stable version of Bitcoin Core: 0.16.0  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Could one say there are at once as many chains as there are miners ?  (Read 53 times)
echbit18
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
April 16, 2018, 03:36:56 PM
 #1

During the proof of work process, a miner receive a block to mine.

He mines it, whether the miner is rewarded or not, this block is added to his own chain.
So at once, his has a chain which is different from the main chain.
At this time could we say there are as many btc chains as there are miners ?

Next, is my understanding correct ?
The miner looses against miners, the block becomes orphan, and the miner's chain reverts back to the main chain (somehow) and he waits for the next block to be mined.
1524629200
Hero Member
*
Offline Offline

Posts: 1524629200

View Profile Personal Message (Offline)

Ignore
1524629200
Reply with quote  #2

1524629200
Report to moderator
1524629200
Hero Member
*
Offline Offline

Posts: 1524629200

View Profile Personal Message (Offline)

Ignore
1524629200
Reply with quote  #2

1524629200
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1524629200
Hero Member
*
Offline Offline

Posts: 1524629200

View Profile Personal Message (Offline)

Ignore
1524629200
Reply with quote  #2

1524629200
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 1428
Merit: 1052


DateCoin - The HOTTEST ICO


View Profile WWW
April 16, 2018, 03:48:48 PM
Merited by suchmoon (1)
 #2

No. During the mining process, the miner assembles a set of transactions and other data to be put into the block header. Using SHA256, the block header is hashed twice and if and only if the hash meets the target, the miner will broadcast the block to the network.

The miner will not broadcast the block if there is a block there has been broadcasted before his at the same height. If he does, every node in the network will simply reject it as there is a chain with a longer proof of work. The miner can only be rewarded if his block is valid and is recognised as such by the network. There is simply no reason for anyone to broadcast a block that is below the current block height if they won't get rewarded for it.
The miner looses against miners, the block becomes orphan, and the miner's chain reverts back to the main chain (somehow) and he waits for the next block to be mined.
No. While the miners are technically competing against each other, they are still somewhat working together to build the chain. If the miner has less than majority of the hashrate, it is not profitable for him to have a competing chain to the rest of the network since he will lose with the others holding more hashrate than him and thus possibly having a longer chain.

Xynerise
Full Member
***
Offline Offline

Activity: 182
Merit: 178


39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 16, 2018, 04:00:13 PM
Merited by ETFbitcoin (1)
 #3

During the proof of work process, a miner receive a block to mine.
He doesn't "receive a block to mine" , he crafts a candidate block with a Coinbase transaction and with transactions aggregated from the mempool.

Quote
He mines it, whether the miner is rewarded or not, this block is added to his own chain.
This is false.
Miners do not have their own separate blockchain from the rest of the network.
Also, the miner is rewarded iff his block is valid according to the consensus rules; he finds a nonce when hashed with the Merkle root, timestamp, etc, gives a block header hash lower than the target hash; no other miner releases a completing block (valid block with the same block height).
When all the conditions are satisfied, then the Coinbase transaction he crafted (including the block reward) becomes valid -- and can only be spent after 100 blocks.
Quote
So at once, his has a chain which is different from the main chain.
He doesn't have a chain, just a block which will either be added to the main chain or not depending on if he follows consensus rules.
Quote
At this time could we say there are as many btc chains as there are miners ?
Any block that hasn't been added to the blockchain IS NOT part of the block chain; it's just a candidate block.
So they are many CANDIDATE BLOCKS but just one blockchain.
Quote
Next, is my understanding correct ?
No, not really.
Quote
The miner looses against miners, the block becomes orphan,

His block only gets orphaned if after he published his valid block, another miner publishes a block with the same block height but higher cumulative difficulty, if he doesn't find a block in the first place then he's not part of the blockchain and so his block can't get orphaned.

Quote
and the miner's chain reverts back to the main chain (somehow) and he waits for the next block to be mined.
Miners mine on the TIP of the main chain.
Miners craft candidate blocks on top of a block that's on the blockchain.
Until a miner finds a valid block and publishes it and other miners  mine on top of it as the TIP of the next block, his candidate block is NOT on the blockchain.

For better understanding of the subject read Andreas' chapter on mining in his book Mastering Bitcoin.

___________yahoo62278 CAMPAIGN MANAGER________  ◥◥  The Best & Most Popular Manager  ◤◤  ___________
✔ ICO Manager          ✔ Bounty Manager          ✔ Signature Campaign Manager          ✔ Twitter Campaign Manager
█████████████████████████   ADD "yahoo62278" on Telegram & Skype   █████████████████████████
angry_runner
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
April 16, 2018, 04:14:01 PM
 #4

no. only one chain and miners add blocks to that chain.
every miners have own copy of the whole chain.
Jet Cash
Hero Member
*****
Offline Offline

Activity: 868
Merit: 816


Satan's Slave


View Profile WWW
April 16, 2018, 05:57:48 PM
 #5


His block only gets orphaned if after he published his valid block, another miner publishes a block with the same block height but higher cumulative difficulty,

I didn't realise that. So what happens if a 3rd miner finds a block almost instantly, and adds it to the first miner's block, but it happens just after the 2nd miner added his block in an attempt to replace the 1st block?

Don't drink and drive ==>> Click here to find out why
Xynerise
Full Member
***
Offline Offline

Activity: 182
Merit: 178


39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 16, 2018, 06:49:34 PM
Merited by Jet Cash (1), HCP (1)
 #6


His block only gets orphaned if after he published his valid block, another miner publishes a block with the same block height but higher cumulative difficulty,

I didn't realise that. So what happens if a 3rd miner finds a block almost instantly, and adds it to the first miner's block, but it happens just after the 2nd miner added his block in an attempt to replace the 1st block?
Competing blocks are not resolved immediately; other miners have to vote with their hashpower ON the block that they consider valid.
Also, blocks have to reference the previous block header hash to build upon them.
There are 3 miners: A, B & C.
Miner A & B found a valid block almost simultaneously and "published" their blocks
Right now there's a temporary fork in the blockchain.
Miner C then found and  published a block building on miner A's block.
The blockchain including miner A's block is the longest chain with the highest cumulative difficulty because it has the difficulty of the previous blockchain + that of miner C's block .
If other miners "vote" by building their block tip on miner C's block, then it becomes the valid block chain and the block by miner B gets orphaned.

Let's use numbers.
Let's say The current block height the miners are building on is block 100 with block header hash 000....100x
Then miner A finds a valid block that builds upon this, which should be block 101, with blockheader hash 000...101a
However miner B also finds a valid block also building on block height 100 with hash 00..100x, which is also a competing Candidate for block height 101.
Right now there are 2 block 101's -- that of miner A and that of miner B, and there's a temporary bifurcation in the blockchain. full nodes will store both blocks till it is resolved.
Then the miners will vote with their hashpower on the block they consider to be valid.
If miner C builds on miner A's block 101 with hash 000...101a and finds a valid block, 102, then the blockchain of miner A's block is longer, and it also has the highest cumulative proof of work (measured in the difficulty of the block), so his block is "more valid" than B's and if other miners agree with miner C and extend the blockchain by building on miner A's block, then miner B's block will get orphaned by the nodes.

In a rare scenario (eg the 0.8 bug) where after miners up to block 104  Are mining on the block found by A, and other miners decide to mine on the block found by B instead and overtake the length of the chain of A with higher hashpower, then the blocks found from 101 - 104 built on the block found by A will be orphaned and the blockchain will reorganise to the new chain with the highest cumulative proof of work.
Therefore a transaction mined in miner A's block 101 that now has 3 confirmations (3 blocks built on top), will be orphaned and invalid if the transaction was not included in any of the subsequent blocks found.
This is why you should wait for 6 confirmations before you consider a transaction valid even though block reorgs usually do not have a depth of more than 2 blocks.
It's also why the Coinbase maturity time is long (100 blocks)

The important factor in determining the valid chain is the one with the MOST proof of work, not the longest chain alone  or else it would be trivial to fork bitcoin, reduce the difficulty and  mine several blocks ahead of the main chain, forcing a block reorg of the "true" chain to my fake chain.

___________yahoo62278 CAMPAIGN MANAGER________  ◥◥  The Best & Most Popular Manager  ◤◤  ___________
✔ ICO Manager          ✔ Bounty Manager          ✔ Signature Campaign Manager          ✔ Twitter Campaign Manager
█████████████████████████   ADD "yahoo62278" on Telegram & Skype   █████████████████████████
JohnB31
Jr. Member
*
Offline Offline

Activity: 60
Merit: 1


View Profile
April 16, 2018, 10:36:31 PM
 #7

As stated before miners do not get a block to mine, they compose it from data like pending transactions, previous block info and an (unknown) number they need to guess.
As some info of the previous block is included in the next block a block can only be mined if the previous block is mined. Finding the next block involves not only hash power but also some luck. Not all miners find (and publish) a next block the same time.
In theory you can mine a several of blocks and wait to publish them after you mined e.g. 100 blocks. However in that case is is not sufficient to mine one block faster than all the other miners; you need to mine all this 100 blocks faster than all other miners together. This would be a race very difficult to win (also due to the luck involved), and if you lose or are not significant ahead of all other miners after this 100 blocks you will not receive any reward.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!