比特幣 22.x + 不解碼多重簽名的地址
任何人都可以建議為什麼地址不會在新版本中解碼?
範例:比特幣核心 0.21
bitcoin-cli getrawtransaction 9297132b89461da9dee0364db49eeb1c32770550bc5b82e02f1cbaab01043aa3 1 { "txid": "9297132b89461da9dee0364db49eeb1c32770550bc5b82e02f1cbaab01043aa3", "hash": "9297132b89461da9dee0364db49eeb1c32770550bc5b82e02f1cbaab01043aa3", "version": 1, "size": 404, "vsize": 404, "weight": 1616, "locktime": 0, "vin": [ { "txid": "e5e4e758102d9d677e26fa1029a69e1a6dd1e4c60a89990c3c47c207b455fdde", "vout": 0, "scriptSig": { "asm": "3045022023ec9d65d61343eafba6498ed668d14a4f30507196eeda42789f9e1e5de471e80221008898d2243728f64e545b3fc13afaf9f3f54a7f1c8f9760708a4a8c7043901fbe[ALL] 04a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0", "hex": "483045022023ec9d65d61343eafba6498ed668d14a4f30507196eeda42789f9e1e5de471e80221008898d2243728f64e545b3fc13afaf9f3f54a7f1c8f9760708a4a8c7043901fbe014104a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0" }, "sequence": 4294967295 } ], "vout": [ { "value": 9.70342805, "n": 0, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 dcfdb039e694e96dc9f49098abf5abe838ea4a2f OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914dcfdb039e694e96dc9f49098abf5abe838ea4a2f88ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "1M9VZnGuuXBw4YUsgzMPwCNGgBBnsoEGLW" ] } }, { "value": 0.00005757, "n": 1, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 946cb2e08075bcbaf157e47bcb67eb2b2339d242 OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P" ] } }, { "value": 0.00005757, "n": 2, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 966acb4de317bc06c44106c3301229aba2b4ed69 OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914966acb4de317bc06c44106c3301229aba2b4ed6988ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "1EiLHxqVWZ8qPFcRJ4WpZk1HPbmy2PTMs8" ] } }, { "value": 0.00011514, "n": 3, "scriptPubKey": { "asm": "1 04a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0 021e7be74a6b018374c253d8a7c8530952fd8bed2169a56d6591c483c3b9916b02 2 OP_CHECKMULTISIG", "hex": "514104a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa021021e7be74a6b018374c253d8a7c8530952fd8bed2169a56d6591c483c3b9916b0252ae", "reqSigs": 1, "type": "multisig", "addresses": [ "1M9VZnGuuXBw4YUsgzMPwCNGgBBnsoEGLW", "1vAryhyeqrBkYBLcqGEUwPrRC4U4MfbNc" ] } } ], "hex": "0100000001defd55b407c2473c0c99890ac6e4d16d1a9ea62910fa267e679d2d1058e7e4e5000000008b483045022023ec9d65d61343eafba6498ed668d14a4f30507196eeda42789f9e1e5de471e80221008898d2243728f64e545b3fc13afaf9f3f54a7f1c8f9760708a4a8c7043901fbe014104a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0ffffffff049541d639000000001976a914dcfdb039e694e96dc9f49098abf5abe838ea4a2f88ac7d160000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac7d160000000000001976a914966acb4de317bc06c44106c3301229aba2b4ed6988acfa2c00000000000067514104a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa021021e7be74a6b018374c253d8a7c8530952fd8bed2169a56d6591c483c3b9916b0252ae00000000", "blockhash": "000000000000000007bd140bd5f9ec7d6195330b125c84ad24adb7f021012502", "confirmations": 410973, "time": 1409535793, "blocktime": 1409535793 }
比特幣核心 22.x+
{ "txid": "9297132b89461da9dee0364db49eeb1c32770550bc5b82e02f1cbaab01043aa3", "hash": "9297132b89461da9dee0364db49eeb1c32770550bc5b82e02f1cbaab01043aa3", "version": 1, "size": 404, "vsize": 404, "weight": 1616, "locktime": 0, "vin": [ { "txid": "e5e4e758102d9d677e26fa1029a69e1a6dd1e4c60a89990c3c47c207b455fdde", "vout": 0, "scriptSig": { "asm": "3045022023ec9d65d61343eafba6498ed668d14a4f30507196eeda42789f9e1e5de471e80221008898d2243728f64e545b3fc13afaf9f3f54a7f1c8f9760708a4a8c7043901fbe[ALL] 04a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0", "hex": "483045022023ec9d65d61343eafba6498ed668d14a4f30507196eeda42789f9e1e5de471e80221008898d2243728f64e545b3fc13afaf9f3f54a7f1c8f9760708a4a8c7043901fbe014104a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0" }, "sequence": 4294967295 } ], "vout": [ { "value": 9.70342805, "n": 0, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 dcfdb039e694e96dc9f49098abf5abe838ea4a2f OP_EQUALVERIFY OP_CHECKSIG", "desc": "addr(1M9VZnGuuXBw4YUsgzMPwCNGgBBnsoEGLW)#e82gnjrl", "hex": "76a914dcfdb039e694e96dc9f49098abf5abe838ea4a2f88ac", "address": "1M9VZnGuuXBw4YUsgzMPwCNGgBBnsoEGLW", "type": "pubkeyhash" } }, { "value": 0.00005757, "n": 1, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 946cb2e08075bcbaf157e47bcb67eb2b2339d242 OP_EQUALVERIFY OP_CHECKSIG", "desc": "addr(1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P)#03u9lduk", "hex": "76a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac", "address": "1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P", "type": "pubkeyhash" } }, { "value": 0.00005757, "n": 2, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 966acb4de317bc06c44106c3301229aba2b4ed69 OP_EQUALVERIFY OP_CHECKSIG", "desc": "addr(1EiLHxqVWZ8qPFcRJ4WpZk1HPbmy2PTMs8)#c68jlngz", "hex": "76a914966acb4de317bc06c44106c3301229aba2b4ed6988ac", "address": "1EiLHxqVWZ8qPFcRJ4WpZk1HPbmy2PTMs8", "type": "pubkeyhash" } }, { "value": 0.00011514, "n": 3, "scriptPubKey": { "asm": "1 04a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0 021e7be74a6b018374c253d8a7c8530952fd8bed2169a56d6591c483c3b9916b02 2 OP_CHECKMULTISIG", "desc": "multi(1,04a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0,021e7be74a6b018374c253d8a7c8530952fd8bed2169a56d6591c483c3b9916b02)#vp945myn", "hex": "514104a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa021021e7be74a6b018374c253d8a7c8530952fd8bed2169a56d6591c483c3b9916b0252ae", "type": "multisig" } } ], "hex": "0100000001defd55b407c2473c0c99890ac6e4d16d1a9ea62910fa267e679d2d1058e7e4e5000000008b483045022023ec9d65d61343eafba6498ed668d14a4f30507196eeda42789f9e1e5de471e80221008898d2243728f64e545b3fc13afaf9f3f54a7f1c8f9760708a4a8c7043901fbe014104a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa0ffffffff049541d639000000001976a914dcfdb039e694e96dc9f49098abf5abe838ea4a2f88ac7d160000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac7d160000000000001976a914966acb4de317bc06c44106c3301229aba2b4ed6988acfa2c00000000000067514104a2d908b30291114a6cc781cb7caca48393bae2faef19189b3262ae9e957204272ff30528a289146141e350869d8b7386acfd6cf20e01e4ad38ab87bf542e2aa021021e7be74a6b018374c253d8a7c8530952fd8bed2169a56d6591c483c3b9916b0252ae00000000", "blockhash": "000000000000000007bd140bd5f9ec7d6195330b125c84ad24adb7f021012502", "confirmations": 410994, "time": 1409535793, "blocktime": 1409535793 }
正如我們所見,沒有“地址”:
$$ “1M9VZnGuuXBw4YUsgzMPwCNGgBBnsoEGLW”, “1vAryhyeqrBkYBLcqGEUwPrRC4U4MfbNc” $$在票: 3 為什麼腳本不解碼?
這在22.0 發行說明中提到:
以下 RPC:
gettxout
、getrawtransaction
、decoderawtransaction
、decodescript
、gettransaction
和 REST 端點:/rest/tx
、/rest/getutxos
、/rest/block
已棄用以下欄位(預設情況下不再在響應中返回):addresses
、reqSigs
。-deprecatedrpc=addresses
必須傳遞標誌才能使這些欄位包含在 RPC 響應中。此標誌/選項僅適用於此主要版本,之後將完全刪除棄用。請注意,這些欄位是scriptPubKey
RPC 響應中返回的對象的屬性。但是,在decodescript
這些欄位的響應中是頂級屬性,並且作為 scriptPubKey 對象的屬性再次包含在內。(#20286)原因很簡單,這些領域是荒謬和誤導的。輸出最多只有一個地址。RPC 輸出的日期是從地址和密鑰標識符混為一談的時候開始的——這是一個歷史錯誤。
"address"
在現代解釋下,新欄位報告地址。它在裸多簽輸出的情況下有所不同。這些輸出現在很少見,更重要的是根本沒有對應的地址。舊"addresses"
欄位中報告的值不是此輸出的地址;它們是可能的 P2PKH 地址,用於發送到該多重簽名輸出中的各個公鑰。但是這些與實際輸出幾乎沒有任何關係,並且使人們誤以為例如可以單獨發送給這些(通常情況並非如此)。