Do you want to broadcast your
update_witness command but the
cli_wallet is timing out on you or not connecting to the RPC?
You can't find the file where you saved the
update_witness command and it's too long to even remember?
You're missing blocks and you're scrambling to log onto your server but the data center is down?
You're on the beach sipping margarita, you have your laptop hooked on the local Wi-Fi but all your communication clients and apps are on your home computer?
What was the command again:
In other words, you need to switch your public signing key or disable your witness but you're stuck!
As witnesses, we all experienced such inconveniences too often. That's why I'm glad to share with you a tool I've developed to make things a little easier and snappier. All you need is an internet connection, a browser and a mouse.
No, the other type of mouse.
GitHub Repository : https://github.com/Jolly-Pirate/witness-update-html
Months ago, I was creating a tool that could be used in a browser to broadcast the witness update command. Unfortunately, I stumbled on a bug in Steem-JS that prevented me from completing the project. In Steem-JS, When trying to broadcast the signing key to disable the witness, it errors about an
Invalid sequence tag. The issue was reported in October 2017 but no fix had been done (https://github.com/steemit/steem-js/issues/267). I even offered a 20 STEEM reward to fix the bug but nobody had a solution for it. Finally, after months of waiting (and frustration), @netuoso came up with a fix that worked. Big thanks to @netuoso for taking the time to look into my request (after some nagging). The pull request is at https://github.com/steemit/steem-js/pull/390. With that fix, I could finally finish what I started.
I present to you
STEEM Witness Update HTML Tool
- HTML for ease of use in any modern browser.
- Portability, can be saved on a USB stick.
- AES-256 encryption of the active key for safe storage in the configuration file.
- Selectable public signing keys.
- Selectable RPC nodes.
- Witness disabling.
- Font Awesome
Since the fix hasn't been reviewed and merged yet by Steemit's developers, you can either use the included
steem.min.js I built, or build your own. I have used the latest Steem-JS v0.7.1 on Ubuntu 16.04:
Install the latest NodeJS v10.x (10.6 at time of this release)
sudo apt-get purge -y --auto-remove nodejs npm curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install -y nodejs
git clone https://github.com/steemit/steem-js.git cd steem-js curl https://patch-diff.githubusercontent.com/raw/steemit/steem-js/pull/390.patch | git apply npm install
/dist/steem.min.js into the same folder as the html file.
git clone https://github.com/Jolly-Pirate/witness-update-htmlor download the zipped files.
- Copy the
config.json.exampleand save it as
config.jsonin the same folder as the HTML file.
config.jsonin a plaintext editor and modify it with your settings. Follow the JSON format to add or remove values.
wif parameter, you have two options: either use your private active key, or encrypt it with a password then store it in the config file. I highly recommend you do the latter, which brings us to the following steps:
- Open the HTML file in a browser.
- Go to the Encryption Tool tab, paste your witness private active key, set a strong password and click Encrypt. The encrypted string will change everytime you click the button because of the random salt; don't worry, the password will decrypt the strings just fine.
- Click Decrypt to test the decryption.
- Select the encrypted text and paste it as the
wifvalue in the
It's straighforward and self-explanatory.
- Refresh the HTML page or go to the Broadcast Command tab.
- Enter your decryption password (leave blank if your active key is in plaintext).
- Click Load Settings, select the public signing key you wish to use (or enter it manually).
- Click Broadcast or Disable Witness, depending on your needs.
I encourage every witness to learn and understand how things are done manually first (cli_wallet, compiling, etc) before using convenience tools like this one. I hope you like it.
I'm not responsible for any bugs, misuse or potential bad outcome. I have tested the code extensively and didn't find any issues. Nevertheless, unmerged pull requests are experimental so use at your own risk. When the fix is approved, I'll update the repo to enable the
<script src="https://cdn.steemjs.com/lib/latest/steem.min.js"></script> line, instead of
Please redownload the files from the repository and re-encrypt your password, I did some important changes:- Increase encryption strength against bruteforce attacks by hashing the password with high iterations. The encryption/decryption now takes ~2 seconds instead of a few milliseconds, which makes bruteforcing harder. Thanks to @therealwolf for the tip and discussion about it.
- Update Crypto-JS library CDN
- Cleanup comments
- Minor HTML changes
- Upload the correct patched steem.min.js