Bitcoin Forum
May 11, 2024, 03:13:28 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 18 19 20 21 22 23 24 25 »  All
  Print  
Author Topic: Block chain size/storage and slow downloads for new users  (Read 228612 times)
kd5zgl
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
June 26, 2014, 03:36:23 PM
 #201

Hi All,
  I am new to bitcoin, new to bitcointalk and to cryptocurrency in general, so let me apologize in advance if this info appears elsewhere.

  I had the slow blockchain update problem (fast computer, high bandwidth connection) and then I noticed something, maybe nothing, hope it helps:

  Try opening Bitcoin Core, go to Help / Debug Window / Network Traffic. When Core is first opened, it updates like crazy. After about fifteen minutes the network traffic drops to almost nada. This is when my node seems "stuck". All I have to do is exit Core, restart it, and as soon as it has active connection it starts updating like gangbusters again. Had to do this several times to get the whole blockchain, but it was worth it. Maybe it will work for some other folks, hope so.

  I'm running v0.9.2.1-g354c0f3-beta (64-bit) on Win8.1, I also have an Ubuntu 14.04 box that runs pretty much 24/7 and I'd like to run a fulltime nodes on it, partly because of the concerns voiced by Mike and others regarding the dwindling number of nodes and how that affects the decentralized nature of bitcoin. It seems like a damn good idea, bitcoin, and I plan to hang on for as long as the Powers That Be allow me to.

  Cheers, and Hope This Helps.



  
1715397208
Hero Member
*
Offline Offline

Posts: 1715397208

View Profile Personal Message (Offline)

Ignore
1715397208
Reply with quote  #2

1715397208
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715397208
Hero Member
*
Offline Offline

Posts: 1715397208

View Profile Personal Message (Offline)

Ignore
1715397208
Reply with quote  #2

1715397208
Report to moderator
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
June 26, 2014, 04:07:56 PM
 #202

I think the problem here is not the size of the blockchain itself. The problem is how the blockchain is handled.

Well there is room for improvement but the client doesn't use blocks the way you think it does so that leads to a lot of incorrect conclusions.

Quote
While using the client I found several problems. The first problem is that the client wastes bandwidth by downloading blocks that it already has. I suspect the P2P protocol does not have provision for a node telling "I already have block X, please send me blocks A, B and Z instead". I can see this problem in the debug.log file which is littered by "ERROR: ProcessBlock() : already have block X" where X runs from a certain number consecutively for several such messages then it jumps and again runs consecutively.

There are messages for requesting specific blocks and ranges of blocks.  The client uses them.  The issue may be a misbehaving client on the other end.  Say you request block X to Z from client A and get no response.  So you request block X to Z from client B.  Client B responds and you process those blocks.  At some point client A starts sending you blocks X to Z which you now already have.  If you find a specific bug where YOUR client is requesting blocks it already has be sure to report it but make sure it is actually a bug.

Quote
The second problem is the "Reading the list of blocks" and "Validating blocks" actions which takes a lot of time. Well, my question is why the client needs to "read the list of blocks" and "validate the blocks" every time it starts up. Well, the "read the list of blocks" is not taking that much time but "validate the blocks" is 10 minute operation. You know, once the blocks are validated, why they need to be revalidated at every program startup ?

It doesn't validate all of them.  It is done to ensure there has been no database corruption (possibly during the prior close due to a power failure).  It only checks a limited number of the most recent blocks.  You can from the config file adjust how many blocks to check and how detailed of a check to perform.  You can even set this to zero blocks if you like.

Quote
The third problem is that the client is "jumping over the data like goat over cemetery" while doing these two actions. This is MUCH SLOWER than reading the data in sequence. Why it needs to jump over the data so much? Maybe implement some caching?

There is a cache.  It is called the UTXO.  Block are only used to create and update the UTXO.  All validation of new txns and blocks is done against the UTXO.  Once a block is written to the disk other than for responding to block requests from other peers (or updating the UTXO in a reorg) they aren't used by your client.

Quote
The fourth problem is why the program splits the blockchain into 125 MB chunks? That is inefficient in Windows where opening and closing a file is pretty expensive operation. In my blockchain directory the first 10 GB are stored in 5 files (well, in fact 10 because I need to count the revXXXXX files) because they were downloaded by a 0.6.3 BETA client but the remaining 9 GB is spread over 75 files. Is there a way to reconfigure these storage parameters? And once I change them, is there a way to tell the client to repackage the blockchain so it is stored according to my wishes? I prefer "few large files" over "many small files" on Windows because "many small files" is inefficient.

Older blocks are not needed except to provide blocks to peers who are bootstrapping.   Saying you prefer large files over small files in all cases is a dubious request.

Quote
A similar problem is with the "chainstate" data which is only 0.5 GB but is littered into 229 files. Well, that might not be your fault as I understand that these fileis actually belong to some sort of general purpose database which was recently replaced and actually is much faster now but I believe that this data could be handled more efficiently if it was in a single file (maybe developing a special purpose database?)

Reinventing the wheel?  The chainstate is stored in leveldb which is accepted as an incredibly lightweight and very fast key pair database.  It is doubtful you would design an alternative custom database with similar functionality that outperforms leveldb.  Also even if you could would the development time be worth reinventing the wheel rather than improving the actual client?

Quote
Also regarding the size of the blockchain, there are two things that should be done. The first thing is that the coinbase transaction can be as big as the miner wants (and some coinbase transactions weight few tens of KB, storing various stuff, see "Hidden Surprises in Bitcoin Blockchain" search on Google and especially this blog) so putting a limit to it for example 128 or even 64 bytes would be good (but the limit should not be too small because otherwise we could run into a bunch of blocks with no solution).
  The coinbase txns of all blocks represent <0.003% of the blockchain.  The size is already limited by general limits on the size of ScriptSigs for all transactions.  Seems a dubious use case.

Quote
And the second thing would be when storing the blockchain, extract the addresses and especially the public keys out of the block data, store them into some sort of index file and in the block data replace them with indices. That could reduce the size of the stored blockchain pretty significantly.

That cache is called the UTXO (the chainstate folder you dislike so much).  Blocks are used to build the UTXO in a trustless manner.  They aren't used to process or validate new blocks and transactions.   The raw blocks are just used to bootstrap new nodes so they too can build the UTXO in a trustless manner.

jctech
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 26, 2014, 05:15:55 PM
 #203

Thank you for the clarifications.

(...) At some point client A starts sending you blocks X to Z (...)

... and at this time my client would tell the client A to stop sending the blocks and send me bunch of others.

It doesn't validate all of them.  It is done to ensure there has been no database corruption (possibly during the prior close due to a power failure).  It only checks a limited number of the most recent blocks.  You can from the config file adjust how many blocks to check and how detailed of a check to perform.  You can even set this to zero blocks if you like.

How about marking the stored block chain as good after the client properly exits and then at the startup look for this mark and do the check only if the mark is not there?

There is a cache.  It is called the UTXO.  Block are only used to create and update the UTXO.  All validation of new txns and blocks is done against the UTXO.  Once a block is written to the disk other than for responding to block requests from other peers (or updating the UTXO in a reorg) they aren't used by your client.

Good to know. But why it is then accessing the disk so much? I am using the latest client. True, the speed went waaaaaaaaaaay up from the 0.6.x I was using before but still it touches the disk quite a bit.

Older blocks are not needed except to provide blocks to peers who are bootstrapping.   Saying you prefer large files over small files in all cases is a dubious request.

Well, maybe it might seem dubious in your eyes but you cannot be sure if there isn't a valid reason on my side for the request. It would be nice if I could control that stuff.

Reinventing the wheel?  The chainstate is stored in leveldb which is accepted as an incredibly lightweight and very fast key pair database.  It is doubtful you would design an alternative custom database with similar functionality that outperforms leveldb.  Also even if you could would the development time be worth reinventing the wheel rather than improving the actual client?

Good point. Thank you for pointing this out. One other question for me to ask would be "how about improving the leveldb so others can benefit from it as well?".

The coinbase txns of all blocks represent <0.003% of the blockchain.  The size is already limited by general limits on the size of ScriptSigs for all transactions.  Seems a dubious use case.

Good to know. Thank you. I did not do much statistics but

That cache is called the UTXO (the chainstate folder you dislike so much).  Blocks are used to build the UTXO in a trustless manner.  They aren't used to process or validate new blocks and transactions.   The raw blocks are just used to bootstrap new nodes so they too can build the UTXO in a trustless manner.

Maybe I might start liking the UTXO and stuff and disliking Windows instead (the client is running on Windows). I now remember that Windows is doing pretty crappy job at managing the disk and the files on it. Once I find the time for this, I will try to run the thing on (modern) Linux and see what happens.

Now I am starting to think that Windows is pretty crappy system for a task like this. I do know its disk cache sucks a lot. I also now remembered that recently I realized that the Windows's filesystem also sucks a lot (when compared with Linux filesystems) (have you ever tried to defragment NTFS and make sure that it really is defragmented? That is the thing I now remember doing recently and realizing it to be pretty impossible and concluding that NTFS sucks). Now I think that the leveldb guys and you, Bitcoin guys did an admirable job at forcing the stupid Windows to behave under such load (20+ GB of growing data + 0.5 GB of heavily updated data).
kd5zgl
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
June 26, 2014, 10:30:37 PM
 #204

N00b question and a comment: Now that I have the entire blockchain downloaded and verified on my Windows box, can I simply shoot it over to a Linux box (under the Linux bitcoin core software, of course) to get a jump on things, or do I have to download/verify it separately there? Are the blockchain data file formats the same? thanx.

Maybe I might start liking the UTXO and stuff and disliking Windows instead (the client is running on Windows). I now remember that Windows is doing pretty crappy job at managing the disk and the files on it. Once I find the time for this, I will try to run the thing on (modern) Linux and see what happens.

After the past few weeks running Windows 8.1 (NTFS) and Ubuntu 14.04 (ext4), both for the first time, doing some of the same disk intensive tasks, I can virtually guarantee that the Linux filesystem is enormously faster and more efficient. Good luck with your experiments!
ThomasCrowne
Full Member
***
Offline Offline

Activity: 210
Merit: 100

★☆★ 777Coin - The Exciting Bitco


View Profile
June 27, 2014, 06:25:48 AM
 #205

The first time I downloaded the blockchain (friend that introduced me to bitcoin insisted I run a full-node), it took my computer a little over a day and a half to download.  The last time I had to re-index my blockchain file (a couple of weeks ago) it took over 3 days!  Granted I have a few things running on the machine and it isn't exactly the New Kid on the Block, but sheesh.

davien
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250



View Profile
June 30, 2014, 10:08:26 AM
 #206

It always takes me a lot of time but if i close the wallet only if it is necessary than the next time i download the block chain it does not take me so much time ,but i have to admit at first it took me 3 days non stop downloading....

BtcGains
Newbie
*
Offline Offline

Activity: 38
Merit: 0


View Profile
July 05, 2014, 04:15:04 AM
 #207

I use multibit, makes life a lot easier. Bitcoin-Qt is a pain to add new wallets / prove keys without going through every single block which can take days if you're lucky that it doesn't crash. Hopefully multibit expands to other altcoins soon
ranochigo
Legendary
*
Online Online

Activity: 2968
Merit: 4177



View Profile
July 05, 2014, 09:49:29 AM
 #208

I use multibit, makes life a lot easier. Bitcoin-Qt is a pain to add new wallets / prove keys without going through every single block which can take days if you're lucky that it doesn't crash. Hopefully multibit expands to other altcoins soon
Even though multibit is a light client, it does not offer the full features bitcoin-qt offers. There are different pros and cons for each of them, if you are just a regular user, only sending and receiving coins, multibit is recommended. If you require more features, bitcoin-qt is better.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Vortex20000
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500

sucker got hacked and screwed --Toad


View Profile WWW
July 08, 2014, 01:39:57 PM
 #209

Once link.

blockchain.info

No fees, or so they claim. Completely online.

Posted From bitcointalk.org Android App

Eric2013
Member
**
Offline Offline

Activity: 102
Merit: 10


View Profile
July 08, 2014, 03:08:08 PM
 #210

well noted and thx
mikeza43
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
July 20, 2014, 05:00:03 PM
 #211

my blockchain is very slow too and use up alot of memory i want to know what its for tho  Undecided
ranochigo
Legendary
*
Online Online

Activity: 2968
Merit: 4177



View Profile
July 21, 2014, 09:15:54 AM
 #212

my blockchain is very slow too and use up alot of memory i want to know what its for tho  Undecided
Your bitcoin core will sync up to 20+GB of data. It will verify blocks and sync the blockchain. Since the blockchain have 20+GB, it will take sometime, depending on you and your peers internet speed. Your bitcoin directory will be filled with transactions from the past and after syncing, you can see the balance and use it.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Muhammed Zakir
Hero Member
*****
Offline Offline

Activity: 560
Merit: 506


I prefer Zakir over Muhammed when mentioning me!


View Profile WWW
July 21, 2014, 05:19:51 PM
 #213

If you have a good network speed or using seedbox, is it better to download Bootstrap.dat and copying it to BTC directory and syncing than syncing directly from network?
Kindly,
       MZ

AliceWonder
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
July 22, 2014, 01:09:56 AM
 #214

If you have a good network speed or using seedbox, is it better to download Bootstrap.dat and copying it to BTC directory and syncing than syncing directly from network?
Kindly,
       MZ

bootstrap.dat is the best way.

QuarkCoin - what I believe bitcoin was intended to be. On reddit: http://www.reddit.com/r/QuarkCoin/
cmoniz
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
July 25, 2014, 06:03:48 AM
 #215

What if blocks included, along with the list of new transactions, the hash of the unspent transactions database? (the state that the blockchain was in during the previous block)

This way, light clients could request the unspend transactions database from full clients.

eg.

Block A has hash ABC
balances at this block:
Bob: 1, Alice: 2, Charlie: 3

Block B has hash DEF
included in the block (as an optional parameter):
Block A's UTXO hash: B1A2C3

then, if a light client needs to spin up, it can just request the UTXO db from a few fat clients if they have it, validate it against the blockchain, and process the transactions from there.
howardb
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500


View Profile
July 30, 2014, 08:28:14 PM
 #216

What if blocks included, along with the list of new transactions, the hash of the unspent transactions database? (the state that the blockchain was in during the previous block)

This way, light clients could request the unspend transactions database from full clients.

eg.

Block A has hash ABC
balances at this block:
Bob: 1, Alice: 2, Charlie: 3

Block B has hash DEF
included in the block (as an optional parameter):
Block A's UTXO hash: B1A2C3

then, if a light client needs to spin up, it can just request the UTXO db from a few fat clients if they have it, validate it against the blockchain, and process the transactions from there.
I have to wonder if at some point in the future we are going to start running short of FAT clients to send requests to as their numbers diminish and consequently the load on them increases, itself causing people to switch. Perhaps the mining methodology needs to be extended to encourage people to serve the whole blockchain where possible.
griffga
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 04, 2014, 01:44:20 AM
 #217

If you have a good network speed or using seedbox, is it better to download Bootstrap.dat and copying it to BTC directory and syncing than syncing directly from network?
Kindly,
       MZ

bootstrap.dat is the best way.

What exactly does the bootstrap.dat file contain? Is it simply an archive of the blockchain itself?
Jazkal
Sr. Member
****
Offline Offline

Activity: 319
Merit: 250



View Profile
August 04, 2014, 03:30:43 AM
 #218

If you have a good network speed or using seedbox, is it better to download Bootstrap.dat and copying it to BTC directory and syncing than syncing directly from network?
Kindly,
       MZ

bootstrap.dat is the best way.

What exactly does the bootstrap.dat file contain? Is it simply an archive of the blockchain itself?

an image of the last  block I would think.  Has all the data all wrapped in one small package to actual size.
jgarzik
Legendary
*
Offline Offline

Activity: 1596
Merit: 1091


View Profile
August 04, 2014, 01:50:20 PM
 #219

What exactly does the bootstrap.dat file contain? Is it simply an archive of the blockchain itself?

bootstrap.dat contains all blocks.  See this thread to describe how to torrent and use it: https://bitcointalk.org/index.php?topic=145386.0


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

Activity: 560
Merit: 506


I prefer Zakir over Muhammed when mentioning me!


View Profile WWW
August 04, 2014, 02:00:13 PM
 #220

What exactly does the bootstrap.dat file contain? Is it simply an archive of the blockchain itself?

bootstrap.dat contains all blocks.  See this thread to describe how to torrent and use it: https://bitcointalk.org/index.php?topic=145386.0



Yes. The thread contains all info. In short, it contains Blockchain data - blocks.

Kindly,
       MZ

Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 18 19 20 21 22 23 24 25 »  All
  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!