Bitcoin Forum
September 29, 2016, 06:44:00 AM *
News: Latest stable version of Bitcoin Core: 0.13.0 (New!) [Torrent]. Make sure you verify it.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [RFC] Best method for initial block download?  (Read 2160 times)
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
October 18, 2010, 05:59:20 AM
 #1


We really need to improve bitcoin's startup time for the first-time user, notably the block chain download.  Has anyone given this any thought already?

I would suggest
  • guarantee that blkNNNN.dat is the same on all platforms (Linux, Windows, 32-bit, 64-bit)
  • publish zip-compressed block chain up to block XXXXX on bitcoin.org, where XXXXX == the largest height of hashes built into bitcoin
    binary
  • publish zip-compressed block chain via trackerless torrent
  • call out to remote BT program to download block chain, falling back to HTTP if not working

Another option is to add a more efficient network retrieval method, such as a "download-pkg" command, where a "pkg" is defined as a pre-packaged, pre-compressed range of blocks.  a list of block chain ranges packaged could be retrieved via "list-pkgs".  Or generalize this concept further by permitting the bitcoin network protocol to share and download unspecified binary objects based on SHA-1 hash.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1475131440
Hero Member
*
Offline Offline

Posts: 1475131440

View Profile Personal Message (Offline)

Ignore
1475131440
Reply with quote  #2

1475131440
Report to moderator
1475131440
Hero Member
*
Offline Offline

Posts: 1475131440

View Profile Personal Message (Offline)

Ignore
1475131440
Reply with quote  #2

1475131440
Report to moderator
1475131440
Hero Member
*
Offline Offline

Posts: 1475131440

View Profile Personal Message (Offline)

Ignore
1475131440
Reply with quote  #2

1475131440
Report to moderator
genjix
Legendary
*
expert
Offline Offline

Activity: 1232


View Profile
October 18, 2010, 06:36:27 AM
 #2

not that bad. i downloaded it and had them all in a few hours

Donate to DarkWallet
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
October 18, 2010, 06:38:41 AM
 #3

Most software doesn't require a few hours, post-install, to be useable...

Compressed, it's not very much data either.  bzip2 says 25MB:
Quote
[jgarzik@bd data]$ bzip2 -9v blk0001.dat
  blk0001.dat:  1.445:1,  5.537 bits/byte, 30.78% saved, 36566910 in, 25310234 out.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
LZ
Staff
Legendary
*
Offline Offline

Activity: 1470


Satoshi everywhere!


View Profile WWW
October 18, 2010, 07:17:14 AM
 #4

With XZ it will be about 22. Smiley

"Never invest unless you can afford to lose your entire investment." © S3052
caveden
Legendary
*
Offline Offline

Activity: 1106



View Profile
October 18, 2010, 09:53:15 AM
 #5

Most software doesn't require a few hours, post-install, to be useable...

Can't you send coins while the chain is downloading?
Won't you see received transactions with 0 confirmations until the corresponding block is downloaded?

I thought the only problem was the generation, which is not that serious as a problem since the chance of generating something in a couple hours is really tiny.

But anyway, your ideas are good. The faster the better. Smiley


18rZYyWcafwD86xvLrfuxWG5xEMMWUtVkL
Insti
Sr. Member
****
Offline Offline

Activity: 294


Firstbits: 1duzy


View Profile
October 18, 2010, 11:25:46 AM
 #6


1) Download the most recent block (X) first.

As new blocks (Y)..(Z)..(AA)... come in, add them to the chain as normal.
This means new users can start generating straight away, and will see their transactions as soon as they come in.

2) Grow the block chain backwards by fetching (W)..(V)..(U).. etc

Let the user know when they have the full 'trusted' blockchain from the origin.

If they somehow get an evil node X, they'll work it out eventually when the previous blockchain does not validate to the origin.





caveden
Legendary
*
Offline Offline

Activity: 1106



View Profile
October 18, 2010, 02:50:12 PM
 #7

haha, forgot that "detail"... der!

18rZYyWcafwD86xvLrfuxWG5xEMMWUtVkL
nightrow
Newbie
*
Offline Offline

Activity: 15


View Profile
October 18, 2010, 06:56:44 PM
 #8

What about giving current block chain in the binary release, or put a link to a zipped version on the download page ?
It isn't automated download, but is nonetheless much faster.

bitcoin randomizer : http://fxnet.co.cc/?ref=148 turn 1BTC into many BTC
Want to give me some bitcoin ? 1JrbxRMVhdFUHkoSGk7RRvjYS5FfJMUUj9
LZ
Staff
Legendary
*
Offline Offline

Activity: 1470


Satoshi everywhere!


View Profile WWW
October 18, 2010, 09:27:27 PM
 #9

I think that giving current block chain in the binary release is bad idea.
It should be block chain up to 74000 block because it is hardcoded. Smiley

"Never invest unless you can afford to lose your entire investment." © S3052
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2422


View Profile
October 18, 2010, 11:26:44 PM
 #10

Most of the "download" time is actually caused by the verification of all the blocks (doing the crypto verification on 130,000+ transactions). The actual download doesn't take very much time at all, as you can see if you download the database files. Things could be sped up considerably if Bitcoin just skipped verification on blocks before the latest checkpoint. There's a philosophical difference, though, which is probably why this is not already done: the checkpoints tell you when the blocks are wrong, but skipping verification would tell you when they are right, which makes things more centralized.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!