Author

Topic: BTU Hard Fork Inquiry (Read 931 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
March 27, 2017, 09:19:44 PM
#6
I just read the official Armory position from achow
My post is not official until it reaches the website. The PR is still open and still may change, although it has been significantly revised since people first posted about it on Reddit.
member
Activity: 78
Merit: 10
March 27, 2017, 08:05:42 PM
#5
Thank you for this info goatpig! It was an educational experience. I just read the official Armory position from achow, I am impressed and it confirms Armory is the best Bitcoin client available.

Reference: https://github.com/achow101/BitcoinArmory/blob/gh-pages/_posts/2017-3-26-armory-and-hard-forks.md

-Ondart
legendary
Activity: 3738
Merit: 1360
Armory Developer
March 22, 2017, 06:51:10 AM
#4
1) If you control the private keys, you will have the associated coins on both chains post fork.

If you have IOU at an exchange (or any service provider for that matter), they hold the private keys, hence they get the mirrored coins. At this point there is no knowing if/when the exchange will credit you with coins on the other fork, and which fork they will decide run as their main.

The other issue is the possibility to being exposed to a hasty, untested implementation of the coin split. Coinbase dropped the ball during the ETH/C HF, you can research that event if you want to know more.

Lastly, if BU aggressively attacks the Core chain (mining empty blocks, forcing reorgs), they will effectively hamstring the Core chain's capacity. From your perspective, there is no knowing when your deposits and withdrawals will confirm. From the exchanges' perspective, they will have to use very liberal confirmation count to credit/draw your balance against on chain operations (possibly days).

My position is that it is preferable to move your coins out of exchanges before a fork, let the dust settle, then figure out where you want to trade.

There is a chance you get to pick an exchange that's prepared, has ample coin and let's you trade the forks on day 1. But then again, they risks remain: withdrawal turmoil and running unseasoned code.

Last but not least, BU has no wipeout protection. If the Core chain ever catches up BU in work, the BU fork gets wiped out. This does not happen the other way around, so there is actually quite some liability to list a BU balance, since the underlying coins could disappear the next day. This leads me to believe exchanges won't list BU coins for a while in the event of a fork.

2) I got my coins and want to use them separately on each chain, what do?

There are 2 sides to this coin (see what I did there!):

a) Armory:

The DB builds off of on disk chain data and does not enforce consensus rules. In other words, any client that uses the same block data format and magic word as Core is compatible with Armory. From your perspective, running Armory against the BU chain will show you your BU balance, and vice versa.

Know that Armory (naturally) applies chainwork rules, and that it ignores all data on shorter forks. Again, from your perspective, it means that in the case of a BU fork, running the BU client against your Core block data will make Armory blind to the Core chain.

In practice, this means that to be able to interchange seamlessly between your Core and BU transaction history, you need 2 copies of the chain, one for the Core chain and one for the BU fork. Same goes with the Armory DB, as it is intimately tied to the underlying block data. However, you do not need to rescan the BU chain to get the copy of Core DB to work off of it.

To summarize, you need:

- 1 copy of the chain to run exclusively against the Core client, with the associated Armory dbdir.
- 1 copy of the chain to run exclusively against the BU client, with associated Armory dbdir.

You can swap between the 2 by pointing Armory to the relevant pair of block data folder (--satoshi-datadir) and database folder (--dbdir).

b) Tainting your coins:

---------

If you know what tainting is, you can skip this part.

If a transaction you create on one chain is valid on the other, the recipient of your payment can replay the same transaction on the other chain to pocket your coins there as well. This is called the replay attack.

At the same time, BU has made it clear they don't intent to implement replay protection, and have no plan to change their P2P port from Core's, so these transaction will be present in both mempools to begin with (as they will propagate to both chains, since the P2P networks overlap).

The solution at the user level is to "taint" your coins, i.e. you want to get a transaction on one chain that isn't valid on the other. Once you have that, you can mix all of your remaining coins with the "tainted" output to the same effect. At this point none of your utxos on the one chain are valid on the other, which guarantees your txs aren't replayable.

