Just as I was about to integrate goatpig's valuable comments (esp. regarding botched privacy) - B2X's politburo standing committee of six voted to shut it down. However, since the work has been done, and perhaps for future use should the need arise, below is a take on a step-by-step guide for splitting your coin in the face of a non-replay protected hard fork (aka segwit2X or its future siblings) version 2:
1. Ingredients a. Armory running on top of a full node synced by BTC 15.0.1.
b. Extra 160GB disk space, preferably SSD for faster sync.
c. A small script I wrote to switch Armory between chains (below)
2. Definitions a. Tainted address: an address that you have generated from your Armory wallet that has coins on one blockchain only. Checking if an address is tainted involves using two blockchain explorers, one on each chain. A tainted address will show it has coins on one blockchain explorer, and no coins on the other blockchain explorer.
b. BlockHeight – the top, most recent block number on a given blockchain.
c. Post-fork definitions:
HighChain – The blockchain that has the higher BlockHeight, longer chain.
HighChainHeight – the BlockHeight of a HighChain.
LowChain – the shorter blockchain = it has the lower BlockHeight.
LowChainHeight – the BlockHeight of LowChain.
TaintWindow = HighChainHeight minus LowChainHeight (measured in blocks).
d. ArmoryDir: the directory where armory lives on your machine. It has it's log files, wallets, and ArmorySetting.txt – its settings file, which we will use. It is by default in %appdata%roaming/armory, but can be changed via the –datadir= command line option. In my setup and examples below, it is in f:\armory
e. BitcoinDir: the directory where bitcoin stores its Blocks, Chainstate and conf file. It is by default in %appdata%roaming/bitcoin. In my setup and examples below it is in f:\bitcoin.
3. Method Overview a. When the fork occurs, (block height 494,784), one of two things will happen: either B2X will have the majority of hashpower, or BTC will. No one knows, but either way, we'll all know once the first >1MB is mined by B2X. This hash power asymmetry plus the use of RBF are the tools we'll use to attempt a coin split.
b. After some time from the fork event, one chain will find more blocks than the other due to hashrate asymmetry and as a result, one chain will become the HighChain (see definitions above), the other LowChain, with corresponding HighChainHeight, LowChainHight and a non-zero TaintWindow (see definitions).
The chain height of the blockchain Armory runs on is shown at the bottom right corner of Armory once it syncs. We will use this height difference between the chains for tainting.
c. Internal mechanism: When Armory generates a transaction, it sets a block height from which the transaction starts to be valid (for various reasons outside our scope here). That height, called 'locktime', is regularly set to be the top height at the time of transaction creation.
Now, since the two chains will eventually diverge in block height, Armory created transactions on the HighChain will be invalid on the LowChain for a period of TaintWindow blocks. To give an example (rounding numbers for simplicity) suppose:
BTC is at block #500,000
B2X is at block #499,990
HighChain=BTC; HighChainHeight=500,000
LowChain=B2X; LowChainHeight=499,990
TaintWindow=500,000 - 499,990 = 10 blocks
The TaintWindow is our opportunity of tainting – it is the time when we know that Armory created transactions on the HighChain can't be replayed on the LowChain.
This means we want transactions to get mined asap on the HighChain to begin with, since that keeps the window as wide as possible. Assuming in the previous example that your transaction gets mined in the first block, i.e. #500.001, that puts B2X at block #499,991 and we have 9 blocks till HighChain transaction is mineable on the LowChain. That should be ample time to RBF on the LowChain side.
Basically, as long as TaintWindow is significant enough (as low as 5 blocks could do), there's a comfortable window to RBF the transaction on the LowChain. Make a point of bumping the fee on the LowChain just to make sure that if you don't get mined on the LowChain during the TaintWindow, your LowChain transaction will still take priority over your HighChain transaction after LowChain catches up.
4. Step 1: pre-fork preparations a. Record your ArmoryDir and your BitcoinDir.
b. Make sure Armory is synced over your BTC node in expert mode.
c. In Armory, under File-Settings, check 'Let Armory run Bitcoin Core/bitcoind in the background' and insert the proper directories where BTC Core resides – do not leave the two fields blank. The two directories should be identical. Click Save.
d. Exit Armory gracefully. Make sure in task-manager that bitcoind has stopped and so did armory.db. It may take bitcoind a good minute to save and exit, especially on a mechanical disk.
e. Restart Armory and see that everything works as expected: Armory fires up bitcoind and armory.db syncs and you can see your wallet(s) and transactions. It may take a minute for Armory to start working with the node after startup.
f. Go to ArmoryDir and open file ArmorySetting.txt – look for the lines starting with "SatoshiExe" and a few lines below it "SatoshiDatadir". Both should have on the right your BitcoinDir – (e.g. f:\bitcoin)
g. Now go to BitcoinDir and copy the entire content to a new directory. It is about 150GB. Name that directory B2X. From now on that will be refered to as B2XDir and will have the entire B2X blockchain. In my examples below, it is in d:\b2x.
Open a new text file and name it "ArmoryCoinSelect.ps1". Make sure the suffix is .ps1 (powershell script) and not .txt (a text file). It will contain a short script to change Armory settings such as its directed to a specific blockchain. Paste the following code into it:
#Switch armory to BTC or B2X node
param(
[string]$SwitchTo = $(Read-Host 'Coin? [BTC/B2X]'),
[string]$ArmorySetting="F:\Armory\ArmorySettings.txt",
[string]$b2x="d:\b2x",
[string]$btc="f:\bitcoin"
)
if ($SwitchTo -eq "BTC") {
(Get-Content $ArmorySetting).Replace($b2x, $btc) |Set-Content $ArmorySetting
echo "Armory directed to BTC"
}
else{
(Get-Content $ArmorySetting).Replace($btc, $b2x) |Set-Content $ArmorySetting
echo "Armory directed to B2X"
}
[string]$RunArmory=$(Read-Host 'Run Armory? [Y/N]')
if ($RunArmory -eq "Y") {
& "C:\Program Files (x86)\Armory\ArmoryQt.exe" --datadir=f:\armory
}
h. In the above script, change a few lines in the likely event your directories are different from the examples here: $ArmorySetting, $b2x, $btc at the start of the script need to point to where these file exist, and the hardcoded datadir at the last line of the script.
i. Make sure Armory is not running, nor bitcoind nor armorydb and run the script by right-clicking on the file and choosing 'Run with PowerShell". Choose B2X and 'Y' if all goes well, Armory will start and shortly after control the B2X node and sync it.
j. Create a new wallet to receive your B2X coins. Name it meaningfully so as not to confuse with any other wallet, e.g. MyB2X.
k. After it syncs – shut down gracefully and start BTC again. To see which chain you're on, choose in Armory File-Settings and you'll see the directories it is working with – in my examples either f:\bitcoin or d:\b2x.
l. You are now ready for the fork. Keep the nodes updated by switching once every few days.
5. Post Fork Tainting (the hard part) a. Switch Armory to HighChain.
b. Double check it is synced and on the chain you've intended (File-Settings).
c. Go to the Send dialog. Pick your HighChain wallet as the sender. For recipients, pick your HighChain wallet as well. This will grab a fresh address in your HighChain wallet.
d. Open the Coin Control dialogue a pick a single UTXO.
e. Record the UTXO, you will need the same UTXO for later.
f. Check "MAX" on the recipient entry, next to the value field. Manually input a fee healthy fee, sign and broadcast.
This makes sure that:
• You are sending these coins to yourself with no change. You don't need change for this, you are sending back to yourself after all.
• You are moving a single, whole UTXO. This is the only way to protect your privacy, by moving your UTXOs one at a time without change.
• Lastly, you want a big fee because you want to get mined in the next HighChain block, so as to have the longest TaintWindow.
g. Once you have 1 confirmation on the HighChain, shut down Armory and restart via the script and switch to the LowChain.
h. Double check it is synced and on the LowChain you've intended (Choose File-Settings to verify).
i. Here you will perform the exact same spend but send to your LowChain wallet instead of your HighChain wallet. Obviously pick the same UTXO as with the HighChain transaction, recorded in step e.
j. You are trying to send to a different address on the LowChain. That's the whole point of tainting, to get an output on one chain that does not exists on the other.
k. Do not forget to spike the fee even higher than with the HighChain transaction. You want to get in the next LowChain block and you want this transaction to have a highest fee of the two if it fails to mine quickly.
Once you've got your confirmation on the LowChain, you have a tainted UTXO.
l. Rinse and repeat with each of your UTXOs.