Author

Topic: How to parse blocks (Read 676 times)

sr. member
Activity: 255
Merit: 250
May 02, 2013, 02:25:05 AM
#6
Thanks a lot guys.

Question: I thought the difficulty is also included in the blocks - but it seems not.

How can I calculate (historic) difficulty?

Reason I'm asking this: I wanna set up some charts for Alt-Coins.


edit: Found it myself: https://en.bitcoin.it/wiki/Difficulty#How_is_difficulty_stored_in_blocks.3F
legendary
Activity: 1974
Merit: 1030
April 30, 2013, 02:33:27 PM
#5
I haven't upgraded to 0.8 on my development box yet, so I haven't had a need to peer into the new block files.  Are they the same format as the old ones, just smaller, or did they get changed?

Same format.
kjj
legendary
Activity: 1302
Merit: 1026
April 30, 2013, 11:32:06 AM
#4
I haven't upgraded to 0.8 on my development box yet, so I haven't had a need to peer into the new block files.  Are they the same format as the old ones, just smaller, or did they get changed?
legendary
Activity: 3528
Merit: 4945
April 30, 2013, 11:11:11 AM
#3
Here's a good resource for understanding the basic structure of a block:

http://james.lab6.com/2012/01/12/bitcoin-285-bytes-that-changed-the-world/
sr. member
Activity: 247
Merit: 250
April 30, 2013, 08:51:26 AM
#2
If you can read C++, then you can probably just look at the bitcoin-qt source code...https://github.com/bitcoin/bitcoin

Otherwise the wiki may give you a better summary of how the block is parsed...https://en.bitcoin.it/wiki/Blocks

https://en.bitcoin.it/wiki/Bitcoind#Theory_of_Operation
sr. member
Activity: 255
Merit: 250
April 30, 2013, 07:52:01 AM
#1
Hi guys,

can you please point me to the right direction on how to parse blocks? Block format, what the blocks, chainstate, database directories are for. Stuff like that.

P.S.
I know how to read code (C, Java, ...).

Jump to: