P2sh
網路不接受使用 OP_CHECKSEQUENCEVERIFY 的交易
當我在下面發布測試網交易時,它似乎沒有被網路接受。
發布交易似乎可以正常工作,因為它返回了 txid,但交易不會出現在任何 blockexplorer 服務上,也不會被探勘。
$ bitcoin-cli sendrawtransaction 0200000001f4db00105cdc7cab7d26ae018154540faa2a20872a1e263c6948c5a4e44d060f00000000f947304402204c7cbcc610ac5ee744dc7de6fc31421217dbd066e41fd377dbe16dbd70372d3d02201e74b66967b44548c007a011d98bb42a9f22651392232b87a640dcf8ad55e1d20100004cad6352210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135210327f017c35a46b759536309e6de256ad44ad609c1c4aed0e2cdb82f62490f75f852ae6763a914a7ec62542b0d393d43442aadf8d55f7da1e303cb88210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135ac6755b275210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135ac68680500000002c28d0000000000001976a914d36d5a91d3f05b2c23cf4fdcac88e4f8b50cec9088ac00000000000000001e6a1cdbb957b39547c4b841700768d623a3f4c849743272bc7783855c9c4d00000000 d208b659eaca2640f732b07b11ea9800c1a0bb4ffdc03aaf82af76c1787570ac
這裡是解碼的交易。
$ bitcoin-cli decoderawtransaction 0200000001f4db00105cdc7cab7d26ae018154540faa2a20872a1e263c6948c5a4e44d060f00000000f947304402204c7cbcc610ac5ee744dc7de6fc31421217dbd066e41fd377dbe16dbd70372d3d02201e74b66967b44548c007a011d98bb42a9f22651392232b87a640dcf8ad55e1d20100004cad6352210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135210327f017c35a46b759536309e6de256ad44ad609c1c4aed0e2cdb82f62490f75f852ae6763a914a7ec62542b0d393d43442aadf8d55f7da1e303cb88210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135ac6755b275210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135ac68680500000002c28d0000000000001976a914d36d5a91d3f05b2c23cf4fdcac88e4f8b50cec9088ac00000000000000001e6a1cdbb957b39547c4b841700768d623a3f4c849743272bc7783855c9c4d00000000 { "txid": "d208b659eaca2640f732b07b11ea9800c1a0bb4ffdc03aaf82af76c1787570ac", "size": 373, "version": 2, "locktime": 0, "vin": [ { "txid": "0f064de4a4c548693c261e2a87202aaa0f54548101ae267dab7cdc5c1000dbf4", "vout": 0, "scriptSig": { "asm": "304402204c7cbcc610ac5ee744dc7de6fc31421217dbd066e41fd377dbe16dbd70372d3d02201e74b66967b44548c007a011d98bb42a9f22651392232b87a640dcf8ad55e1d2[ALL] 0 0 6352210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135210327f017c35a46b759536309e6de256ad44ad609c1c4aed0e2cdb82f62490f75f852ae6763a914a7ec62542b0d393d43442aadf8d55f7da1e303cb88210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135ac6755b275210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135ac6868", "hex": "47304402204c7cbcc610ac5ee744dc7de6fc31421217dbd066e41fd377dbe16dbd70372d3d02201e74b66967b44548c007a011d98bb42a9f22651392232b87a640dcf8ad55e1d20100004cad6352210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135210327f017c35a46b759536309e6de256ad44ad609c1c4aed0e2cdb82f62490f75f852ae6763a914a7ec62542b0d393d43442aadf8d55f7da1e303cb88210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135ac6755b275210399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135ac6868" }, "sequence": 5 } ], "vout": [ { "value": 0.00036290, "n": 0, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 d36d5a91d3f05b2c23cf4fdcac88e4f8b50cec90 OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914d36d5a91d3f05b2c23cf4fdcac88e4f8b50cec9088ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "mznssZhbYjU5GRNupZ455TKu2BYrkmfQHC" ] } }, { "value": 0.00000000, "n": 1, "scriptPubKey": { "asm": "OP_RETURN dbb957b39547c4b841700768d623a3f4c849743272bc7783855c9c4d", "hex": "6a1cdbb957b39547c4b841700768d623a3f4c849743272bc7783855c9c4d", "type": "nulldata" } } ] }
這裡是反彙編的 P2SH 腳本。
OP_IF OP_2 0399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135 0327f017c35a46b759536309e6de256ad44ad609c1c4aed0e2cdb82f62490f75f8 OP_2 OP_CHECKMULTISIG OP_ELSE OP_IF OP_HASH160 a7ec62542b0d393d43442aadf8d55f7da1e303cb OP_EQUALVERIFY 0399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135 OP_CHECKSIG OP_ELSE OP_5 OP_NOP3 OP_DROP 0399e3dde1d1853dbd99c81ba4f2c0cca351b3cceecce7cd0bd59acc5789672135 OP_CHECKSIG OP_ENDIF OP_ENDIF
編輯:它似乎在記憶體池中(至少在我這邊)
$ bitcoin-cli getrawmempool [ "d4147e3350c7135ea8988eaa350d4fec00980462aa2df504b7bf946a28d1f100", "2ecf4ebd5f850da38926e58673cec0b5ec87569acf6e1db888c42fbaeb7c430a", "f080088e292aedc954826ba6f9c0cbbbb00364305b61203e8720ae3c8cc3c30b", "b54d0c1ceaa851a165e6d8f298bcbdb2bcbd8001bb5fe743eb12de2d6335a113", "89e46f5baabbf7e60cb608ff2a82b822b575983997af979cc15efd3151d94021", "f097c66979654beea2cb11fe704a84f7abccb2ab8d33f40015c7a3c032845c28", "82c13c01af677325ee7f7ad74604a37deb75d31ba9749c9125b64b42e5905434", "68baab281fb0509c7e8badddf1300ad3e572054566c07c01fcf4598768d0a398", "d208b659eaca2640f732b07b11ea9800c1a0bb4ffdc03aaf82af76c1787570ac", "136b76344299ad409fbba3877ec409476ed71b243bf688c84b2cb56cf77f2db3" ]
這似乎是一個問題,因為沒有足夠的礦工是最新的。最終,交易成功了。
<https://test-insight.bitpay.com/tx/d208b659eaca2640f732b07b11ea9800c1a0bb4ffdc03aaf82af76c1787570ac>