Author

Topic: Deep block chain re-organisation (Read 1027 times)

member
Activity: 115
Merit: 10
June 28, 2011, 09:58:31 PM
#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
legendary
Activity: 1232
Merit: 1076
June 28, 2011, 08:51:11 PM
#4
Ah yes, I forgot about the checkpoints.
sr. member
Activity: 416
Merit: 277
June 28, 2011, 08:18:24 PM
#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
legendary
Activity: 1708
Merit: 1010
June 28, 2011, 08:00:28 PM
#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.
legendary
Activity: 1232
Merit: 1076
June 28, 2011, 07:49:08 PM
#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.
Jump to: