Alrighty.
I have updated both switch.py and watcher.py.
I have improved the launching of watcher.py during initial launch, during replay and during resync. Rather than waiting a specified time and then loading the cli_wallet it will attempt to load the cli_wallet every 11 seconds until it is successful.
Switch.py will now integrate with 2 remote. witness nodes. It will ensure that the signing keys for the specified witness match. If there is a fork and they do not match switch.py will copy the signing key from the node with higher witness participation to the node with lower witness participation. Documentation and comments are still pretty minimal. I will try to flesh those out when I get a chance.
I have a testnet up and running which you can use to test if you would like. It is based off of a modified oct5-genesis.json which is available at
https://github.com/gileadmcgee/dele-puppy/ It is running on the most recent bitshares tag v2.15.294. Seed node is 107.170.232.94:1776.
If you are going to run switch.py on the testnet then you will need to slightly modify producer1.py and producer2.py Specifically lines 34, 35 and 50, 51. Just comment out one line and uncomment the other. It should be pretty self explanitory. You will need to modify config-example.py lines 11,25,28,34, and 40 with your local settings and save it as config.py. There must be a wallet.json at the specified location called out on line 37 of config-example.py. That wallet must have the password called out on config-example line 11. You will need to have launched it with --chain-id set the password and saved the wallet. The producer sub scripts will generate a wallet if you do not have one, but I have not added that functionality to switch.py yet.
The config for producer1.py and producer2.py are built into the files themselves. Currently lines 7-21. These should not need to be modified to work on the testnet, but will of course need to be modified if run under other conditions. Also its possible that you will need an empty file named __init__.py in both the producer1 and producer2 directories.
Let me know what you think. I believe that if properly configured this script mitigates the risk of signing on two different forks at the same time. I would appreciate any feedback before I start using this on the live network though.