Bitcoin Forum
November 10, 2024, 12:42:24 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [DEVS] Idea for improving Blockchain download and verification speeds  (Read 1324 times)
rme (OP)
Hero Member
*****
Offline Offline

Activity: 756
Merit: 504



View Profile
May 23, 2013, 02:42:03 PM
 #1

Currently, the blockchain size is 7.5 GB (235.000 blocks) and it takes more than 24 hours to download and verify with an average home connection.

My idea does not need any type of hard-fork or change in the protocol, It can be implemented in alternative clients or in Bitcoin-QT today without any incompatibility.

Downloading the whole blockchain for an average user at 20mbps should take 50 minutes but the Bitcoin-QT checks every single transaction since the genesis block.


Implementation in clients (Bitcoin-QT):

Every 4032 blocks (28 days in average) a Blockchain Block Checksum is generated by a trusted developer and included in the Bitcoin Client.

This Checksum consists in a hash of the blockchain at the actual length. For security, 6 hashes are involved.
Example of a Blockchain Block Checksum:

Quote
SHA512
SHA256
SHA384
SHA1
MD5
CRC32
Quote
ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f 84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff
768412320f7b0aa5812fce428dc4706b3cae50e02a64caa16a782249bfe8efc4b7ef1ccb126255d 196047dfedf17a0a9
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
098f6bcd4621d373cade4e832627b4f6
accf8b33

You can try to obtain a collision that matches one hash but the probabilities that you find a collision for 6 hashes is near 0.

Also, this Checksums expire in 168 days (6 months aprox.) (if they do not contain any of the last 24192 blocks they are discarded). This is done to prevent a long time attack trying to find a collision in a old blockchain block checksum and to reduce the number of checksums hardcoded in the Bitcoin-QT source (only 6).



So, your Bitcoin-QT client has a list hashes of the Blockchain at different heights, what for?

People can start uploading Blockchain backups (one backup every 4032 blocks)  via Torrent, HTTP, FTP or sharing a HardDrive and you can just download it and move it to your Bitcoin directory.

When you start your Bitcoin-QT client it checks that the Blockchain Backup is valid and it has not expired (more than 6 months old).
If it is valid the client does not need to verify every single transaction and can just start downloading the remaining blocks. (If it is the lastest checkpoint backup you only have to download and verify 4032 blocks).



Pros:
- Less download and verify time to get the Blockchain

Cons:
- A developer can hard code an untrusted hash. (If you do not trust the person who codes Bitcoin-QT you cannot use it, he can just change other part of the code).



Summary:
A criptography secure method to download the blockchain via torrent or other method and do not need to verify every single transaction (only the last 4032 blocks are verified).
For additional information read the whole post.
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1100


View Profile
May 23, 2013, 05:32:05 PM
 #2

Currently, the blockchain size is 7.5 GB (235.000 blocks) and it takes more than 24 hours to download and verify with an average home connection.

See Bitcoin blockchain data torrent thread.

Quote
Every 4032 blocks (28 days in average) a Blockchain Block Checksum is generated by a trusted developer and included in the Bitcoin Client.

This is already done in limited form the form of checkpoints.

However, because bitcoin is a zero-trust system, it is impossible to avoid validating the full blockchain.


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Meuh6879
Legendary
*
Offline Offline

Activity: 1512
Merit: 1012



View Profile
October 01, 2014, 03:37:15 PM
 #3

I want create a archive (7-ZIP compressed) of the block folder located in the blockchain forlder of the bitcoin core application.
In this way, i want invalidate the method of the torrent system (need a whole day to valide the all 25Go downloaded on torrent network).

Can i separate in a group of downloads ?

Like :
- group 1 : blk001 to blk010 (with the rev file associate)
- group 2 : blk011 to blk020 (with the rev file associate)

In a bitcoin core system, the blk on a machine is the same on an other machine ?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!