Skip to content

Instantly share code, notes, and snippets.

@qikcoin
Last active August 29, 2015 13:58
Show Gist options
  • Save qikcoin/10014810 to your computer and use it in GitHub Desktop.
Save qikcoin/10014810 to your computer and use it in GitHub Desktop.
http://blockr.io/block/info/210965
blk0003.dat
from:
http://2.bp.blogspot.com/-DaJcdsyqQSs/UsiTXNHP-0I/AAAAAAAATC0/kiFRowh-J18/s1600/blockchain.png
http://codesuppository.blogspot.com/2014/01/how-to-parse-bitcoin-blockchain.html
http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html
f9beb4d9 uint32_t:magicID:4 bytes
890d0000 (3465) uint32_t:headerLength:4 Bytes
01000000 uint32_t:versionNumber:4 bytes
2ccee04b90e68a48 uint8_t[32]:SHA256 hash of previous block
af6e11e3bc41cf0d
40bd61a755f5c93b
3b02000000000000
04d36e29c0b4e822 uint8_t[32] MerkleRoot 32 byte hash
2868e8cfba99bb38
300aac179019aa35
bc13e45b7d653812
6d1bbf50 uint32_t:timeStamp:The creation time of block
(1354701677)
Wed 05 Dec 2012 05:01:17 AM EST
eae0041a uint32_t:bits:Target difficulty
0f93b760 uint32_t:nonce:Randon Nmumber
09 Variable Length Integer:Transaction Count:1,2,5 or 9
For Each Transaction
01000000 uint32_t:transactionVersionNumber:
Expected to be 1 but in rare cases is garbage
01 Variable Lenght Integer:InputCount:
The number of Inputs in this transaction
For Each Output
0000000000000000 unint8_t[32]:transaction hash,
0000000000000000 each input refers to an output in a previous transaction
0000000000000000
0000000000000000
ffffffff uint32_t:transactionIndex:index
refers to an output in the previous transaction
0f (15) Variable Length Integer:scriptLength:
The length of the script byte data following
04471bbf50026405 uint8_t[scritptLength]:Raw byte code data for the input script.
062f503253482f (GPd/P2SH/)
ffffffff unint32_t:sequenceNumber:Always expected to be 0xFFFFFFFF
01 Variable Length Integer:outputCount:
The number of outputs in the transaction
For each output in the transaction
8013099500000000 uint64_t:Value:The value of the output in
2500400000 'Satoshis' one hundred millionths of a bitcoin
23 Variable Length Integer:outputScriptLength:
The length of the script byte data
2103165b7b0326ca uint8_t[outputScriptLength]:
ebdabff28073f20b Will contain the public Key address of this output.
9ba9adf943bfcc85
ec566c3d48fafdb5
87
d3
ac
00000000 uint32_t:transactionLockTime:currently always set to zero
currently always set to zero
01000000 transactionVersionNumber
01 inputCount
93013a02630d51c6 transaction hash
f6b93dd7d115fcfa
9956e26eb7a363bb
b91d489aa1ec6f39
01000000 Tranaction Index
6a (106) Script Size
47304402207a715f Script
d454a96cc19ef48b
e5292801b199763a
290365ff9f393dd8
75ccd7300902206c
40f1e3f71f0a08ab
034277bbb9510408
e4845de8b4fda7ed
48e919065dbd6101
210264e74d7465ce
bd7dda17de8d7266
e138
ffffffff sequenceNumber
02 outputCount
e00fdfe801000000 value
19 outputScriptLength
76a914f3ec7b6417 Script
53f974bb89587a13
91fed70376618888
ac
801ec31100000000 value
19 outputScriptLength
76a9141db4f7c8d2 Script
6210e364ecd14ae6
6fd03cb9e8021a88
ac
00000000 Transaction Lock Time
01000000 transactionVersionNumber
03 inputCount
5a0dbdeb704dfbee transaction hash
c64335a0c4458534
b97798718239bceb
e40f083073a27384
00000000 transactionIndex
8b (139) scriptLength
4830450220623b71 Script
76efa3cd003c8bf8
c190341e4c66b6f1
a7ba0a58e1eab216
2976438218022100
d2470a3c5f32984d
ad178f8f3159be30
6c89a71d005fa11b
28839941b69fe9a9
014104a29b3407a9
e785b68cd87c15b2
d4bc2c7fbbec3e14
bef30741f4851f77
463557562f7f0fc8
243a8498cfe0d9ae
ac2cbed57041e0e3
e42eedd2d370678e
2d3942
ffffffff sequenceNumber
2a65505a31122ad3 transaction hash
9ad8ff599a5f5a44
240c6d51865dc65d
6112a6c7963d80de
00000000 transactionIndex
8b (139) Script Size
4830450220380822 Script
f786c2bedf2e172a
9a478893d9fe4dd6
6b3b377ad8e1e492
102f39cc1b022100
cbb2501bb9715955
3cd2964c18ae8fb9
64713fc01d5ef9dc
94e8ad1847aef96b
01410425e2081410
cc3af6a5c307fca8
0e41a3c0b7ee1043
0739da41c1ad6bcc
d4df5c07bb4c92b7
93f874b6eae9c421
7c113e1de840b793
f6d481baa8b998c6
1cd284
ffffffff sequenceNumber
090fa7c7434cfa48 transaction hash
306a22fdf2db0ec1
11d6b64366e1989e
0877fa0b2fdcd8b6
06000000 transactionIndex
8b (139) scriptLength
4830450220252eab script
267e366cd47926c8
1043cd199e7f66ec
34adcc7872d77d0d
2251fbec9a022100
ebc424c641056f80
6650011f4a29de3b
c56393547a62f584
2c1bacb704575484
01410418ddfed3cb
5340a7f4be65b111
5ffdee0c742e0e0b
eac12ebb8add0d7d
7c003fb2a4c8b028
d081c32b4cecd139
9dc5cc6a5846802c
6f6a9f55365199d7
2db74e
ffffffff sequenceNumber
02 outputCount
603f113600000000 value
19 (25) scriptLength
76a914cc90fa85da script
8aa971273f06900e
1f6d2f1d5228a388
ac
99f926fb00000000 value
10 (25) outputScriptLength
76a9147181faa1b6 script
ddc3fdece60f1772
be08c2fae23c1788
ac
00000000 transactionLockTime
(to be continued)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment