Transactions

ScriptPubkey 中的地址欄位

  • May 11, 2018
"txid": "055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9",
"hash": "055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9",
"version": 1,
"size": 433,
"vsize": 433,
"locktime": 0,
"vin": [
   {
       "txid": "b187426f2fdd5a7ac2f49d822f68e07f48486ee53a8a45de2494f12acb37a0d8",
       "vout": 3,
       "scriptSig": {
           "asm": "3046022100d78c31a20fa11533475be893b229eb4d252e600dcc2a0735d360c541b6aec813022100e3eaa72c915ef47d94ccbd18c2ba6d9ae5b98be6e9fbf968d4bbbb003e06d687[ALL] 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc",
           "hex": "493046022100d78c31a20fa11533475be893b229eb4d252e600dcc2a0735d360c541b6aec813022100e3eaa72c915ef47d94ccbd18c2ba6d9ae5b98be6e9fbf968d4bbbb003e06d6870121030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc"
       },
       "sequence": 4294967295
   }
],
"vout": [
   {
       "value": 0.00010860,
       "n": 0,
       "scriptPubKey": {
           "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 20434e545250525459000000140001a9e0e85838b5000000174876e800010053b6 2 OP_CHECKMULTISIG",
           "hex": "5121030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc2120434e545250525459000000140001a9e0e85838b5000000174876e800010053b652ae",
           "reqSigs": 1,
           "type": "multisig",
           "addresses": [
               "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao"
           ]
       }
   },
   {
       "value": 0.00010860,
       "n": 1,
       "scriptPubKey": {
           "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 20a3c3000000000000000000000000000000000000000000000000000000000000 2 OP_CHECKMULTISIG",
           "hex": "5121030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc2120a3c300000000000000000000000000000000000000000000000000000000000052ae",
           "reqSigs": 1,
           "type": "multisig",
           "addresses": [
               "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao"
           ]
       }
   },
   {
       "value": 0.00010860,
       "n": 2,
       "scriptPubKey": {
           "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 100000000000000000000000000000000000000000000000000000000000000000 2 OP_CHECKMULTISIG",
           "hex": "5121030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc2110000000000000000000000000000000000000000000000000000000000000000052ae",
           "reqSigs": 1,
           "type": "multisig",
           "addresses": [
               "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao"
           ]
       }
   },
   {
       "value": 0.01061564,
       "n": 3,
       "scriptPubKey": {
           "asm": "OP_DUP OP_HASH160 a2f2d251cc06ec1e789800127e3fa6ed9e515651 OP_EQUALVERIFY OP_CHECKSIG",
           "hex": "76a914a2f2d251cc06ec1e789800127e3fa6ed9e51565188ac",
           "reqSigs": 1,
           "type": "pubkeyhash",
           "addresses": [
               "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao"
           ]
       }
   }
]

在上述交易中,每個 scriptpubkey 都有addresses數組,並且有 1 個地址。public key我猜這個地址是從of派生的asm。在這個例子中,每個asm人都有 2 個公鑰。所以地址數組應該包含2個地址。但它只有一個。有人可以解釋一下嗎?

看看<https://blockchain.info/tx/055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9?show_adv=true>

在頁面底部,您可以看到“反彙編”的輸出腳本。是的,輸出 0、1 和 2 的形式為 ,1 pushdata33 pushdata33 2 CHECKMULTISIG因此這些輸出是 1-of-2 multisig 輸出。但你應該看得更深!公鑰的壓縮形式為 33 字節長,必須以0203以十六進製表示形式開頭。你在那個頁面上看到了什麼?線條

20434e545250525459000000140001a9e0e85838b5000000174876e800010053b6
20a3c3000000000000000000000000000000000000000000000000000000000000
100000000000000000000000000000000000000000000000000000000000000000

不要以02或開頭,03因此它們不是公鑰。它可能是一些垃圾或另一個協議層,如交易對手。我不知道。

現代比特幣核心客戶端不會嘗試將這些字節塊轉換為公鑰,也不會嘗試創建人類可讀的地址。1FrbMcddiM1v3HMpUqygjZYCamBykWCWao因此,您在控制台中只看到一個地址。這不是錯誤,這是一個功能。

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