如何讀取一個區塊的交易?
給定這個範例塊(順便說一下,它是創世塊):
0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000
我按照此處所述將其拆分:
01000000 // Version 0000000000000000000000000000000000000000000000000000000000000000 // Hash Previous Block 3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a // Merkle Root 29ab5f49 // Time ffff001d // Difficulty 1dac2b7c // Nonce 01 // Number of Transactions Tx1: 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000
但是事務 Tx1(在這種情況下)如何可讀?顯然,它不是預設的英文明文。例如,我如何對其進行解碼,以便我辨識出中本聰在此交易 Tx1 中發送了 50 BTC 作為硬幣基礎交易?
交易與區塊一樣,採用序列化格式。格式說明可在bitcoin.org上找到
我為您準備了此資源,這可能有用:https ://bitfalls.com/2017/10/03/read-bitcoin-blockchain-data-blockexplorer/