Author

Topic: New Bitcoin Block Format (Read 515 times)

legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
December 03, 2017, 12:31:26 PM
#7
=======Block Header=======
00000020 version
a15e218f5f158a31053ea101b917a6113c807f6bcdc85a000000000000000000 previous block header hash
cc7cf9eab23c2eae050377375666cd7862c1dfeb81abd3198c3a3f8e045d9148 merkle root hash
4a39225a time = 1512192330 = Saturday, December 2, 2017 5:25:30 AM
f6d00018 nBits = 402706678
659e5e8a nonce = 2321456741
=====================

01 tx count = 1 (aka Coinbase transaction)

=======Transactions in the block=======
01000000 version
01 tx_in count
0000000000000000000000000000000000000000000000000000000000000000 previous_output
ffffffff index for coinbase tx is 0xffffffff
64 script bytes = 100
03009607 op_3 (bytes in height) + height 497152
2cfabe6d6d08d1c2f6d904f4e1cd10c6558f8e5aed5d6a89c43bb22862464ebb819dd8813404000 000f09f909f104d696e6564206279206a6f73656d73720000000000000000000000000000000000 0000000000000000000000000000000000 arbitrary coinbase script
7f060000 sequence = 1663
01 tx_out count
807c814a00000000 amount = 1250000000
19 76 a9 14 c825a1ecf2a6830c4401620c3a16f1995057c2ab 88 ac P2PKH script
efebcf38 Lock time = 953150447 = Wednesday, March 15, 2000 8:00:47 PM

Note: The hashes are in internal byte order; the other values are all in little-endian order.
Read more: https://bitcoin.org/en/developer-reference#block-chain
newbie
Activity: 6
Merit: 0
December 03, 2017, 11:43:51 AM
#6
What’s the best resource to see the actual bitcoin block in it’s raw readable format?

For example, if I want to see the actual bitcoin block data?

As long as you're not doing anything that requires trust (in which case, you should use Core), you can just go to:

Code:
https://blockexplorer.com/api/rawblock/

Now when I do this

https://blockexplorer.com/api/rawblock/000000000000000000a7b4999c723ed9f308425708577c76827ade51062e135a

I get this

{"rawblock":"00000020a15e218f5f158a31053ea101b917a6113c807f6bcdc85a000000000000000000cc7cf9e ab23c2eae050377375666cd7862c1dfeb81abd3198c3a3f8e045d91484a39225af6d00018659e5e 8a0101000000010000000000000000000000000000000000000000000000000000000000000000f fffffff64030096072cfabe6d6d08d1c2f6d904f4e1cd10c6558f8e5aed5d6a89c43bb22862464e bb819dd8813404000000f09f909f104d696e6564206279206a6f73656d737200000000000000000 0000000000000000000000000000000000000000000000000007f06000001807c814a0000000019 76a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88acefebcf38"}

But trying to decode that yields gibberish.

Suggestions?

member
Activity: 98
Merit: 26
December 02, 2017, 02:51:37 PM
#5
What’s the best resource to see the actual bitcoin block in it’s raw readable format?

For example, if I want to see the actual bitcoin block data?

As long as you're not doing anything that requires trust (in which case, you should use Core), you can just go to:

Code:
https://blockexplorer.com/api/rawblock/
staff
Activity: 3458
Merit: 6793
Just writing some code
December 02, 2017, 01:12:26 PM
#4
Download the block chain with Bitcoin Core and use a hex editor to look in the files. Or is that too low a level?
Or you could use the getblock command to get the block as a hex string or decoded in JSON.
jr. member
Activity: 42
Merit: 2
December 02, 2017, 08:30:02 AM
#3
What’s the best resource to see the actual bitcoin block in it’s raw readable format?

For example, if I want to see the actual bitcoin block data?

The best resource to see the actual bitcoin block in its raw readable format is the hex Editor.

After you have gotten the block hex (the raw data for the block itself), you can then make it a file by putting the hex into a hex editor or better still you can save the hex as a string in a text file.
legendary
Activity: 4214
Merit: 1313
December 02, 2017, 07:09:26 AM
#2
What’s the best resource to see the actual bitcoin block in it’s raw readable format?

For example, if I want to see the actual bitcoin block data?

Download the block chain with Bitcoin Core and use a hex editor to look in the files. Or is that too low a level?
newbie
Activity: 6
Merit: 0
December 02, 2017, 05:33:12 AM
#1
What’s the best resource to see the actual bitcoin block in it’s raw readable format?

For example, if I want to see the actual bitcoin block data?
Jump to: