Transactions

沒有地址的 Coinbase 交易

  • April 21, 2022

我試圖使用 RPC 查看區塊鏈的開頭,看起來第一個 Coinbase 交易沒有vout地址。順便說一句,這實際上發生了很多。

$ bitcoin-cli getrawtransaction 0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098
01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000

$ bitcoin-cli decoderawtransaction 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000 true
{
 "txid": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
 "hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
 "version": 1,
 "size": 134,
 "vsize": 134,
 "weight": 536,
 "locktime": 0,
 "vin": [
   {
     "coinbase": "04ffff001d0104",
     "sequence": 4294967295
   }
 ],
 "vout": [
   {
     "value": 50.00000000,
     "n": 0,
     "scriptPubKey": {
       "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG",
       "hex": "410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac",
       "type": "pubkey"
     }
   }
 ]
}

當我查看任何比特幣瀏覽器時,它實際上顯示了一個地址:12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX https ://www.blockchain.com/btc/tx/0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098

對此有何解釋?

這種類型的輸出是 Pay-to-Pubkey (P2PK) 輸出。它沒有對應的地址,所以 bitcoind 沒有提供地址。

區塊瀏覽器通常會顯示這些類型輸出的地址,但這是不正確的。該地址實際上將引用與輸出中實際存在的腳本不同的腳本,儘管 P2PK 腳本中公鑰的私鑰所有者可以花費發送到區塊瀏覽器顯示的地址的硬幣。

引用自:https://bitcoin.stackexchange.com/questions/113394