Bitcoin Forum
June 24, 2024, 11:10:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Armory / Re: 0.96.4 RC1 on: October 23, 2017, 09:53:15 PM
It seems armory does not add the amount of the original UTXO (complete, so before subtracting fees) when signing the transaction. I fixed this in a small script: https://bitcointalk.org/index.php?topic=2309673.0
2  Bitcoin / Armory / Script to spend BCH from Armory Lockbox (2-of-3 Multisig) on: October 23, 2017, 09:44:22 PM
Here's a bash script I used to free some BCH from my Armory Lockbox. Feel free to use and enhance it!

Donations are appreciated!
BTC: 12YWVqdZqCrjJX4dAfKto47WSak93kB9mK
BCH: 14ZniiUi6Mu1ir6qZpvpMCbNDCnwYHcXsk

You need to fill the various variables in the script, specify the UTXO details (remove the "exit" line when you found those). This script will automatically send the signed transaction.

Make sure to leave some room between $ORIGAMOUNT (everything there is in the UTXO VOUT) and $AMOUNT (the amount you will get): the difference are fees for the miners.

Bitcoin ABC has to be running and referenced correctly in $CLI.

Code:
#!/bin/bash
# https://bitcoin.org/en/developer-examples#p2sh-multisig
CLI=bitcoin-cli # Bitcoin ABC
# Get public keys by double clicking on lockbox in armory
P2SH_ADDRESS="3..."
PUB1="0434be1f..."
PUB2="04a3b81..."
PUB3="04ce75f..."
# Find private keys in Armory:
# double click on wallet
# Find address in Unused Addresses - P2PKH (the first one in my case)
# Double click on address
# View Address Keys
# Use the Private Key (Base58) without spaces
PRIVATE_KEY1="5K..."
PRIVATE_KEY2="5J..."
COMPUTED_P2SH_ADDRESS=`$CLI createmultisig 2 "[\"$PUB1\", \"$PUB2\", \"$PUB3\"]" | jq -r ".address"`
echo "Computed address: $COMPUTED_P2SH_ADDRESS"
echo "Expected address: $P2SH_ADDRESS"
TARGETADDRESS="13..."
# Pick an unspent transaction which puts money into $P2SH_ADDRESS
UTXO_TXID="b3d..."

$CLI getrawtransaction $UTXO_TXID 1
exit # Enter data below and remove this line
UTXO_VOUT=0 # .vout[n].n
UTXO_OUTPUT_SCRIPT="a914131357a7bddee4de25e96fbdfadd45276cb5bae987" #.vout[n].scriptPubKey.hex
ORIGAMOUNT=0.001 # .vout[n].value
AMOUNT=0.00095 # .vout[n].value (difference to $ORIGAMOUNT are fees!)

P2SH_REDEEM_SCRIPT=`$CLI createmultisig 2 "[\"$PUB1\", \"$PUB2\", \"$PUB3\"]" | jq -r ".redeemScript"`
RAW_TX=`$CLI createrawtransaction "[{\"txid\":\"$UTXO_TXID\",\"vout\":$UTXO_VOUT,\"redeemscript\":\"$P2SH_REDEEM_SCRIPT\"}]" "{\"$TARGETADDRESS\":$AMOUNT}"`
SIGNED_RAW_TX=`$CLI signrawtransaction $RAW_TX "[{\"txid\":\"$UTXO_TXID\",\"amount\":$ORIGAMOUNT,\"vout\":$UTXO_VOUT,\"scriptPubKey\":\"$UTXO_OUTPUT_SCRIPT\",\"redeemScript\":\"$P2SH_REDEEM_SCRIPT\"}]" "[\"$PRIVATE_KEY1\", \"$PRIVATE_KEY2\"]" | jq -r ".hex"`
$CLI sendrawtransaction $SIGNED_RAW_TX
3  Bitcoin / Development & Technical Discussion / Re: Error: Signature must be zero for failed CHECK(MULTI)SIG operation on: October 23, 2017, 09:28:51 PM
In the "signrawtransaction" command you have to specify the original (total!) amount of the P2SH address:

signrawtransaction $RAW_TX "[{\"txid\":\"$UTXO_TXID\",\"amount\":$ORIGAMOUNT,\"vout\":$UTXO_VOUT,\"scriptPubKey\":\"$UTXO_OUTPUT_SCRIPT\",\"redeemScript\":\"$P2SH_REDEEM_SCRIPT\"}]" "[\"$PRIVATE_KEY1\"]"
4  Bitcoin / Armory / Re: 0.96.4 RC1 on: October 09, 2017, 06:45:21 PM
I fail to send BCH from a lockbox. I am connected to my node (Bitcoin ABC), started the Armory DB from scratch, selected the BCH signer, and disabled RBF. When I send a transaction (either directly in the dialog, or after exporting -> exporting as hex -> importing on http://blockdozer.com/insight/tx/send) I get the error that SIGHASH_FORKID is not used.

Bitcoin ABC:
2017-10-09 18:39:50 Misbehaving: 127.0.0.1:43462 peer=0 (0 -> 100) reason: mandatory-script-verify-flag-failed (Signature must use SIGHASH_FORKID) BAN THRESHOLD EXCEEDED

Blockdozer:
64: non-mandatory-script-verify-flag (Signature must use SIGHASH_FORKID). Code:-26

2017-10-09 20:39:50 (INFO) -- (PPRINT from /usr/bin/../lib/armory/ArmoryQt.py:3118)

  01000000 025661a7 bba1588e 2085052f be725eeb e0afb382 d152ffd4 7aafa8e9
  a831bf82 81000000 00fd5c01 00473044 02203fb9 6d77b6ee e47c82a1 55dfc3c4
  7b89cfc9 17c469d8 85c83c16 f1320c0a f8940220 7ed35215 d943badc 28c5e15e
  b01a001a 1a624d1d f44b4fff 333358b9 25cdb042 01473044 02203852 5fc553a8
  d134f200 9d520bf2 9c87b096 7cfaea7c db043a0d 0f6b135b f7140220 26315e4d
  88edabc7 6b39241e 6f7ea4bd 95af0c8a 31c6c497 9006724a bed70450 014cc952
  410434be 1ffcac1c fdea8f80 01e31af2 75a2b2b1 2c00461d 2727fc30 ef025116
  ba918c78 31d23bb5 bb52ef60 d098b82c d9275391 934e2fa7 24f641b5 a8f51549
  2c8d4104 a3b81cc8 fde26d66 5c11133f a6e0e562 c80122d0 fd6d25b7 9cc1478a
  7ad77d06 b403565b 0a016a6b 971c664d 686bd590 f1bd4d08 982909b1 3d45128c
  39e22bbd 4104ce75 f88b933d 0cdc647a 28d24547 0481a6b3 8caa1720 ba143fe8
  94d49c54 6a4eecc8 5b5e817a 1dda3fbb fbe5dbb7 0b83294c c9c617cd 27f1eff3
  e50ef043 0c0453ae ffffffff 2c5ce43c 90a0a120 2196b660 d48b5085 70ff1e8a
  b5ac03fd 4864cb77 8a09d3b3 00000000 fd5e0100 48304502 2100c808 7a7e467e
  3c10faef a32fd620 67ab5003 ff0bfc1f eceecb38 e6906277 eb2b0220 7b28db72
  7a1fe783 f15a5b04 93c49391 990017fb 88d9a7d5 d2498c27 c71ac6d6 01483045
  022100ff c7d05f2f e891cde2 06d5e725 8505cc2c 995eaccb f7791e07 5846e8b4
  931d2402 20158177 42b8d1b5 f1abe051 21ca5abd 390b2e82 9b3d9af5 3ed9240e
  7f307937 d9014cc9 52410434 be1ffcac 1cfdea8f 8001e31a f275a2b2 b12c0046
  1d2727fc 30ef0251 16ba918c 7831d23b b5bb52ef 60d098b8 2cd92753 91934e2f
  a724f641 b5a8f515 492c8d41 04a3b81c c8fde26d 665c1113 3fa6e0e5 62c80122
  d0fd6d25 b79cc147 8a7ad77d 06b40356 5b0a016a 6b971c66 4d686bd5 90f1bd4d
  08982909 b13d4512 8c39e22b bd4104ce 75f88b93 3d0cdc64 7a28d245 470481a6
  b38caa17 20ba143f e894d49c 546a4eec c85b5e81 7a1dda3f bbfbe5db b70b8329
  4cc9c617 cd27f1ef f3e50ef0 430c0453 aeffffff ff014277 fb040000 00001976
  a9141a33 d9d2aa52 d4ff6425 f9e98f5f c6686588 6a6588ac bd8a0700
2017-10-09 20:39:50 (INFO) -- (PPRINT from /usr/bin/../lib/armory/ArmoryQt.py:3119)
Transaction:
   TxHash:    1eb2421b07620977a49c2b2a9ab1ac4dbb4f057b1424bfdf84f9b50cf40a1ba8 (BE)
   Version:   1
   nInputs:   2
   nOutputs:  1
   LockTime:  494269
   Inputs:
      PyTxIn:
         PrevTxHash: 8182bf31a8e9a8af7ad4ff52d182b3afe0eb5e72be2f0585208e58a1bba76156 (BE)
         TxOutIndex: 0
         Script:     (0047304402203fb96d77b6eee47c82a155dfc3c47b89cfc917c469d885c83c16)
         Sender:     33Rsw83aYK9ChQx68C1aXxaJb5j5LzyLhw
         Seq:        4294967295
      PyTxIn:
         PrevTxHash: b3d3098a77cb6448fd03acb58a1eff7085508bd460b6962120a1a0903ce45c2c (BE)
         TxOutIndex: 0
         Script:     (00483045022100c8087a7e467e3c10faefa32fd62067ab5003ff0bfc1feceecb)
         Sender:     33Rsw83aYK9ChQx68C1aXxaJb5j5LzyLhw
         Seq:        4294967295
   Outputs:
      TxOut:
         Value:   83588930 (0.8358893)
         Script:  OP_DUP OP_HASH160 (13PYgef5Lsbhnk2D3W6z8zHiHiaAeHRdyp) OP_EQUALVERIFY OP_CHECKSIG

2017-10-09 20:39:50 (INFO) -- ArmoryQt.py:3124 - Sending Tx, a81b0af40cb5f984dfbf24147b054fbb4dacb19a2a2b9ca4770962071b42b21e
2017-10-09 20:39:50 (INFO) -- ArmoryQt.py:3138 - Failed to broadcast Tx through P2P
2017-10-09 20:39:50 (ERROR) -- ArmoryQt.py:3159 - Transaction was not accepted by the Satoshi client
2017-10-09 20:39:50 (ERROR) -- ArmoryQt.py:3160 - Raw transaction:
2017-10-09 20:39:50 (ERROR) -- (PPRINT from /usr/bin/../lib/armory/ArmoryQt.py:3161)

  01000000 025661a7 bba1588e 2085052f be725eeb e0afb382 d152ffd4 7aafa8e9
  a831bf82 81000000 00fd5c01 00473044 02203fb9 6d77b6ee e47c82a1 55dfc3c4
  7b89cfc9 17c469d8 85c83c16 f1320c0a f8940220 7ed35215 d943badc 28c5e15e
  b01a001a 1a624d1d f44b4fff 333358b9 25cdb042 01473044 02203852 5fc553a8
  d134f200 9d520bf2 9c87b096 7cfaea7c db043a0d 0f6b135b f7140220 26315e4d
  88edabc7 6b39241e 6f7ea4bd 95af0c8a 31c6c497 9006724a bed70450 014cc952
  410434be 1ffcac1c fdea8f80 01e31af2 75a2b2b1 2c00461d 2727fc30 ef025116
  ba918c78 31d23bb5 bb52ef60 d098b82c d9275391 934e2fa7 24f641b5 a8f51549
  2c8d4104 a3b81cc8 fde26d66 5c11133f a6e0e562 c80122d0 fd6d25b7 9cc1478a
  7ad77d06 b403565b 0a016a6b 971c664d 686bd590 f1bd4d08 982909b1 3d45128c
  39e22bbd 4104ce75 f88b933d 0cdc647a 28d24547 0481a6b3 8caa1720 ba143fe8
  94d49c54 6a4eecc8 5b5e817a 1dda3fbb fbe5dbb7 0b83294c c9c617cd 27f1eff3
  e50ef043 0c0453ae ffffffff 2c5ce43c 90a0a120 2196b660 d48b5085 70ff1e8a
  b5ac03fd 4864cb77 8a09d3b3 00000000 fd5e0100 48304502 2100c808 7a7e467e
  3c10faef a32fd620 67ab5003 ff0bfc1f eceecb38 e6906277 eb2b0220 7b28db72
  7a1fe783 f15a5b04 93c49391 990017fb 88d9a7d5 d2498c27 c71ac6d6 01483045
  022100ff c7d05f2f e891cde2 06d5e725 8505cc2c 995eaccb f7791e07 5846e8b4
  931d2402 20158177 42b8d1b5 f1abe051 21ca5abd 390b2e82 9b3d9af5 3ed9240e
  7f307937 d9014cc9 52410434 be1ffcac 1cfdea8f 8001e31a f275a2b2 b12c0046
  1d2727fc 30ef0251 16ba918c 7831d23b b5bb52ef 60d098b8 2cd92753 91934e2f
  a724f641 b5a8f515 492c8d41 04a3b81c c8fde26d 665c1113 3fa6e0e5 62c80122
  d0fd6d25 b79cc147 8a7ad77d 06b40356 5b0a016a 6b971c66 4d686bd5 90f1bd4d
  08982909 b13d4512 8c39e22b bd4104ce 75f88b93 3d0cdc64 7a28d245 470481a6
  b38caa17 20ba143f e894d49c 546a4eec c85b5e81 7a1dda3f bbfbe5db b70b8329
  4cc9c617 cd27f1ef f3e50ef0 430c0453 aeffffff ff014277 fb040000 00001976
  a9141a33 d9d2aa52 d4ff6425 f9e98f5f c6686588 6a6588ac bd8a0700
2017-10-09 20:39:50 (ERROR) -- ArmoryQt.py:3162 - Transaction details
2017-10-09 20:39:50 (ERROR) -- (PPRINT from /usr/bin/../lib/armory/ArmoryQt.py:3163)
Transaction:
   TxHash:    1eb2421b07620977a49c2b2a9ab1ac4dbb4f057b1424bfdf84f9b50cf40a1ba8 (BE)
   Version:   1
   nInputs:   2
   nOutputs:  1
   LockTime:  494269
   Inputs:
      PyTxIn:
         PrevTxHash: 8182bf31a8e9a8af7ad4ff52d182b3afe0eb5e72be2f0585208e58a1bba76156 (BE)
         TxOutIndex: 0
         Script:     (0047304402203fb96d77b6eee47c82a155dfc3c47b89cfc917c469d885c83c16)
         Sender:     33Rsw83aYK9ChQx68C1aXxaJb5j5LzyLhw
         Seq:        4294967295
      PyTxIn:
         PrevTxHash: b3d3098a77cb6448fd03acb58a1eff7085508bd460b6962120a1a0903ce45c2c (BE)
         TxOutIndex: 0
         Script:     (00483045022100c8087a7e467e3c10faefa32fd62067ab5003ff0bfc1feceecb)
         Sender:     33Rsw83aYK9ChQx68C1aXxaJb5j5LzyLhw
         Seq:        4294967295
   Outputs:
      TxOut:
         Value:   83588930 (0.8358893)
         Script:  OP_DUP OP_HASH160 (13PYgef5Lsbhnk2D3W6z8zHiHiaAeHRdyp) OP_EQUALVERIFY OP_CHECKSIG

2017-10-09 20:39:50 (ERROR) -- ArmoryQt.py:3164 - Failure message: mandatory-script-verify-flag-failed (Signature must use SIGHASH_FORKID)
2017-10-09 20:39:50 (WARNING) -- ArmoryQt.py:4111 - Called updateSyncProgress while not sync'ing
5  Bitcoin / Armory / Re: Using Armory on the BCH chain on: October 09, 2017, 06:05:43 AM
Thanks a lot!
6  Bitcoin / Armory / Re: Using Armory on the BCH chain on: October 08, 2017, 05:31:14 PM
Quick Q: Is the BCH signer supported for multi-sig transactions (lockboxes)? Is there a way to select BCH Signer for when creating a multi sig transaction? If not, is this a particularly easy thing to add - ability to select BCH Signer in Lockbox mode - or there are no plans to include this?

Background:
I finally got the Bitcoin ABC & Bch Signer working in a VMWare Ubuntu instance.
I'm able to see my BCH balances correctly both on regular wallets and my multi-signature (lockbox) wallets.

But, I can only select the BCH Signer for when doing transactions using regular wallets. I can't get it working with the multi-signature/lockbox wallets.

Is there any way I can at least just get the BCH out of there by somehow manually crafting the BCH signer multi-sig-transaction? (I don't mind even just sweeping private keys, but these funds are sitting in a multi-signature wallet, so I don't believe key swiping/export would work there, I don't know).

EDIT: I'm in the process of going through Bitcoin ABC node and seeing if I can manually do a multi sig transaction that way by importing private keys.

Image of when doing a Multi-sig/Lockbox transaction, error returned:
non-mandatory-script-verify-flag (Signature must use SIGHASH_FORKID)



I'm in a similar situation. I understand that currently Armory does not allow to sign such transactions using the BCH code. Do you know of some other way I can access the BCH stored in lockboxes? Some crude export/raw hex/import/CLI magic would be a great workaround.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!