Confusing output when partial signing multisig transaction #14823

issue tipu openend this issue on November 27, 2018
  1. tipu commented at 11:36 pm on November 27, 2018: none

    Unexpected output during multisig signing. See the following example when signing a 2/2 key.

    0bc signrawtransactionwithkey 0200000001b8a7873d892de2930cdb00a6c69dadbe8d553e2bef0688186a71009fd82062460100000000ffffffff028093dc140000000017a914a732060d1955ab93c50c1096597e2ea466b9937d8780d6e34c0000000017a9142d2aad185524b244ef2b2f6a0507d6f187d02fbe8700000000 '["cU3C1Uu4oN8ZPXrCz55GyjmrsaeoF8UhmBai2d9jzq9iw7ty9EMc"]' '[{"txid":"466220d89f00716a188806ef2b3e558dbead9dc6a600db0c93e22d893d87a7b8", "vout":1,"scriptPubKey":"a9142d2aad185524b244ef2b2f6a0507d6f187d02fbe87","redeemScript":"5221032559b7054ff5468aa9508579379b62c5f6b31145e5bfe743fc66c0ec72608dab21030eaf6ea71e09bd6f6b10a3ee42cc1a445d9020627a4569f17b7fbf1d5801959a52ae"}]'
    
     0{
     1  "hex": "0200000001b8a7873d892de2930cdb00a6c69dadbe8d553e2bef0688186a71009fd820624601000000920047304402202d3ccf2360f990235e2e0ce17f5f28f4313f413301869b554c4e79905de93508022009a4acd673571d7924e8c0cd192386972a72316e8195338ebb8577a2a2941ed70100475221032559b7054ff5468aa9508579379b62c5f6b31145e5bfe743fc66c0ec72608dab21030eaf6ea71e09bd6f6b10a3ee42cc1a445d9020627a4569f17b7fbf1d5801959a52aeffffffff028093dc140000000017a914a732060d1955ab93c50c1096597e2ea466b9937d8780d6e34c0000000017a9142d2aad185524b244ef2b2f6a0507d6f187d02fbe8700000000",
     2  "complete": false,
     3  "errors": [
     4    {
     5      "txid": "466220d89f00716a188806ef2b3e558dbead9dc6a600db0c93e22d893d87a7b8",
     6      "vout": 1,
     7      "witness": [
     8      ],
     9      "scriptSig": "0047304402202d3ccf2360f990235e2e0ce17f5f28f4313f413301869b554c4e79905de93508022009a4acd673571d7924e8c0cd192386972a72316e8195338ebb8577a2a2941ed70100475221032559b7054ff5468aa9508579379b62c5f6b31145e5bfe743fc66c0ec72608dab21030eaf6ea71e09bd6f6b10a3ee42cc1a445d9020627a4569f17b7fbf1d5801959a52ae",
    10      "sequence": 4294967295,
    11      "error": "Signature must be zero for failed CHECK(MULTI)SIG operation"
    12    }
    13  ]
    14}
    
    0bc signrawtransactionwithkey 0200000001b8a7873d892de2930cdb00a6c69dadbe8d553e2bef0688186a71009fd820624601000000920047304402202d3ccf2360f990235e2e0ce17f5f28f4313f413301869b554c4e79905de93508022009a4acd673571d7924e8c0cd192386972a72316e8195338ebb8577a2a2941ed70100475221032559b7054ff5468aa9508579379b62c5f6b31145e5bfe743fc66c0ec72608dab21030eaf6ea71e09bd6f6b10a3ee42cc1a445d9020627a4569f17b7fbf1d5801959a52aeffffffff028093dc140000000017a914a732060d1955ab93c50c1096597e2ea466b9937d8780d6e34c0000000017a9142d2aad185524b244ef2b2f6a0507d6f187d02fbe8700000000 '["cSB1o7v1QBZDHJropQqBYfuiUA4Js1o24uzkgB2vYeND1st5uGqV"]' 
    
    0{
    1  "hex": "0200000001b8a7873d892de2930cdb00a6c69dadbe8d553e2bef0688186a71009fd820624601000000d90047304402202d3ccf2360f990235e2e0ce17f5f28f4313f413301869b554c4e79905de93508022009a4acd673571d7924e8c0cd192386972a72316e8195338ebb8577a2a2941ed70147304402206fe3aa79e02894ec40d3f6e9df7d7056c5b50cd7a39e1cde3aa3dd097c76798f0220464cd0a39690cbf28687b3b695eb0dc59ca73aef624b16b9586ade31a0761b3101475221032559b7054ff5468aa9508579379b62c5f6b31145e5bfe743fc66c0ec72608dab21030eaf6ea71e09bd6f6b10a3ee42cc1a445d9020627a4569f17b7fbf1d5801959a52aeffffffff028093dc140000000017a914a732060d1955ab93c50c1096597e2ea466b9937d8780d6e34c0000000017a9142d2aad185524b244ef2b2f6a0507d6f187d02fbe8700000000",
    2  "complete": true
    3}
    

    When dealing with the RPC calls alone, it was difficult to realize that the partial signing was actually working. This is due to the this specific portion of the response:

    0  "errors": [
    1    {
    2      "txid": "466220d89f00716a188806ef2b3e558dbead9dc6a600db0c93e22d893d87a7b8",
    3      "vout": 1,
    4      "witness": [
    5      ],
    6      "scriptSig": "0047304402202d3ccf2360f990235e2e0ce17f5f28f4313f413301869b554c4e79905de93508022009a4acd673571d7924e8c0cd192386972a72316e8195338ebb8577a2a2941ed70100475221032559b7054ff5468aa9508579379b62c5f6b31145e5bfe743fc66c0ec72608dab21030eaf6ea71e09bd6f6b10a3ee42cc1a445d9020627a4569f17b7fbf1d5801959a52ae",
    7      "sequence": 4294967295,
    8      "error": "Signature must be zero for failed CHECK(MULTI)SIG operation"
    9    }
    

    Based on the RPC respons on here: https://bitcoin.org/en/developer-examples#p2sh-multisig

    I expected the successful partial signature to be as follows:

     0{
     1    "hex" : "010000000175e1769813db8418fea17576694af1ff31cb2b512\
     2             b7333e6eb42f030d0d7787200000000b5004830450221008d5e\
     3             c57d362ff6ef6602e4e756ef1bdeee12bd5c5c72697ef1455b3\
     4             79c90531002202ef3ea04dfbeda043395e5bc701e4878c15baa\
     5             b9c6ba5808eb3d04c91f641a0c014c69522103310188e911026\
     6             cf18c3ce274e0ebb5f95b007f230d8cb7d09879d96dbeab1aff\
     7             210243930746e6ed6552e03359db521b088134652905bd2d154\
     8             1fa9124303a41e95621029e03a901b85534ff1e92c43c74431f\
     9             7ce72046060fcf7a95c37e148f78c7725553aeffffffff01c0b\
    10             c973b000000001976a914b6f64f5bf3e38f25ead28817df7929\
    11             c06fe847ee88ac00000000",
    12    "complete" : false
    13}
    

    I’m using Bitcoin Core RPC client version v0.17.0

    I suspect the issue is related to this: #9988, however they’re using a different RPC call.

  2. fanquake closed this on Sep 11, 2019

  3. DrahtBot locked this on Dec 16, 2021
  4. knst referenced this in commit 46c2c0d796 on Mar 24, 2023
  5. knst referenced this in commit a2ce1e20c7 on Mar 29, 2023
  6. UdjinM6 referenced this in commit 993418041c on Apr 6, 2023


tipu


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me