Bitcoin Forum
December 14, 2017, 05:28:43 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 7 8 »  All
  Print  
Author Topic: Using Armory on the BCH chain  (Read 27137 times)
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
August 06, 2017, 11:26:32 PM
 #1

With the BCH signer done, here is a guide on how to use it and keeping your stash secure.

-------- The signer --------

In order to sign for BCH, you have to pick your signer manually. This is a new feature, and is only available in Expert mode, so first thing first, set user mode to Expert.
To pick the signer, you need to get to the "Confirm Transaction" dialog. Once there, you should see the signer select frame, click it and pick the signer for the chain you want to spend on. The default option only picks between Bitcoin signers, to sign for BCH you HAVE to pick the BCH signer manually.

Screenshots for the good measure: https://imgur.com/a/9zXGD

Once you've picked the signer, the rest is business as usual. Note that this step only occurs at the point of signing, i.e. if you sign offline, you have to pick the signer on your offline machine.

-------- Security --------

The process is relatively safe. If you mess up and pick the wrong signer for you chain, the transaction will be invalid for that chain anyways. That transaction is valid for the chain signer is for however, example:

Armory is running against a BCH node. You create a tx and sign it with a Bitcoin signer. That transaction will fail to broadcast to the BCH network. However, if you try to broadcast this same transaction with an instance of Armory connected to a Bitcoin node, it will succeed and your coins will be moved on that chain.

This may sound confusing but this is how Armory operates by design, it trusts the underlying node to be honest and the Bcash devs made a point of not changing network ports, magic number identifiers nor script hash prefixes, so you end up with this mess.

As for why I didn't go further out of my way to try and make this distinction stronger in my own code, I'm trying to think for the future with all changes to mission critical code (such as signers), and let's be real, Bcash has no future. Therefor the changes were minimal, with an explicitly paying attention to:

1) Trying to salvage as much code as possible from this effort (OP_RETURN outputs and signer selection).

2) Making it easy to prune the useless bits once miners pull the plug on this nonsense.

3) Be prepared for the next gonzo debacle (2x?).

At any rate, if you do not care about Bcash, this feature is transparent to you, as the signer will always default to Bitcoin.

-------- Splitting your coins ---------

As stated previously, BCH sigs are invalid on the Bitcoin chain, and vice versa. Therefor there's nothing more to splitting your prefork coins but to spend them post fork.

-------- Testing --------

I've moved coins on the BCH chain. Here's a tx created with Armory:

2cc2b1f4578e6c0b42c5de396ca43eb0fe6868509bd19d9bd5e14a0b4f2c5166

I've also used the opportunity to test the OP_RETURN feature on a mainnet. If you inspect the transaction, you should be able to read "signed with armory" in the op_return message.

For the more paranoid, you can trace the history of the outpoint on the Bitcoin chain and verify that it has been spent to a completely different transaction, therefor demonstrating the split. The order I went was Bitcoin tx first, Bcash second, but it should work the other way around as well.

-------- Privacy ---------

In order to reduce privacy leakage, you should pick non KYC pure crypto exchanges. In this case, spend UTXO per UTXO in order to not link your coins on chain. If you're using a KYC exchange, it doesn't matter as much, as the exchange knows these coins are linked and who controls them, even though it wouldn't be obvious on chain if you went a UTXO at a time.

Whether you have sent your coins to a KYC exchange or not, you want to cycle your wallets on the other chain afterwards, i.e. if you dumped BCH, you want to move all these coins on BTC chain to a fresh wallet.

The reason for this is that your public keys will be exposed on at least one chain. One of the security layers of Bitcoin is that public keys are behind hashes up until you spend the coin. Once you sign coins on one of the chains, you lose this layer. This is a major reason why you do not reuse addresses in Bitcoin. This is particularly relevant if you have coins in long term cold storage: cycle them if you touch the keys!

As for how to cycle your wallets, it depends on the scenario:

1) If you used a KYC exchange, create a new wallet and send coins over whichever way you want, you have no privacy at this point. To regain fungibility, you will have to mix your coins or swap to fungible alt coins and back. This is out of the scope of this post, do your research if you value your financial privacy.

2) You used a non KYC exchange or some sort of cross chain swap scheme. You should move your coins to your new wallet utxo per utxo, or (1 in -> 2-3 outs), over the course of several weeks.

-------- Requirements --------

You need to update both your signer and online machine with a version of Armory capable to sign for BCH in order to spend the coins.

You need a copy of the chain, a running node and DB per side of the fork. You cannot mix ANY of these or you will corrupt your data. As a safety, make a backup of your Bitcoin chain before fiddling with the BCH stuff.

-------- Tricks --------

If you want to dump BCH but don't want to bother with the BCH node/don't trust their code, you can get around it with this trick:

1) You know all your prefork coins are also available on the BCH chain, therefor you only need blockchain data up to the fork point to move these coins.

2) You have all this data already in the form of the Bitcoin blockchain pre fork, so why not just use that?

3) You'll want to create a copy of your blockchain data then remove blkXXXXX.dat files up until the fork point . I don't know which file this is, something around 950~960, I'm sure someone will figure out the exact file. Note that if you did not move any coins post fork yet, you do not need to delete anything.

4) With this done, you want to sync a fresh DB against this blockchain folder. Do not run a node against it, just start ArmoryDB against this folder, then start ArmoryQt, it will pick up on that DB.

5) Once you're synced (it will show you as offline), you can create your transactions. You should pick utxos manually and keep track of them so as to not create conflicting transactions.

6) Once your tx is ready, make sure to create it as unsigned, even if your private keys are online. You will get a blob of text that you can feed back into the offline tx GUI. There you will get to sign the tx (make sure to pick the BCH miner), and you will get another blob of text. On the right side of that dialog, you will have a button that's called "Copy Raw Tx (Hex)". This is what you are after. This hex string is your signed tx.

7) With the signed tx, all you need now is some online service that will broadcast it to the BCH network for you, and voila.

-------- Advice --------

At first, before you try to fund an exchange account, send coins back to yourself on both chains and wait for a few confirmations to be sure you aren't shooting yourself in the foot. Cross check on the other chain to make sure you send the coins to the chain you intended.

-------- Disclaimer --------

It only makes sense but I'll remind it here: use this code at your own risk!

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Mr.Vice
Member
**
Offline Offline

Activity: 90


View Profile
August 07, 2017, 01:06:26 PM
 #2

First of all, thx for all your hard work and effort in improving and expanding Armory's features. I've watched the World Crypto Network at the time of the fork, where Jimmy Song has mentioned you were considering to support that new script type of Bitcoin Cash if it survives more than 2 weeks. It hasn't been a week ago now and you've already released a version that supports it! That's truely awesome! :-)

I have a question regarding the privacy part of your guide. For e.g. if I create a new wallet in Armory for BCH only and I prepaire all tx in my old wallets to just spend that single UTXO set in BCH and send each to a new seperate address of the generated wallet, would it then be safe to reuse my old wallets for BTC only? Because newly generated addresses in my old Armory wallets that I'm only going to use for BTC shouldn't be leaked if I have seperated all my BCH coins into a new wallet, should they?
I'm currently not looking forward in selling BCH and if I do only via something like Shapeshift and like you suggested only one UTXO set at a time.



goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
August 07, 2017, 08:15:28 PM
 #3

First of all, thx for all your hard work and effort in improving and expanding Armory's features. I've watched the World Crypto Network at the time of the fork, where Jimmy Song has mentioned you were considering to support that new script type of Bitcoin Cash if it survives more than 2 weeks. It hasn't been a week ago now and you've already released a version that supports it! That's truely awesome! :-)

I have a question regarding the privacy part of your guide. For e.g. if I create a new wallet in Armory for BCH only and I prepaire all tx in my old wallets to just spend that single UTXO set in BCH and send each to a new seperate address of the generated wallet, would it then be safe to reuse my old wallets for BTC only? Because newly generated addresses in my old Armory wallets that I'm only going to use for BTC shouldn't be leaked if I have seperated all my BCH coins into a new wallet, should they?
I'm currently not looking forward in selling BCH and if I do only via something like Shapeshift and like you suggested only one UTXO set at a time.

Cycling your wallet guarantees you won't reuse old addresses. If you're confident you aren't doing such a thing, you can keep the same BTC wallet and move coins unused addresses.

Ente
Legendary
*
Offline Offline

Activity: 2076



View Profile
August 09, 2017, 10:51:18 AM
 #4

Thank you, goatpig, for the effort you put into this!
I like the modular "different signers" approach, neat!

I use a separate armorydb and armoryqt and would like to send bcash via your "create signed tx and broadcast elsewhere" hint. I didn't do any tx (BTC nor bcash) since the "fork". So, in short, I just create the tx with the bcash signer, that's the only difference here?

7) With the signed tx, all you need now is some online service that will broadcast it to the BCH network for you, and voila.

Does anyone know where to broadcast those bcash tx without setting up my own bcash stuff? I don't plan to run a node or the like.
Couldn't find anything online yet.

Thanks,

Ente
HCP
Sr. Member
****
Online Online

Activity: 448

<insert witty quote here>


View Profile
August 09, 2017, 02:34:17 PM
 #5

Does anyone know where to broadcast those bcash tx without setting up my own bcash stuff? I don't plan to run a node or the like.
Couldn't find anything online yet.
Try here: http://blockdozer.com/insight/tx/send

I haven't actually used it... so can't comment as to whether or not it works... but blockdozer is one of the only BCC blockexplorers at the present time.

Ente
Legendary
*
Offline Offline

Activity: 2076



View Profile
August 09, 2017, 03:43:35 PM
 #6

Thanks, HCP!
I'll give it a try eventually.

Ente
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
August 09, 2017, 07:20:35 PM
 #7

Quote
So, in short, I just create the tx with the bcash signer, that's the only difference here?

You create the tx the usual way. At the time of signing, you pick the BCH signer, and that's now a tx only the BCH network will accept.

hlz
Newbie
*
Offline Offline

Activity: 1


View Profile
August 14, 2017, 06:56:57 AM
 #8

Does it also work with offline transactions on the offline pc ?
And do I also need to update armory on the offline pc ?

Thanks
Ente
Legendary
*
Offline Offline

Activity: 2076



View Profile
August 14, 2017, 09:48:33 AM
 #9

It all worked fine for me.
Creating unsigned TX on armoryqt, signing on an offline machine, broadcasting on http://blockdozer.com/insight/tx/send
Just please, please, don't forget the checkbox to sign with the bcash signer! :-)

Ente
Sophokles
Hero Member
*****
Offline Offline

Activity: 505


die-hard GPU miner


View Profile
August 17, 2017, 04:33:32 PM
 #10

It all worked fine for me.
Creating unsigned TX on armoryqt, signing on an offline machine, broadcasting on http://blockdozer.com/insight/tx/send
Just please, please, don't forget the checkbox to sign with the bcash signer! :-)

Ente

Looks promising. But I assume this does not work in case I have already transferred the BTC on those adresses elsewhere?
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
August 18, 2017, 12:09:29 AM
 #11

If you moved the BTC post fork, these addresses still have BCH on them.

mfbusiness
Newbie
*
Offline Offline

Activity: 3


View Profile
August 18, 2017, 12:15:30 AM
 #12


-------- Requirements --------

You need to update both your signer and online machine with a version of Armory capable to sign for BCH in order to spend the coins.


Assuming that I'd like to keep my offline machine cold, what is the best way to update the signer on it?  Noob on here, but been using Armory for several years.  Thanks in advance!

MF
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
August 18, 2017, 12:41:54 AM
 #13

Install the relevant package on your signer. You already have all the dependencies if you have a functional signer. I have not added dependencies to Armory yet. Actually, I've removed a few.

Sophokles
Hero Member
*****
Offline Offline

Activity: 505


die-hard GPU miner


View Profile
August 18, 2017, 07:13:21 AM
 #14

If you moved the BTC post fork, these addresses still have BCH on them.

Yes, certainly. But if the BTC are moved already, the balance on that address will be shown as zero in Armory - and it is not possible to initiate a transaction be signed with the BCH signer. Or am I missing something?

Quote
5) Once you're synced (it will show you as offline), you can create your transactions. You should pick utxos manually and keep track of them so as to not create conflicting transactions

goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
August 18, 2017, 08:52:41 AM
 #15

If you moved the BTC post fork, these addresses still have BCH on them.

Yes, certainly. But if the BTC are moved already, the balance on that address will be shown as zero in Armory - and it is not possible to initiate a transaction be signed with the BCH signer. Or am I missing something?

Ah, you mean you want to do this without running any Bcash binaries or grabbing their chain? Then refer to this point:

Quote
3) You'll want to create a copy of your blockchain data then remove blkXXXXX.dat files up until the fork point . I don't know which file this is, something around 950~960, I'm sure someone will figure out the exact file. Note that if you did not move any coins post fork yet, you do not need to delete anything.

Sophokles
Hero Member
*****
Offline Offline

Activity: 505


die-hard GPU miner


View Profile
August 18, 2017, 09:12:03 AM
 #16

If you moved the BTC post fork, these addresses still have BCH on them.

Yes, certainly. But if the BTC are moved already, the balance on that address will be shown as zero in Armory - and it is not possible to initiate a transaction be signed with the BCH signer. Or am I missing something?

Ah, you mean you want to do this without running any Bcash binaries or grabbing their chain? Then refer to this point:

Quote
3) You'll want to create a copy of your blockchain data then remove blkXXXXX.dat files up until the fork point . I don't know which file this is, something around 950~960, I'm sure someone will figure out the exact file. Note that if you did not move any coins post fork yet, you do not need to delete anything.

Ok, now I get it. Deleting the blkXXXXX.dat from now until back in time to the fork will make the post-fork spending of the BTC invisible to Armory.  Thanks, will give it a try!
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
August 18, 2017, 02:37:21 PM
 #17

Ok, now I get it. Deleting the blkXXXXX.dat from now until back in time to the fork will make the post-fork spending of the BTC invisible to Armory.  Thanks, will give it a try!

You will have to sync a fresh Armory DB atop of that copy of the chain for the changes to take effect on the Armory end.

Mr.Vice
Member
**
Offline Offline

Activity: 90


View Profile
August 18, 2017, 04:28:26 PM
 #18

A new settings entry for the script signer would be awesome, so you do not have to specifically select Bcash signer for every transaction. Or is it possible to permanently change the default script via config file?

Kind regards,
Mr.Vice
hiwind_m
Newbie
*
Offline Offline

Activity: 3


View Profile
August 19, 2017, 01:21:24 AM
 #19

Wooo
that's really fix my promble
just dude Grin Grin
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
August 19, 2017, 01:25:15 AM
 #20

A new settings entry for the script signer would be awesome, so you do not have to specifically select Bcash signer for every transaction. Or is it possible to permanently change the default script via config file?

Kind regards,
Mr.Vice

No such thing. you'd have to modify the source for this. This has not been designed as a permanent fixture. Once SegWit is enabled on the BTC chain, this should act as a deterministic way to identify the chain, in which case the chain/signer type will be implicit and binding in the unsigned tx message (basically it will hint the offline signer as to which signer to pick by default).

Pages: [1] 2 3 4 5 6 7 8 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!