Bitcoin Forum
June 19, 2024, 12:06:27 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Open Bootstrap.dat with VB.NET  (Read 754 times)
Zetler (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
April 21, 2014, 08:26:08 AM
 #1

I downloaded the torrent with the entire blockchain and tried to open bootstrap.dat.

With its 17GB it is obviously too large for most text editors, so I programmed a VB.NET app to do this.

Assuming encoding ISO-8859-1, I get this rather confusing line:
""ù¾´Ù                                     ;£íýz{²zÇ,>gvaÈÈŠQ2:Ÿ¸ªK^J)«_Iÿÿ ¬+|                                   ÿÿÿÿMÿÿ EThe Times 03/Jan/2009 Chancellor on brink of second bailout for banksÿÿÿÿ ò*   CAgŠý°þUH'gñ¦q0·\Ö¨(à9   ¦ybàêaÞ¶Iö¼?Lï8ÄóUåÁÞ\8M÷º WŠLp+kñ_¬    ù¾´Ù×      oâŒ""

Assuming UTF8 does not make much more sense either:
"����                                     ;���z{�z�,>gv�a�È�Q2:���K^J)�_I�� �+|                                   ����M�� EThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks���� �*   CAg����UH'g�q0�\֨(�9   �yb��a޶I��?L�8��U���\8M�� �W�Lp+k�_�    �����      o�"

Will it work if I change the encoding on this VB.NET code?
System.Text.Encoding.UTF8

Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
April 22, 2014, 12:19:26 AM
 #2

...the file is in a binary format. The small piece of text you see is the genesis block by Satoshi, he embedded it on purpose to make sure he did not "premine" a chain in secret, since it would have been impossible to predict the headline of The Times in advance.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
danneu
Newbie
*
Offline Offline

Activity: 32
Merit: 0



View Profile
April 22, 2014, 12:24:45 AM
 #3

View it in hexadecimal for a better representation of the data.

If bootstrap.dat is a concatenation of what you find in block.dat files, then the data is a repeating sequence of:

  • Magic bytes: uint32 little endian
  • Byte-count of the block: uint32 little endian
  • Block: BlockCodec
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!