---------

Tainting on BU is actually fairly easy. They want to increase the block size limit and reduce tx fees. At the same time, the departure of hash power from the main chain will result in slower Core blocks (i.e. less capacity, thus higher fees).

Hence, the simplest way to taint on BU is this:

Code:
- Create a transaction sending coins back to yourself, with a fee low enough such that it will quickly mine on BU but has no real chance of mining on Core.

- Once the tx is mined on BU, RBF the underlying output on the Core chain with a nice fee. This tx can only mine on Core now since it is invalid on BU (to which it appears as a double spend).

- Once your RBF gets a good confirmation cushion on the Core side (possibly a day or 2 if BU decides to attack the chain), you have a utxo exlusive to the BU chain and one exclusive the Core chain. You are now safe to taint the rest of your stash on each chain, keeping in mind that untainted coins remain valid on both chains.

In preparation for this event, I'm adding RBF for 0.96, so you should be covered on the tainting side if anything. Of course, keeping coins on an exchange will give you that "taint" once the exchange lists both forks. That's the easy way out, with the associated risk.

There is essentially no risk to tainting your coins on your own, at worst you are just sending your coins back to yourself on both chains. The only risk is to not wait for enough confirmations on the Core chain in case of a BU mining attack.

3) I tainted my coins, I want to trade them now!

You have 2 ways around this.

a) The simplest and most convenient way is to wait for an exchange to list both coins and do your business there.

How is this different from just keeping your coins on an exchange you ask? In that scenario, you are the mercy of the exchange you left your coins on pre fork. If they never list the 2 coins and/or don't let you withdraw post fork, there is nothing you can do about it.

If you taint your coins yourself, you not only manage the risk (you are only have to move coins on the chain you dont support in order to dump), you also get your pick of the exchanges, which means you can evaluate the different services before going all in with one.

b) Find someone on the other side of the fence willing to trade you and use a cross chain swap scheme.

I don't know if any of these schemes are publicly available. I've developed one for a partner of mine in the past. If things drag along, I'll ask for permission to make the scheme public, but I expect the community will deliver a solution faster than I if it comes down to this.

Keep in mind that in both cases, this play is risky as long as the Core chain is under a BU miner attack. Under these circumstances, a swap on a custodial exchange (as opposed to whatever on chain swap scheme, through an exchange or not) has a marginally higher chance of success. You can swap, ride out the attack and withdraw at the first sign of clearing, assuming the exchange doesn't screw you over (but that's a constant risk with exchanges to begin with).
member
Activity: 78
Merit: 10
March 21, 2017, 10:59:53 PM
#3
Just what I wanted to hear achow. Thank you.
staff
Activity: 3458
Merit: 6793
Just writing some code
March 21, 2017, 10:00:51 PM
#2
Armory does not check block consensus rules. It will be able to work with alternate implementations that are based upon Core. AFAIK, Armory would work with BU, Classic, and XT even after they hard fork.
member
Activity: 78
Merit: 10
March 21, 2017, 09:54:24 PM
#1
If BTU hard forks in the future and we have two blockchains and if I want to spend all my coin in the BTU blockchain only, how can I do this with Armory since it runs on Bitcoin Core? Do I need to export my private keys and use them on some wallet that runs on BTU to be able to spend the coin on that chain or some other method? I could use your guidance on the proper way to do this and any other advice for this situation.

I read this interesting article about the potential hard fork: http://bitcoinist.com/prepare-bitcoin-hard-fork/

This comment in the article is what inspired me to ask this question:

"Keeping your bits on your own personal wallet, in which you control the private keys, is advised, as this would ensure that your coins are credited on both blockchains.

One could then access the BU coins via the Bitcoin Unlimited client and the original chain’s coins via any wallet that supports Bitcoin Core. Keeping coins on an exchange is not recommended."

I am a 100% Bitcoin Core and want to keep it that way.  Smiley

-Ondart
Jump to: