"getblock blockhash 0" - Serialized Hex Block Data

This section describes how to get Serialized Hex Block Data.

If you want to study the data structure used in a Bitcoin block, you should get a copy of the serialized and hex-encoded data from a given Bitcoin block.

For example, here is how I got the serialized and hex-encoded data from test Bitcoin clock # 500:

C:\>\local\bitcoin-0.15.1\bin\bitcoin-cli -testnet getblockhash 500
00000000a2424460c992803ed44cfe0c0333e91af04fde9a6a97b468bf1b5f70

C:\>\local\bitcoin-0.15.1\bin\bitcoin-cli -testnet getblock
   00000000a2424460c992803ed44cfe0c0333e91af04fde9a6a97b468bf1b5f70 0

01000000272ecd270665dc39e924838516da62f8588270f1e37812aabdb1d48c000000001725
d4769aaca3cf86c5b0dd199bf93f2d16dbb13fbd4029633bdd1085283fdd13c94a4dffff001d
02f79a8a07010000000100000000000000000000000000000000000000000000000000000000
00000000ffffffff2e8df2f07d823540b28637aa1213984c50e101fa05b323c0f7cc3abf9b5d
77826a65082418520bf083345d6db36c65ffffffff01e0850a2a010000002321029f5fcb9ab3
f1514d54dc3afb9eb8bae104954109f4c63783372f58905af593f8ac000000000100000001f3
8ca301420a9d7b483fd435fa977044a2cd209535ca6c98e252a9aeaa068746000000006c4930
4602210098efd2b7a859e48b4e0ffe09734f0bc10ed177251aa19f1e32e5cca9eb28aa470221
0095604e030d0837b2c4ffe0e05b576d5ec3527ff03838b9001a0ce5aa4e91465701210360ee
e686423502e035b7193ff2295ce1b1af8c5af79f1d6c2c9eca1a41a58330ffffffff0217aada
1f010000001976a914a54487b586f59868b2553bf2dbe990130a88806188ac4d9f0e00000000
0017a914995ebf5d9e37056113bf56b5893b44af2a4b418f8700000000010000000258bd81fd
34d42c015ac22537440c49450453e8284b717667c418ed7dc3693579010000006c4930460221
00f487e0587d3cbab20f151801b35493be6f7722a9906b88e464541440f0e5456b022100a254
1b0ede9de1e453c98e56825179ea47d4f6a3b406db0b8f84b8a4caaafcf3012103223850b521
5f24bbf8159783918f70f7d5b13039bffb48dda6d048d1bac2bc59ffffffff5ec32b4e2bcd54
aaba906f0799e64c181d37d22439590671e1b23c0aae5d911c010000006a473044022006c185
fe3edf51798f0cf5aac7c3ce79b7025d7e5d07f36de236b6b88f9385ec02205e58ea566fa742
f7faa6a350e08ba144172db55caa7dd43fffb158e22d4ef4dd012102e110738e9b9bdd224db0
85cdb3425f71961e424b613edc7711ceb612aae6d01affffffff027e471100000000001976a9
14890d266a26875f8d496c5b54777ceae9fd56167188ace0a605000000000017a91409ed6172
53305fd33492b743c09d538902a0188b870000000001000000023f2dc10288706fe1c3116bec
01dc2a259bfc2802b60d9b13787195fa8205f0cf000000006b48304502203ef5c34af08cd286
5820757844ac079e081e7b41bf427ac896f41ab12a9f9857022100bd0914548145648ec538c0
88640228baaa983a7c78fbf49526c5c30358fe0f54012103420f2cb862c7a77d7b2376660573
eb6976f01f59222892dd16326ee7ef37fc5bffffffff3f4ba67c7517df51e39ee8da832ee176
e27f861fe013e4089e4dbcf609146639000000006a47304402201468bcfff3b1d8bdd0ba5fd9
4692c4dc7766411bdafe8d65b6e7a5be8f7efa8602207cdcbe3a107db271f24d7d8ac83a887e
f4a1b72c910cc9ea5627b4cf37e87bcf0121025f9a9951e2d2a3037c1af09d9789b84a5776c5
04cd5b59bccd469124eb59835fffffffff0249b71000000000001976a914ad7d7b9ac5260ad1
3fa55e06143283f5b36495f788ac5d700300000000001976a914bc0f9f5fc9dc55323d52a9e3
54b5fb67cecd389788ac0000000001000000014272f5692e836d9ac44a39f420ff84e169e599
dd8d4310b805c8b888c7a4b824000000006c493046022100dd60f3c74936fecf65642bfd7fbe
d6148327996ea3c5a052083bb0b0f1a1c02e022100f6e221b12dbfc46317a716c30dbdbf1e49
c96732a815a03e0ee7a0b3cd00fdc70121020f3661affe914966ce072f7eb3962a3d534546de
7b721cdd259df1f17e4a4078ffffffff020fecca1f010000001976a9142bd66240c232e8fe3e
41dab4e02f8b48cca6287588acb8fa0e000000000017a914d9f26cca817fa116dc76e1be7a17
067eb843625087000000000100000001c142078d793bb5b4aadba6009e2b142872b1ed3a7f0f
7336ebe0e38180d8d682000000006c4930460221008c17958cf5fd52151c0ab28d64a65dc88d
6ac30094b7a342794615cacf98a94b022100db62f7ad812984aab15c386fd70aeefaf09a48f0
ce7f6daf9bda76d200b231710121021ea1cc2b09ae07b98cc28a344ac60b8d264edbf6c6e5c4
51a0b337e8d3ca9aa7ffffffff02fd30c61f010000001976a91435957af4fa5b509bd0648d53
88246ce4b696b87988acc2f70300000000001976a914edb1dfaf6e0b39449da811275386edf2
eb54baba88ac000000000100000001daa0794753bd9309175d42d1042178c303b1a4c2c2ecf1
5caa9d813b7a7d40fc000000006b48304502206b492f48a2b8b9a6d0032f021d329e57012e20
5b6f55c93909caaf7e59c66941022100ff2e3a5940491d0c527b53989de0da5100cda1e90f5f
2429b6d6592e9b0d34c80121023374fcd24a709c4503f9a11f2f5bf24d8277b77a267ca76a50
aea21b88f236e4ffffffff02db60c11f010000001976a9149c4198b9e2c421a3fdff7b140c96
5967de9660a388acd20c04000000000017a91409ed617253305fd33492b743c09d538902a018
8b8700000000

See next tutorial on how to decode the serialized block data.

Last update: 2017.

Table of Contents

 About This Book

 Introduction of Bitcoin

 Bitcoin Blockchain

 Bitcoin Wallet

 Bitcoin Core

 Bitcoin Transaction

 Bitcoin-Qt - Bitcoin Core GUI

 Bitcoin Mining

 Bitcoin Consensus Rules

Bitcoin Block Data Structure

 Data Components of Bitcoin Block

 Data Properties of Bitcoin Block

 Merkle Root of Bitcoin Block

 Calculate Double-SHA256 Hash with Python

 Verify Merkle Root of 2 Transactions

 Verify Merkle Root of 7 Transactions

 Data Structure of Bitcoin Block

"getblock blockhash 0" - Serialized Hex Block Data

 Block Hash Calculation Algorithm

 Block Hash Calculation in Python

 Calculate Double-SHA256 Hash with Java

 Bitcoin Transaction Data Structure

 blockexplorer.com API

 Copay - Bitcoin Wallet

 References

 PDF Printing Version