bullfrog-system |
The bullfrog-system project creates a clean, complete, and standardized installation of the STEEM Daemon suite on Ubuntu 16. It provides all the tools necessary out-of-the-box to mine, witness, and bot against the STEEM blockchain.
GitHub : bullfrog-system
Background
This is the #mining system that I currently use with @bullfrog et al. I keep roughly 40 accounts to handle the miner witness queue. I mine strategically. When I do mine, I maintain a hashrate of roughly 5.7 mhps. If I'm feeling froggy that day, maybe 11.4 mhps.
I do not maintain mining hardware. I do this all with VMs via Amazon's EC2 service.
This system will be a pre-requisite for the NodeJS bot framework that I'm building here: GitHub: bullfrog. I will announce its release on #steemit once it's ready.
Installation
The target system must be a freshly installed Ubuntu Server 16.04 OS. Only "OEM" 16.04 systems are supported.
Installation is as simple as one command:
curl https://raw.githubusercontent.com/roylaurie/bullfrog-system/master/install-frog.bash | bash
Once the installation has completed:
- Add your miner accounts to the config files found in /var/local/steemd/configs.
- Use ~/bin/config-steemd.bash to select a role (miner, witness, synconly).
- Reboot.
You will know that the replay & sync has completed when you see the bottom two lines as shown. |
What it does
The installation script configures the system as such:
- A new user, 'frog' will be created which you will use for all steem maintenance tasks.
- steemd and cli_wallet -d will be installed as system services, out of /var/local/
- Users 'steemd' and 'steemwalletd' will be created to run steemd and cli_wallet -d respectively.
- Management tools will be installed in /home/frog/bin
- steemd will automatically start on boot.
- The latest blockchain snapshot will be downloaded (hosted by @steemychicken1).
- steemd will immediately begin running --replay and sync after install.
Running the steemd service
To start/stop/monitor the steemd service:
sudo service steemd start
sudo service steemd stop
sudo service steemd status
To enable/disable steemd starting on boot:
sudo systemctl enable steemd.service
sudo systemctl disable steemd.service
To follow the log:
sudo journalctl -u steemd.service -f
Running the steemwalletd service
To start/stop/monitor the steemd service:
sudo service steemwalletd start
sudo service steemwalletd stop
sudo service steemwalletd status
To enable/disable steemd starting on boot:
sudo systemctl enable steemd.service
sudo systemctl disable steemd.service
To follow the log:
sudo journalctl -u steemwalletd.service -f
Management tools
bin/config-steemd.bash
Switches between pre-existing config.ini files. Default names available: miner, witness, and synconly.
bin/replay-steemd.bash
Switches into synconly mode and runs steemd --replay
bin/recompile-steemd.bash
Re-clones the steemit source-code, recompiles, and re-installs.
Configuring mining accounts
To generate accounts with your wallet:
cd ~/wallet/steem
cli_wallet
>>>> suggest_brain_key
The steem wallet will generate a new random private key for you to use:
suggest_brain_key
{
"brain_priv_key": "SUEDE TETRIC FUZZILY BLICK AMANDIN NUMBING BICYCLE BARPOST OUTFLY ...",
"wif_priv_key": "5J8EBoJv42M6Eg2wX9ApwsZQsAoTAEwKfqAqjjZYX3UmK3Pa9XJ",
"pub_key": "STM7NZ9DQXaSRDH9z4MUHkx31axQhngUdwgJ3F5udNQN8aYBCDJy2"
}
Copy the wif_priv_key, that's your miner's private key.
Choose an account name that isn't taken on #steemit. Check the website to make sure.
Edit /var/local/steemd/configs/config.miner.ini. Find the area that looks like:
# name of miner and its private key (e.g. ["account","WIF PRIVATE KEY"] )
# BEGIN MINERS
#miner = ["MINER-NAME","MINER-WIF-KEY"]
# END MINERS
Uncomment the miner = line and fill it in with your account information. It should look like:
miner = ["etherqueen", "5J8EBoJv42M6Eg2wX9ApwsZQsAoTAEwKfqAqjj ..."]
Now edit the /var/local/steemd/configs/config.witness.ini file.
Repeat the exact same steps as above for the miner = line.
Find the area that looks like:
# name of witness controlled by this node (e.g. initwitness )
# BEGIN WITNESSES
#witness = "MINER-NAME"
# END WITNESSES
Uncomment the witness = line and fill it in with your account information. It should look like:
witness = "etherqueen"
Repeat these steps for each additional account that you wish to use. Remember to save the wif_keys.
How to handle a Hard Fork
First, SSH into your machine with your login user. Then ...
sudo su frog # maintenance account
cd # /home/frog
sudo service steemd stop
sudo ~/bin/recompile-steemd.bash # will install as well
sudo ~/bin/replay-steemd.bash # will run replay in synconly mode until killed
You'll see the steemd log as it replays the database then syncs. Once sync'd completely, CTL-C to kill steemd. Then ...
sudo ~/bin/config-steemd.bash miner
sudo service steemd start
Multiple mining accounts
Once your miner finds a POW (proof-of-work), it gets placed on the bottom of the miner-witness queue seen at steemd.com. While on that queue that miner account is on timeout; it cannot be used to mine. So, you'll need at least two accounts. Preferably, the same number accounts as the total number of POWs that you find on average in a 3 hour window.
Once your miner reaches the top of the queue, it's allowed to act as a Witness once and generates 1 block (or misses its turn) for which you receive 1 STEEM in the form of VESTS.
After that, the miner account is available to use again. |
The next miner on the queue will then generate the next block, and so on.
Multiple mining machines
You can run multiple machines with the same pool of mining accounts, with one very important caveat:
Thou shalt not double-witness.
You must have one and exactly one machine that includes the witness = configuration. All other machines cannot include witness configs, and must be purely miner = configs.
You can use the ~/bin/config-steemd.bash <miner/witness/synconly> command to switch between the two.
If you get caught double-witnessing, you will be flayed, beaten, and impaled. No big deal, really.
Changelog
version | date | changes |
---|---|---|
v0.0.0 | 2016-07-21 |
|
v1.0.0 | tbd |
|
License (MIT)
Copyright (c) 2016 Roy Laurie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.