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.

  • How slow is 'very slow'? About how many blocks per second? – David Schwartz Oct 19 '11 at 19:45
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.

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.

  • 8
    A 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 Oct 19 '11 at 19:45
  • 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: bitcointalk.org/index.php?topic=74275.msg823763#msg823763 – Chris Moore Apr 13 '12 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.