Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Gareth Nelson on May 20, 2011, 05:30:32 PM



Title: I'm probably missing something......
Post by: Gareth Nelson on May 20, 2011, 05:30:32 PM
But is there any reason why the current blockchain can't be downloaded outside the client for first-time setup?
Although I suppose in theory it could, but for some reason it seems to be unsupported and the client instead downloads it all from peers (at a very slow speed - it took hours for me when it could take minutes going over a simple HTTP download).

So, what have I missed?


Title: Re: I'm probably missing something......
Post by: cuddlefish on May 20, 2011, 05:34:13 PM
If I give you a fake blockchain, I can give you a fake blockchain.


Title: Re: I'm probably missing something......
Post by: error on May 20, 2011, 05:35:43 PM
The blockchain to 120K blocks is on the sourceforge download page.


Title: Re: I'm probably missing something......
Post by: Gareth Nelson on May 20, 2011, 05:36:27 PM
You can, but I can get the hash of the entire chain from peers and verify that what I just downloaded is correct while still getting the speed advantage.


Title: Re: I'm probably missing something......
Post by: Gareth Nelson on May 20, 2011, 05:37:26 PM
The blockchain to 120K blocks is on the sourceforge download page.

But the client doesn't download that by default, right?


Title: Re: I'm probably missing something......
Post by: Vandroiy on May 20, 2011, 09:28:57 PM
It's reasonable to choose security over speed in default settings.


Title: Re: I'm probably missing something......
Post by: error on May 21, 2011, 06:57:21 PM
The blockchain to 120K blocks is on the sourceforge download page.

But the client doesn't download that by default, right?

The client ALWAYS downloads the block chain. It will download the block chain from its peers if one isn't already present.


Title: Re: I'm probably missing something......
Post by: Gareth Nelson on May 22, 2011, 12:48:27 PM
The blockchain to 120K blocks is on the sourceforge download page.

But the client doesn't download that by default, right?

The client ALWAYS downloads the block chain. It will download the block chain from its peers if one isn't already present.

I meant it doesn't download over HTTP - it downloads from peers, which can be slower


Title: Re: I'm probably missing something......
Post by: Sawzall on May 22, 2011, 05:37:47 PM
The client defaults to downloading from peers, which is probably more secure than an HTTP direct download.


Title: Re: I'm probably missing something......
Post by: xlcus on May 22, 2011, 05:50:48 PM
It can always verify the HTTP download with other peers afterwards, so it wouldn't be any more insecure.


Title: Re: I'm probably missing something......
Post by: Gareth Nelson on May 22, 2011, 05:55:08 PM
As I said:
You can, but I can get the hash of the entire chain from peers and verify that what I just downloaded is correct while still getting the speed advantage.


Title: Re: I'm probably missing something......
Post by: eMansipater on May 22, 2011, 06:37:52 PM
I think the reason this is the default is simply for bandwidth reasons, but I could be wrong.


Title: Re: I'm probably missing something......
Post by: bittrader on May 22, 2011, 07:16:01 PM
For whatever it's worth: the last time I walked someone through using the official Bitcoin client, I was paying attention to see what the least user-friendly part of the experience was. It seemed to be the long wait that the user had to go through while downloading the block chain. In addition to taking hours of time, there was no explanation of what was happening and no indication of when the process would be over.


Title: Re: I'm probably missing something......
Post by: xlcus on May 22, 2011, 07:22:11 PM
For whatever it's worth: the last time I walked someone through using the official Bitcoin client, I was paying attention to see what the least user-friendly part of the experience was. It seemed to be the long wait that the user had to go through while downloading the block chain. In addition to taking hours of time, there was no explanation of what was happening and no indication of when the process would be over.
Yeah, it would be nice if it could show the current block count so you knew how far you'd got, perhaps with a calculated ETA


Title: Re: I'm probably missing something......
Post by: Maged on May 24, 2011, 02:16:35 AM
It can always verify the HTTP download with other peers afterwards, so it wouldn't be any more insecure.
Actually, the act of downloading the blockchain is quite fast. In fact, it's the verification part that takes the longest.

This will be easier once we have "light" clients. They can start in "light" mode and convert to a full node over time.


Title: Re: I'm probably missing something......
Post by: Gareth Nelson on May 24, 2011, 07:14:36 AM
It can always verify the HTTP download with other peers afterwards, so it wouldn't be any more insecure.
Actually, the act of downloading the blockchain is quite fast. In fact, it's the verification part that takes the longest.

This will be easier once we have "light" clients. They can start in "light" mode and convert to a full node over time.

It takes 1.35 seconds to sha256sum the blockchain on my computer


Title: Re: I'm probably missing something......
Post by: Pieter Wuille on May 24, 2011, 10:18:38 AM
The hard part is not doing the sha256 checksum - it's verifying whether the ECDSA signatures are valid, and the transaction inputs are spent yet. So it requires both computation (an ECDSA signature verification is close a millisecond of CPU time), and disk seeks (random access to the block chain database).