Bitcoin Forum
April 27, 2024, 12:17:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Deep block chain re-organisation  (Read 999 times)
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1072


View Profile
June 29, 2011, 12:49:08 AM
 #1

Hi,

What happens if there's a fork really deep?

getdata uses CBlockLocator for the starting hashes. If presented with an ending hash deep enough in the chain, then it will return blocks starting from that forked point in CBlockLocator. However re-requesting the next chunk of blocks (after the first 500 on the forked branch) won't happen because the difficulty hasn't increased enough yet to cause an internal block chain reorganisation and become the new main chain.

This seems to be the case since the starting point for getdata is always the head of the best chain in the code.

I guess this is one of those astronomically unlikely scenarios that it's not a worry. In that case it might be a point to artificially limit the amount of start hashes in getdata and save some bandwidth.
1714177029
Hero Member
*
Offline Offline

Posts: 1714177029

View Profile Personal Message (Offline)

Ignore
1714177029
Reply with quote  #2

1714177029
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714177029
Hero Member
*
Offline Offline

Posts: 1714177029

View Profile Personal Message (Offline)

Ignore
1714177029
Reply with quote  #2

1714177029
Report to moderator
MoonShadow
Legendary
*
Offline Offline

Activity: 1708
Merit: 1007



View Profile
June 29, 2011, 01:00:28 AM
 #2

Hi,

What happens if there's a fork really deep?


That's astronomicly unlikely to occur, but even if it did, all the clients have benchmarking hard coded into them that prevents them from going back and reorging beyond their latest benchmarked block.  The benchmarking basicly involves a list of block numbers chosen largely at random, and their established hash values.  If there is any kind of blockchain attack that tries to convince one or more clients that there is a differnet true chain, it must also be able to match hashs with these benchmarks as far back as they go, and not all of the clients have the same benchmarking list, so even diving into your own client to find the list to match won't necessarily mean that an attacker won't run into a client with a different benchmarked list.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
ByteCoin
Sr. Member
****
expert
Offline Offline

Activity: 416
Merit: 277


View Profile
June 29, 2011, 01:18:24 AM
 #3

all the clients have benchmarking hard coded into them that prevents them from going back and reorging beyond their latest benchmarked block.

When MoonShadow says "benchmark" he means "checkpoint". From main.cpp...
Code:
bool CBlock::AcceptBlock()
{

...

    // Check that the block chain matches the known block chain up to a checkpoint
    if (!fTestNet)
        if ((nHeight ==  11111 && hash != uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d")) ||

etc...

Also, the vanilla client has the checkpoints. There are other clients. I don't know whether they have checkpoints...

ByteCoin
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1072


View Profile
June 29, 2011, 01:51:11 AM
 #4

Ah yes, I forgot about the checkpoints.
BeeCee1
Member
**
Offline Offline

Activity: 115
Merit: 10


View Profile
June 29, 2011, 02:58:31 AM
 #5

not all of the clients have the same benchmarking list, so even diving into your own client to find the list to match won't necessarily mean that an attacker won't run into a client with a different benchmarked list.
They seem to have the same list to me.  Newer versions have additional entries but once on the list they don't seem to change

List from 0.3.19:
nHeight
11111
33333
68555
70567
74000

List from 0.3.23:
nHeight
11111
33333
68555
70567
74000
105000
118000
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!