Post
Topic
Board Armory
Re: Can Armory multisig lockbox have more than one funding address?
by
idoB
on 11/09/2018, 06:30:06 UTC
Hi goatpig,

So here's a lockbox with apparently TWO funding addresses, but no way that I found to spend from:

The lockbox is 2 of 2 and is here:

Code:
=====LOCKBOX-zehSFwBp===========================================
AQAAAPm+tNneKj1ZAAAAAAROJkMxAAICTwEAAAD5vrTZQQQ7ZuNIXEWYAWzg79Xc
dqAQ5RPm+BwhLBM3IUwx3v9gZRnjEm16UUhHL9MI1ocF9sJ7gVRVDAZwIDnxQu9s
+9zjAUMAAABPAQAAAPm+tNlBBF9UhplhvcGOYakWoU7cir7Nypkzwmmxl4dBc/NP
qkWD7xPQfVIdH40Nu2J8nz2NabGLnoLP5SgJeI2XETJ+s8oBTgAAAA==
================================================================

When first created, it generates the following funding address:
Code:
32xhZESpnLHGqCW24Suy5aH1ysouTmoFXf
Lets call it 32x for short

However this address:
Code:
324XvFLqfjvseFVcdzr3Y1GgNAiCMGQFwf
(lets call it 324)
Also belongs to the lockbox, according to Armory GUI.
Proof: When 324 address is loaded as a recipient on the 'Send Bitcoin' dialog, Armory immediately recognizes it as belonging to the lockbox.

Looking at 32x on the blockchain, it went through a few transaction and emptied into 324 eventually, same lockbox.
The last transaction ID (needed for the spending script) is:
Code:
f24550eaec58ed47b6db186f6f8e7a70b4dce5fc50668d174a0f063ac9a30ecb
Now the plot thickens:

Trying to spend from the lockbox Armory displays different issues (depending on version), two of which I reported in an earlier thread. In what follows I'm referring to version 0.96.3.99. 0.96.4 has a gui bug.

1. Using 0.96.3.99 (991, 992 are identical) - Trying to spend anything less than max spendable and clicking continue - GUI doesn't respond and log has the following error:
Code:
  File "ui\TxFrames.pyc", line 897, in createTxAndBroadcast
  File "ui\TxFrames.pyc", line 772, in validateInputsGetUSTX
  File "ui\TxFrames.pyc", line 1048, in determineChangeScript
AttributeError: 'MultiSigLockbox' object has no attribute 'getChangeScript'

2. Using 0.96.3.99 (991, 992 are identical) - Trying to spend the max BTC (checking MAX checkbox), Review and Sign dialog comes up with thw to parties 'Sign' button next to the green keyholes BUT:
When Party1 clicks 'Sign', Party2 gets a green Checkmark and Party1 'Sign' Button is visible. This is symmetric for Party2. The end result is that Armory doesn't create a broadcasting transaction even though both Private keys are present for signing.

3. Trying to do the legwork for Armory using Bitcoin console I was able to:
    a. recreate the lockbox and redeem script - bitcoind gave 32x as the funding address, as expected. Note: since I'm using the latest version, I had to insert: deprecatedrpc=createmultisig in bitcoin.conf in order to create the lockbox from public keys.

The command I used to create the lockbox:
Code:
createmultisig 2 "[\"043b66e3485c4598016ce0efd5dc76a010e513e6f81c212c1337214c31deff606519e3126d7a5148472fd308d68705f6c27b8154550c06702039f142ef6cfbdce3\",\"045f54869961bdc18e61a916a14edc8abecdca9933c269b197874173f34faa4583ef13d07d521d1f8d0dbb627c9f3d8d69b18b9e82cfe52809788d9711327eb3ca\"]"

with the following funding address (32x) and redeem script:
Code:
{
  "address": "32xhZESpnLHGqCW24Suy5aH1ysouTmoFXf",
  "redeemScript": "5241043b66e3485c4598016ce0efd5dc76a010e513e6f81c212c1337214c31deff606519e3126d7a5148472fd308d68705f6c27b8154550c06702039f142ef6cfbdce341045f54869961bdc18e61a916a14edc8abecdca9933c269b197874173f34faa4583ef13d07d521d1f8d0dbb627c9f3d8d69b18b9e82cfe52809788d9711327eb3ca52ae"
}


   b. Next, I got the data for the last funding transaction of the lockbox using:
Code:
getrawtransaction  f24550eaec58ed47b6db186f6f8e7a70b4dce5fc50668d174a0f063ac9a30ecb 1

