比特币创世区块里藏着什么秘密?

比特币创世区块里藏着什么秘密?

sky 队长 船龄 8.8年 来源 blockindex.info
 47652  0

#创世块留言

这是广为流传的中本聪在创世块的coinbase写下“The Times 03/Jan/2009 Chancellor on brink of second bailout for banks” 这句话正是泰晤士报当天的头版文章标题,如下:

coinbase的值为

"coinbase":"04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73"

解码方法如下:

python shell下:

"04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73".decode('hex')'\x04\xff\xff\x00\x1d\x01\x04EThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks'

或者在shell下

->strings -n 20 blk00000.datEThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks

参考:

http://www.thetimes.co.uk/tto/business/industries/banking/article2160028.ece

https://en.bitcoin.it/wiki/Genesis_block

http://blockindex.info/btc/tx/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b

http://blockexplorer.com/rawblock/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

http://blockchain.info/tx/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b


#隐藏的bitcoin logo

以上图片隐藏在如下交易中:

http://blockindex.info/btc/tx/ceb1a7fb57ef8b75ac59b56dd859d5cb3ab5c31168aa55eb3819cd5ddbd3d806http://blockindex.info/btc/tx/9173744691ac25f3cd94f35d4fc0e0a2b9d1ab17b4fe562acc07660552f95518

解码方法如下:

ceb1a7fb57ef8b75ac59b56dd859d5cb3ab5c31168aa55eb3819cd5ddbd3d806 和9173744691ac25f3cd94f35d4fc0e0a2b9d1ab17b4fe562acc07660552f95518交易中所有vxout的scriptPubKey导出:

  1. bitcoind getrawtransaction ceb1a7fb57ef8b75ac59b56dd859d5cb3ab5c31168aa55eb3819cd5ddbd3d806 1

导出出所有vxout的scriptPubKey:

 "OP_DUP OP_HASH160 3d79626567696e206c696e653d3132382073697a OP_EQUALVERIFY OP_CHECKSIG" "OP_DUP OP_HASH160 653d38373736206e616d653d626974636f696e2e OP_EQUALVERIFY OP_CHECKSIG", ......
  1. 删除所有OP CODE,得到如下

    '3d79626567696e206c696e653d3132382073697a','653d38373736206e616d653d626974636f696e2e','6a70670d0a2902293d4a2a3a747073702a2b2b2b','2a8a2a8a2a2a290b2a926fa293902a2a77772a54',......
  2. 转换为hex

    '3d79626567696e206c696e653d3132382073697a'.decode(hex)
  3. 把结果按yenc解码:

    if c == '=' and esc != 1:    esc = 1    continuen = ord(c)if esc:    c2 = chr((n-42-64+256)%256)    esc = 0else:    c2 = chr((n-42+256)%256)

完整的python代码 https://gist.github.com/shirriff/7461227133c26645abdf

  python3 parseImageFromBlock.py

讨论见:

https://bitcointalk.org/index.php?topic=8114.0%3Ball

#bitcoin论文

在交易54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713 中隐藏着比特币的原始论文

解码方法同上一条:

  1. 把交易中所有vxout的scriptPubKey导出:
  2. 删除所有OP CODE,得到如下
  3. 转换为hex
  4. 把结果存为pdf

这里有完整的python代码

python3 parseImageFromBlock.py

论文在这里就不贴了, 你可以自己转换看看

#Email from Satoshi Nakamoto

在交易77822fd6663c665104119cb7635352756dfc50da76a92d417ec1a12c518fad69 中隐藏着一封中本聪的电子邮件

解码方法:

  1. 把交易中所有vxout的scriptPubKey导出,这个scriptPubKey比较特殊: scriptPubKey: OP_IF OP_INVALIDOPCODE 4effffffff 1443 bytes of data OP_ENDIF
  2. 删除OP CODE
  3. 转为hex

结果如下:

From a3a61fef43309b9fb23225df7910b03afc5465b9 Mon Sep 17 00:00:00 2001From: Satoshi Nakamoto Date: Mon, 12 Aug 2013 02:28:02 -0200Subject: [PATCH] Remove (SINGLE|DOUBLE)BYTEI removed this from Bitcoin in f1e1fb4bdef878c8fc1564fa418d44e7541a7e83in Sept 7 2010, almost three years ago. Be warned that I have notactually tested this patch.--- backends/bitcoind/deserialize.py |    8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)diff --git a/backends/bitcoind/deserialize.py b/backends/bitcoind/deserialize.pyindex 6620583..89b9b1b 100644--- a/backends/bitcoind/deserialize.py+++ b/backends/bitcoind/deserialize.py@@ -280,10 +280,8 @@ opcodes = Enumeration("Opcodes", [     "OP_WITHIN", "OP_RIPEMD160", "OP_SHA1", "OP_SHA256", "OP_HASH160",     "OP_HASH256", "OP_CODESEPARATOR", "OP_CHECKSIG", "OP_CHECKSIGVERIFY", "OP_CHECKMULTISIG",     "OP_CHECKMULTISIGVERIFY",-    ("OP_SINGLEBYTE_END", 0xF0),-    ("OP_DOUBLEBYTE_BEGIN", 0xF000),     "OP_PUBKEY", "OP_PUBKEYHASH",-    ("OP_INVALIDOPCODE", 0xFFFF),+    ("OP_INVALIDOPCODE", 0xFF), ])@@ -293,10 +291,6 @@ def script_GetOp(bytes):         vch = None         opcode = ord(bytes[i])         i += 1-        if opcode >= opcodes.OP_SINGLEBYTE_END and i < len(bytes):-            opcode <<= 8-            opcode |= ord(bytes[i])-            i += 1         if opcode <= opcodes.OP_PUSHDATA4:             nSize = opcode-- 1.7.9.4



  • 全部
  • 最佳
登录 账号发表你的看法,还没有账号?立即免费 注册
推荐教程
换一批