Bitcoin Forum
May 05, 2024, 11:06:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: A question about miners choosing fork.  (Read 415 times)
AdamLLL (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 1


View Profile
May 14, 2023, 10:13:32 AM
Merited by vapourminer (1)
 #1

When miner encountering a fork, one fork has less difficulty but longer in length, while the other fork is more difficult but short. Which fork should miners choose Smiley?
1714950366
Hero Member
*
Offline Offline

Posts: 1714950366

View Profile Personal Message (Offline)

Ignore
1714950366
Reply with quote  #2

1714950366
Report to moderator
1714950366
Hero Member
*
Offline Offline

Posts: 1714950366

View Profile Personal Message (Offline)

Ignore
1714950366
Reply with quote  #2

1714950366
Report to moderator
1714950366
Hero Member
*
Offline Offline

Posts: 1714950366

View Profile Personal Message (Offline)

Ignore
1714950366
Reply with quote  #2

1714950366
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714950366
Hero Member
*
Offline Offline

Posts: 1714950366

View Profile Personal Message (Offline)

Ignore
1714950366
Reply with quote  #2

1714950366
Report to moderator
Synchronice
Hero Member
*****
Offline Offline

Activity: 854
Merit: 773


Watch Bitcoin Documentary - https://t.ly/v0Nim


View Profile
May 14, 2023, 10:52:03 AM
 #2

When miner encountering a fork, one fork has less difficulty but longer in length, while the other fork is more difficult but short. Which fork should miners choose Smiley?
I assume you talk about accidental hard fork when two miners find the same block simultaneously. When this happens, later block decides which chain becomes the longer one. In this case, miner should choose the longest chain because if they mine the short one, that means they are mining a fork, which is not supported, won't be supported and has no idea to mine.

.freebitcoin.       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.PLAY NOW.
zezaiement
Newbie
*
Offline Offline

Activity: 21
Merit: 7


View Profile
May 14, 2023, 10:56:41 AM
 #3

When miner encountering a fork, one fork has less difficulty but longer in length, while the other fork is more difficult but short. Which fork should miners choose Smiley?
Miners should generally choose the fork with the longest length.
In blockchain terminology, the length refers to the number of blocks on a particular fork. Choosing the longer fork ensures that the miner is contributing to the majority of the network's computing power, which enhances the security and stability of the blockchain.

Visualization of a blockchain fork event: the network reconverges on a new longest chain:
http://talkimg.com/images/2023/05/14/msbt_0806443ad2e86c891195.png
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 14, 2023, 11:12:39 AM
Merited by hosseinimr93 (2), Synchronice (2), vapourminer (1), d5000 (1), ABCbits (1), DdmrDdmr (1), mendace (1), baro77 (1)
 #4

Miners should generally choose the fork with the longest length.
This is wrong.

Nodes will follow the chain which has the most accumulated work. This is not necessarily the chain with the longest length.

Usually when we reorganize one or two blocks, then the blocks will obviously have the same difficulty and therefore represent the same amount of work, so the longest chain will be the chain with the most work. However, if a fork lasted long enough to significantly stretch beyond a difficulty retargeting and in to a new difficulty epoch, then blocks on each chain would represent a different amount of work and so the longest chain may not necessarily be the chain with the most work. Nodes will switch to a shorter chain if that chain has more accumulated work.
zezaiement
Newbie
*
Offline Offline

Activity: 21
Merit: 7


View Profile
May 14, 2023, 11:21:03 AM
 #5

Miners should generally choose the fork with the longest length.
This is wrong.

Nodes will follow the chain which has the most accumulated work. This is not necessarily the chain with the longest length.

Usually when we reorganize one or two blocks, then the blocks will obviously have the same difficulty and therefore represent the same amount of work, so the longest chain will be the chain with the most work. However, if a fork lasted long enough to significantly stretch beyond a difficulty retargeting and in to a new difficulty epoch, then blocks on each chain would represent a different amount of work and so the longest chain may not necessarily be the chain with the most work. Nodes will switch to a shorter chain if that chain has more accumulated work.

This is also wrong, let me explain why I was not wrong.

While a shorter and more difficult fork may offer higher rewards in the short term, it is important for miners to consider the long-term implications. The longer fork represents the consensus of the network, as it has accumulated more computational work and has a greater number of participants supporting it. By choosing the longer fork, miners align themselves with the majority, reducing the risk of their blocks being orphaned or invalidated in the future.
It's worth noting that miners typically rely on consensus rules implemented by the network's protocol and the consensus of the majority of miners and nodes. Following these rules and aligning with the majority helps maintain the integrity and stability of the blockchain.
un_rank
Hero Member
*****
Offline Offline

Activity: 714
Merit: 684


- Jay -


View Profile WWW
May 14, 2023, 11:36:35 AM
Merited by o_e_l_e_o (4), vapourminer (3)
 #6

The longer fork represents the consensus of the network, as it has accumulated more computational work and has a greater number of participants supporting it.
Being the longer chain does not mean a fork has accumulated more computational work. Proof of work is determined by the difficulty in solving the puzzles which influences the amount of computational energy that is spent. A longer chain can have significantly less computational work if it has a low difficulty level.

It's worth noting that miners typically rely on consensus rules implemented by the network's protocol and the consensus of the majority of miners and nodes. Following these rules and aligning with the majority helps maintain the integrity and stability of the blockchain.
In the proof of work model, consensus should be determined by the greater work done.

- Jay -

██████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██████████████████████
.SHUFFLE.COM..███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
█████████████████████
████████████████████
██████████████████████
████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
██████████████████████
██████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
.
...Next Generation Crypto Casino...
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 14, 2023, 11:41:56 AM
 #7

The longer fork represents the consensus of the network, as it has accumulated more computational work and has a greater number of participants supporting it.
This is not correct.

As I explained above, the longest chain does not necessarily contain the most accumulated work. I could fork bitcoin right now, drop the difficulty to 1, and then churn out 10,000 blocks in a few minutes. My new chain would be far longer than the main chain, but have much less accumulated work because the number of hashes required to generate all 10,000 of my blocks would only be tiny fraction of the number of hashes to generate a single block on the main chain. The main chain, although shorter, would have the higher amount of work, and so everyone else would stay on that chain and not switch to my longer chain.

By choosing the longer fork, miners align themselves with the majority, reducing the risk of their blocks being orphaned or invalidated in the future.
No, they do this by aligning themselves with the chain with most work, which again, is not the same as the longest chain.
Kryptowerk
Legendary
*
Offline Offline

Activity: 2030
Merit: 1401


Disobey.


View Profile
May 14, 2023, 03:45:33 PM
 #8

The longer fork represents the consensus of the network, as it has accumulated more computational work and has a greater number of participants supporting it.
This is not correct.

As I explained above, the longest chain does not necessarily contain the most accumulated work. I could fork bitcoin right now, drop the difficulty to 1, and then churn out 10,000 blocks in a few minutes. My new chain would be far longer than the main chain, but have much less accumulated work because the number of hashes required to generate all 10,000 of my blocks would only be tiny fraction of the number of hashes to generate a single block on the main chain. The main chain, although shorter, would have the higher amount of work, and so everyone else would stay on that chain and not switch to my longer chain.

By choosing the longer fork, miners align themselves with the majority, reducing the risk of their blocks being orphaned or invalidated in the future.
No, they do this by aligning themselves with the chain with most work, which again, is not the same as the longest chain.

That's a greate explanation and a pretty crucial point. So a difficulty comparison is done every time by just checking the zeros in front of the latest blockhash?

Reading about the accidental-fork-by-miners issue, I remember there was one instance, maybe already 10 years ago, when this happened 6 or seven times in a row. It then became apparent that there was a bug causing this. Need to look up what happened there exactly.

Get educated about Bitcoin. Check out Andreas Antonopoulos on Youtube. An old but gold talk: https://www.youtube.com/watch?v=rc744Z9IjhY

Daniel Schmachtenberger on The Meta-Crisis: https://www.youtube.com/watch?v=4kBoLVvoqVY&t=288s One of the most important talks about the current state of this planet. Go check it out.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 14, 2023, 03:58:47 PM
 #9

That's a greate explanation and a pretty crucial point. So a difficulty comparison is done every time by just checking the zeros in front of the latest blockhash?
Not quite. The amount of work is based on the current difficulty, and not the individual hashes of each block. Every block in the same difficulty epoch will add the same amount of chain work, regardless of the actual hashes or the number of leading zeroes in each hash.
zezaiement
Newbie
*
Offline Offline

Activity: 21
Merit: 7


View Profile
May 14, 2023, 04:03:32 PM
 #10

The longer fork represents the consensus of the network, as it has accumulated more computational work and has a greater number of participants supporting it.
This is not correct.

As I explained above, the longest chain does not necessarily contain the most accumulated work. I could fork bitcoin right now, drop the difficulty to 1, and then churn out 10,000 blocks in a few minutes. My new chain would be far longer than the main chain, but have much less accumulated work because the number of hashes required to generate all 10,000 of my blocks would only be tiny fraction of the number of hashes to generate a single block on the main chain. The main chain, although shorter, would have the higher amount of work, and so everyone else would stay on that chain and not switch to my longer chain.

By choosing the longer fork, miners align themselves with the majority, reducing the risk of their blocks being orphaned or invalidated in the future.
No, they do this by aligning themselves with the chain with most work, which again, is not the same as the longest chain.

That's a greate explanation and a pretty crucial point. So a difficulty comparison is done every time by just checking the zeros in front of the latest blockhash?

Reading about the accidental-fork-by-miners issue, I remember there was one instance, maybe already 10 years ago, when this happened 6 or seven times in a row. It then became apparent that there was a bug causing this. Need to look up what happened there exactly.
The difficulty of mining is determined by the network protocol and is adjusted periodically based on the target set by the protocol.

In most blockchain systems, including Bitcoin, the difficulty adjustment algorithm takes into account the average time it took to mine a certain number of blocks in the past. If the blocks were mined too quickly, indicating that the network's total computational power exceeds the intended rate, the difficulty is increased. Conversely, if blocks were mined too slowly, the difficulty is decreased.
This is designed to ensure that the average time to mine a block remains relatively constant over time.
zeuner
Member
**
Offline Offline

Activity: 189
Merit: 16


View Profile
May 15, 2023, 02:03:08 PM
 #11

The longer fork represents the consensus of the network, as it has accumulated more computational work and has a greater number of participants supporting it.
Being the longer chain does not mean a fork has accumulated more computational work. Proof of work is determined by the difficulty in solving the puzzles which influences the amount of computational energy that is spent. A longer chain can have significantly less computational work if it has a low difficulty level.


Considering that both chains are supposed to exist at the same time, and having forked apart from a common block, how would the longer chain have a lower difficulty level if both chains adhered the difficulty retargeting protocol?
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 15, 2023, 02:11:42 PM
Merited by un_rank (1)
 #12

Considering that both chains are supposed to exist at the same time, and having forked apart from a common block, how would the longer chain have a lower difficulty level if both chains adhered the difficulty retargeting protocol?
I've answered this above:

Usually when we reorganize one or two blocks, then the blocks will obviously have the same difficulty and therefore represent the same amount of work, so the longest chain will be the chain with the most work. However, if a fork lasted long enough to significantly stretch beyond a difficulty retargeting and in to a new difficulty epoch, then blocks on each chain would represent a different amount of work and so the longest chain may not necessarily be the chain with the most work. Nodes will switch to a shorter chain if that chain has more accumulated work.

Usually, the longest chain does indeed have the most work, since as you say, when the chains fork each block on each chain adds the exact same amount of work. If the fork continues past a retargeting, then the chains will have different difficulty adjustments since they will not have found all the blocks between the fork and the retargeting in the exact same amount of time. From that point on, the blocks added to each chain do not add the same amount of work, and so the longer chain will not necessarily be the chain with the most work.
un_rank
Hero Member
*****
Offline Offline

Activity: 714
Merit: 684


- Jay -


View Profile WWW
May 15, 2023, 06:53:02 PM
 #13

In most blockchain systems, including Bitcoin, the difficulty adjustment algorithm takes into account the average time it took to mine a certain number of blocks in the past.
Bitcoin difficulty adjustment does not take a random period of time in the past, it only accounts for the last 2,016 of confirmed blocks and uses the time taken to mine a block averagely to adjust the difficulty.

Considering that both chains are supposed to exist at the same time, and having forked apart from a common block, how would the longer chain have a lower difficulty level if both chains adhered the difficulty retargeting protocol?
As mentioned it depends on if the chains last into the next retargetting, which will result in different amounts of work in the different chains.

- Jay -

██████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██████████████████████
.SHUFFLE.COM..███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
█████████████████████
████████████████████
██████████████████████
████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
██████████████████████
██████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
.
...Next Generation Crypto Casino...
hd49728
Legendary
*
Offline Offline

Activity: 2086
Merit: 1028



View Profile WWW
May 16, 2023, 01:46:09 AM
 #14

When miner encountering a fork, one fork has less difficulty but longer in length, while the other fork is more difficult but short. Which fork should miners choose Smiley?
A fork will occur when on the initial chain, there is split to two or three different chains. Miners and mining pools have to choose what chain they will continue to mine with and obey those consensus on that chain.

Usually mining pools, nodes, and miners will choose a longest chain to continue their work (mining blocks and confirm transactions). They will less likely to choose shorter chains as it contains more risk for them. The second scenario only happens when some mining pools intentionally support a consensus which leads to that shorter chain so they clearly know what they are doing when they choosing that short chain, then become a fork.

Hell no, do you know that most of forks are useless and will die with time?

A comparative analysis of Bitcoin forks.
How many Bitcoin forks are there?

.freebitcoin.       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.PLAY NOW.
bettercrypto
Sr. Member
****
Offline Offline

Activity: 1330
Merit: 268


★Bitvest.io★ Play Plinko or Invest!


View Profile WWW
May 16, 2023, 09:27:25 AM
 #15

When miner encountering a fork, one fork has less difficulty but longer in length, while the other fork is more difficult but short. Which fork should miners choose Smiley?

You know, the miner should choose to mine the longest chain that the network is likely to accept. Because mining a short chain will be pointless, because the network will eventually abandon that chain as well as I know and understand the point you are making.

And accidental hard fork are also relatively rare and resolved quickly as well too.

Source: https://en.wikipedia.org/wiki/Fork_(blockchain)
           https://www.bitstamp.net/learn/crypto-101/what-are-blockchain-forks/



BIG WINNER!
[15.00000000 BTC]


▄████████████████████▄
██████████████████████
██████████▀▀██████████
█████████░░░░█████████
██████████▄▄██████████
███████▀▀████▀▀███████
██████░░░░██░░░░██████
███████▄▄████▄▄███████
████▀▀████▀▀████▀▀████
███░░░░██░░░░██░░░░███
████▄▄████▄▄████▄▄████
██████████████████████
▀████████████████████▀
▄████████████████████▄
██████████████████████
█████▀▀█▀▀▀▀▀▀██▀▀████
█████░░░░░░░░░░░░░▄███
█████░░░░░░░░░░░░▄████
█████░░▄███▄░░░░██████
█████▄▄███▀░░░░▄██████
█████████░░░░░░███████
████████░░░░░░░███████
███████░░░░░░░░███████
███████▄▄▄▄▄▄▄▄███████
██████████████████████
▀████████████████████▀
▄████████████████████▄
███████████████▀▀▀▀▀▀▀
███████████▀▀▄▄█░░░░░█
█████████▀░░█████░░░░█
███████▀░░░░░████▀░░░▀
██████░░░░░░░░▀▄▄█████
█████░▄░░░░░▄██████▀▀█
████░████▄░███████░░░░
███░█████░█████████░░█
███░░░▀█░██████████░░█
███░░░░░░████▀▀██▀░░░░
███░░░░░░███░░░░░░░░░░
▀██░▄▄▄▄░████▄▄██▄░░░░
▄████████████▀▀▀▀▀▀▀██▄
█████████████░█▀▀▀█░███
██████████▀▀░█▀░░░▀█░▀▀
███████▀░▄▄█░█░░░░░█░█▄
████▀░▄▄████░▀█░░░█▀░██
███░▄████▀▀░▄░▀█░█▀░▄░▀
█▀░███▀▀▀░░███░▀█▀░███░
▀░███▀░░░░░████▄░▄████░
░███▀░░░░░░░█████████░░
░███░░░░░░░░░███████░░░
███▀░██░░░░░░▀░▄▄▄░▀░░░
███░██████▄▄░▄█████▄░▄▄
▀██░████████░███████░█▀
▄████████████████████▄
████████▀▀░░░▀▀███████
███▀▀░░░░░▄▄▄░░░░▀▀▀██
██░▀▀▄▄░░░▀▀▀░░░▄▄▀▀██
██░▄▄░░▀▀▄▄░▄▄▀▀░░░░██
██░▀▀░░░░░░█░░░░░██░██
██░░░▄▄░░░░█░██░░░░░██
██░░░▀▀░░░░█░░░░░░░░██
██░░░░░▄▄░░█░░░░░██░██
██▄░░░░▀▀░░█░██░░░░░██
█████▄▄░░░░█░░░░▄▄████
█████████▄▄█▄▄████████
▀████████████████████▀




Rainbot
Daily Quests
Faucet
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 16, 2023, 10:03:34 AM
 #16

Usually mining pools, nodes, and miners will choose a longest chain to continue their work
You know, the miner should choose to mine the longest chain
Once again, as I've said multiple times above, nodes and miners choose the chain with the most chain work, which is not synonymous with the longest chain.

In the event of a fork of just one or two blocks where both chains have the same amount of work, then nodes will generally pick the chain which they saw first.
Synchronice
Hero Member
*****
Offline Offline

Activity: 854
Merit: 773


Watch Bitcoin Documentary - https://t.ly/v0Nim


View Profile
May 16, 2023, 11:49:51 AM
Merited by o_e_l_e_o (4)
 #17

Miners should generally choose the fork with the longest length.
This is wrong.

Nodes will follow the chain which has the most accumulated work. This is not necessarily the chain with the longest length.

Usually when we reorganize one or two blocks, then the blocks will obviously have the same difficulty and therefore represent the same amount of work, so the longest chain will be the chain with the most work. However, if a fork lasted long enough to significantly stretch beyond a difficulty retargeting and in to a new difficulty epoch, then blocks on each chain would represent a different amount of work and so the longest chain may not necessarily be the chain with the most work. Nodes will switch to a shorter chain if that chain has more accumulated work.
Actually, you are right! I always thought the longest chain was the answer because the whitepaper says:
Quote
Nodes always consider the longest chain to be the correct one and will keep working on extending it
Quote
The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it

It's true that originally the block height was a main factor but it was changed later when people saw the danger of height over most work where one can mine blocks locally  with low difficulty, manipulate timestamp and make his chain the longest chain, broadcast it and do the magic. To protect ourselves from this accident, we should follow chain with more accumulated work.

Thank you for this post, you really enlightened me.

.freebitcoin.       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.PLAY NOW.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 16, 2023, 02:02:17 PM
Merited by nc50lc (2), PowerGlove (1)
 #18

Actually, you are right! I always thought the longest chain was the answer because the whitepaper says:
Correct, and well noted!

When writing the Whitepaper, Satoshi clearly didn't envisage the issue with a longer chain having less work, as I have described above. The code to change from height (longest chain) to chainwork (chain with the most work) was implemented in 0.3.3 in July 2010, as you can see here: https://github.com/bitcoin/bitcoin/commit/40cd0369419323f8d7385950e20342e998c994e1#diff-623e3fd6da1a45222eeec71496747b31R420
mindwatcher
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
May 17, 2023, 03:05:05 PM
 #19

When a fork occurs, miners have the ability to choose which blockchain branch they will work on. They make this choice using consensus algorithms, which typically rely on computational power (Proof of Work) or other criteria   
IShishkin
Member
**
Offline Offline

Activity: 76
Merit: 28


View Profile
May 17, 2023, 04:39:13 PM
 #20

1) According Bitcoin Proof-of-Work consensus, Miners follow the valid chain with the most accumulated Proof-of-Work

2) Traditionally this chain is called "the longest chain". However, this name is confusing.

3) Often the heaviest valid chain coincide with the longest valid chain in Bitcoin. However, in general case it might not be true.

4) There are theorems which claim that under certain conditions heaviest chain coincide with the longest chain.

5) In this context, other rules of Bitcoin protocol has an important role too. For example, Bitcoin client doesn't append into the blockchain blocks which have timestamps more than 2 hours into the future.

If this rule is discarded, then a solo miner can mine a longest chain by systematically putting timestamps far into the future. In this scenario, the block difficulty will decrease and this solo miner will be able to mine blocks with a little effort. However, his personal longest chain won't have the most accumulated Proof-of-Work, unless he has more computational power than the rest of the network.

If this solo miner poses more computational power than the rest of the network, he may generate the longest and the heaviest chain in the network. However, his chain might be truncated by peers, who will discard those blocks whose timestamps are far in the future. After this truncation his chain might be not as long and difficult as it was before. In this edge case scenario miners might follow the chain which is neither the longest, nor the heaviest.   
Pages: [1] 2 »  All
  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!