Bitcoin Forum
May 14, 2024, 04:29:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the blockchain like ?  (Read 1072 times)
cyberguy (OP)
Jr. Member
*
Offline Offline

Activity: 34
Merit: 4


View Profile WWW
June 06, 2016, 06:23:29 AM
Merited by ABCbits (1)
 #1

please excuse me for the noob like question. But I am asking since I use Electrum and do not run bitcoin-core.

In what form does the blockchain exist on full nodes, is it as a single file or a collection of files ? If more than 1 file are they numbered in any way ?  I am almost certain it is not a single 60+ GB file, since all OSes may not support that.

Does the actual blockchain contain extra data besides the actual blocks (meta data for indexing etc.)?
1715660949
Hero Member
*
Offline Offline

Posts: 1715660949

View Profile Personal Message (Offline)

Ignore
1715660949
Reply with quote  #2

1715660949
Report to moderator
1715660949
Hero Member
*
Offline Offline

Posts: 1715660949

View Profile Personal Message (Offline)

Ignore
1715660949
Reply with quote  #2

1715660949
Report to moderator
1715660949
Hero Member
*
Offline Offline

Posts: 1715660949

View Profile Personal Message (Offline)

Ignore
1715660949
Reply with quote  #2

1715660949
Report to moderator
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6637


Just writing some code


View Profile WWW
June 06, 2016, 11:55:33 AM
 #2

For Bitcoin Core and its derivatives, the blockchain is stored as multiple files, around 130 Mb each. The blocks are stored on the disk in their serialized format. The extra data for each block are the 4 network magic bytes and a varint the indicates the block size in bytes. Those data files are append only. There are additional files which index the locations of each block as well as undo data for those indices because everything is append only.

cyberguy (OP)
Jr. Member
*
Offline Offline

Activity: 34
Merit: 4


View Profile WWW
June 07, 2016, 12:42:07 PM
 #3

For Bitcoin Core and its derivatives, the blockchain is stored as multiple files, around 130 Mb each. The blocks are stored on the disk in their serialized format. The extra data for each block are the 4 network magic bytes and a varint the indicates the block size in bytes. Those data files are append only. There are additional files which index the locations of each block as well as undo data for those indices because everything is append only.

Thanks, could you please guide me to some place where I can find some information regarding the content and structure of these files, how they are numbered, the default locations they are saved in (for Windows, Linux etc.) ?
Cent21
Hero Member
*****
Offline Offline

Activity: 1442
Merit: 578


View Profile
June 07, 2016, 12:57:39 PM
 #4

I am almost certain it is not a single 60+ GB file, since all OSes may not support that.

You are right when you write tha blockchain is not in a single file, as other have explain it is splitted in many smaller files.

You are wrong when you write that all OSes may not support them... in fact maximum file size depends by the type of filesystem that you use on your drives... and also the old implementation of NTFS filesystem (used since windows NT version) has a maximum file size of about 16TB.

Nowadays, on windows systems, is commonly in use NTFS5 which has a maximum file size of about 16 ExaBytes.

 Smiley
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6637


Just writing some code


View Profile WWW
June 07, 2016, 01:13:30 PM
 #5

For Bitcoin Core and its derivatives, the blockchain is stored as multiple files, around 130 Mb each. The blocks are stored on the disk in their serialized format. The extra data for each block are the 4 network magic bytes and a varint the indicates the block size in bytes. Those data files are append only. There are additional files which index the locations of each block as well as undo data for those indices because everything is append only.

Thanks, could you please guide me to some place where I can find some information regarding the content and structure of these files, how they are numbered, the default locations they are saved in (for Windows, Linux etc.) ?
You'll have to dig through the source code: https://github.com/bitcoin/bitcoin

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
June 07, 2016, 02:32:42 PM
 #6

I am almost certain it is not a single 60+ GB file, since all OSes may not support that.

You are right when you write tha blockchain is not in a single file, as other have explain it is splitted in many smaller files.

You are wrong when you write that all OSes may not support them... in fact maximum file size depends by the type of filesystem that you use on your drives... and also the old implementation of NTFS filesystem (used since windows NT version) has a maximum file size of about 16TB.

Nowadays, on windows systems, is commonly in use NTFS5 which has a maximum file size of about 16 ExaBytes.

 Smiley

I think you misunderstood the OP.

When he said:
since all OSes may not support that.

I'm pretty sure that he meant:

"That may not be supported by all Operating Systems".

Meaning that there are some Operating Systems that won't support sizes that large (60GB) for a single file.

I think in that case that the OP is NOT wrong.
cyberguy (OP)
Jr. Member
*
Offline Offline

Activity: 34
Merit: 4


View Profile WWW
June 07, 2016, 02:52:22 PM
 #7


I'm pretty sure that he meant:

"That may not be supported by all Operating Systems".

Meaning that there are some Operating Systems that won't support sizes that large (60GB) for a single file.


you are correct, this is what i meant by that statement.

However, on second thoughts, I realize that only filesystems such as FAT16 and FAT32 will not be able to handle that file size. (FAT16 cannot even have a partition larger than 2GB) Generally, even someone still running Windows XP (definitely not recommended) can be expected to have it installed on a NTFS drive.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
June 07, 2016, 03:00:19 PM
 #8

I still have an XP version running (although am pretty sure it is using NTFS) - the maximum size that I seem to see for any of the block files is 134 MB.

They are named as such:

blk00000.dat
blk00001.dat
blk00002.dat
...

The "reverse" files are named as such:

rev00000.dat
rev00001.dat
rev00002.dat
...

(and are much smaller)

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
cyberguy (OP)
Jr. Member
*
Offline Offline

Activity: 34
Merit: 4


View Profile WWW
June 07, 2016, 03:27:38 PM
 #9

I still have an XP version running (although am pretty sure it is using NTFS) - the maximum size that I seem to see for any of the block files is 134 MB.

They are named as such:

blk00000.dat
blk00001.dat
blk00002.dat
...

The "reverse" files are named as such:

rev00000.dat
rev00001.dat
rev00002.dat
...

(and are much smaller)


thanks for the response. Googling for the above file names took me to a reddit link mentioning an article "Bitcoin: 285 bytes that changed the world", which was published 4 years ago, and is no longer available. However, I found it in the internet archive and it contains exactly what I was looking for.

For those interested https://web.archive.org/web/20140213190023/http://james.lab6.com/2012/01/12/bitcoin-285-bytes-that-changed-the-world/
Jet Cash
Legendary
*
Offline Offline

Activity: 2716
Merit: 2457


https://JetCash.com


View Profile WWW
June 11, 2016, 06:19:09 AM
 #10

Don't forget that SegWit will add some extra files.

Offgrid campers allow you to enjoy life and preserve your health and wealth.
Save old Cars - my project to save old cars from scrapage schemes, and to reduce the sale of new cars.
My new Bitcoin transfer address is - bc1q9gtz8e40en6glgxwk4eujuau2fk5wxrprs6fys
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!