This generated the data from the blockchain:
Code:
{
  "txid": "f24550eaec58ed47b6db186f6f8e7a70b4dce5fc50668d174a0f063ac9a30ecb",
  "hash": "b2726bfdd3f0dd145ec48e7851ecf8deb08d66727db5664549242e9fb5579ea6",
  "version": 1,
  "size": 216,
  "vsize": 134,
  "locktime": 503335,
  "vin": [
    {
      "txid": "b014d31f214acb421c86c1cb1181b04dea8629b0ca769d96071cac3e9e6a7f8e",
      "vout": 0,
      "scriptSig": {
        "asm": "00145b95f1f9c9959114541b8f586972d44a54cdd581",
        "hex": "1600145b95f1f9c9959114541b8f586972d44a54cdd581"
      },
      "txinwitness": [
        "3045022100f9e8dbea1e192b0e118839b3b3ff8b44595db1a4257455dff15dcbd9ca009a36022003affcec437c3a9e4b237f52591057aa2b02b563b97cc4d69c5c29964bb646fc01",
        "02cab285794aa129801d1156fb09171bdd67d604a2820ccc0ca110213b23717d8f"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 1.44737527,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 0411c60ff8322e9f91c10dd02d0f1ad9a7cc591a OP_EQUAL",
        "hex": "a9140411c60ff8322e9f91c10dd02d0f1ad9a7cc591a87",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "324XvFLqfjvseFVcdzr3Y1GgNAiCMGQFwf"
        ]
      }
    }
  ],
  "hex": "010000000001018e7f6a9e3eac1c07969d76cab02986ea4db08111cbc1861c42cb4a211fd314b000000000171600145b95f1f9c9959114541b8f586972d44a54cdd581fdffffff01f784a0080000000017a9140411c60ff8322e9f91c10dd02d0f1ad9a7cc591a8702483045022100f9e8dbea1e192b0e118839b3b3ff8b44595db1a4257455dff15dcbd9ca009a36022003affcec437c3a9e4b237f52591057aa2b02b563b97cc4d69c5c29964bb646fc012102cab285794aa129801d1156fb09171bdd67d604a2820ccc0ca110213b23717d8f27ae0700",
  "blockhash": "00000000000000000061f5cc49d2fece4f2905f91429facfdeaa0b7ef5a08823",
  "confirmations": 37509,
  "time": 1515501955,
  "blocktime": 1515501955
}

   c. Here's where I got to another deadend: I can't write a valid createrawtransaction command (ANY help would be appreciated):
I used the above data (from vout section):

txid: "f24550eaec58ed47b6db186f6f8e7a70b4dce5fc50668d174a0f063ac9a30ecb"
vout: 1
scriptpubkey(hex):"a9140411c60ff8322e9f91c10dd02d0f1ad9a7cc591a87",
redeemscript: From above
a spending address: “3JacffNfngThdBdCDMjVEz3axNz31WNKr7
and full amount from the lockbox: 144731000

This is what I sent:
Code:
createrawtransaction "[{\"txid\”:\”f24550eaec58ed47b6db186f6f8e7a70b4dce5fc50668d174a0f063ac9a30ecb\",\"vout\”:1,\"scriptPubKey\”:\”a9140411c60ff8322e9f91c10dd02d0f1ad9a7cc591a87\",\"redeemScript\”:\”5241043b66e3485c4598016ce0efd5dc76a010e513e6f81c212c1337214c31deff606519e3126d7a5148472fd308d68705f6c27b8154550c06702039f142ef6cfbdce341045f54869961bdc18e61a916a14edc8abecdca9933c269b197874173f34faa4583ef13d07d521d1f8d0dbb627c9f3d8d69b18b9e82cfe52809788d9711327eb3ca52ae\"}]" "{\“3JacffNfngThdBdCDMjVEz3axNz31WNKr7\”:144731000}"

But apperantly, bitcoind couldn't parse it:

Error: Error parsing JSON:[{"txid\”:\”f24550eaec58ed47b6db186f6f8e7a70b4dce5fc50668d174a0f063ac9a30ecb","vout\”:1,"scriptPubKey\”:\”a9140411c60ff8322e9f91c10dd02d0f1ad9a7cc591a87","redeemScript\”:\”5241043b66e3485c4598016ce0efd5dc76a010e513e6f81c212c1337214c31deff606519e3126d7a5148472fd308d68705f6c27b8154550c06702039f142ef6cfbdce341045f54869961bdc18e61a916a14edc8abecdca9933c269b197874173f34faa4583ef13d07d521d1f8d0dbb627c9f3d8d69b18b9e82cfe52809788d9711327eb3ca52ae"}]



Any thoughts/comments would be appreciated!