Why isn't there a fast blockchain update inside a LAN behind a router between two Bitcoin clients?

8

This is the scenario:

  • 2 computers on a LAN with private IPs (192.168.X.X)
  • router forwards port 8333 only to one of them (the 2nd one).
  • one computer has the full blockchain updated in its Bitcoin client,
  • the 2nd computer has only half the size of the block chain (Bitcoin client has not been run for a long time).

Why doesn't the Bitcoin client from the second computer detect the first computer and receive the remaining missing blocks at high LAN speed?

What i see is a very slow update of the chain on the 2nd computer.

thedrs

Posted 2011-10-19T05:48:03.180

Reputation: 299

How slow is 'very slow'? About how many blocks per second?David Schwartz 2011-10-19T19:45:56.337

Answers

11

Because the bitcoin client tries to avoid being "fenced in" by an attacker who wants to control all the information flowing to it. It does this by connecting to more distant nodes, i.e. nodes which don't share the first two octets of the IP address. (update: the new address manager code still defends against this type of attack, but probably not in exactly the same way any more.)

If you know of a trusted nearby node, you can configure it with the -connectcommand line option or the connect= setting in bitcoin.conf.

user220

Posted 2011-10-19T05:48:03.180

Reputation:

9

You can run Bitcoin with the -connect=192.168.1.3 (or whatever) switch to connect one local node to another one.

This will still not get the blocks super quickly, since the second node still needs to build a database and verify every transaction in the chain.

theymos

Posted 2011-10-19T05:48:03.180

Reputation: 8 228

8A typical PC will only be able to verify about 40 blocks per second, regardless of how fast it can receive them. So a typical PC will need more than an hour to go from zero blocks to fully synched.David Schwartz 2011-10-19T19:45:02.547

Note that not "every transaction in the chain" is verified, only transactions after the most recent checkpoint. See a post I made about this here: https://bitcointalk.org/index.php?topic=74275.msg823763#msg823763

Chris Moore 2012-04-13T15:06:47.050