Beam is a new crypto-currency which aims for strong privacy and scalability. It uses the “MimbleWimble” approach, which you can learn more about here. The Beam Mainnet launched today, so if you are interested in mining it, here are some short instructions on how to do so on Digital Ocean
Warning: CPU mining BEAM is pretty much useless due to GPU mining, so you are highly unlikely to earn any beam; running a full node helps keep the network strong, so it doesn’t hurt either way!
Set up a Server
Setup a new Node on Digital Ocean running 18.04. Note, I found that 1GB was not even enough for 1 Mining thread. If you really want to CPU mine, you will need at least 2gb. Now lets SSH in:
Now upgrade and install what you need
apt-get update apt-get upgrade apt-get install curl vim git-core haveged fail2ban ntp build-essential supervisor # Setup a simple firewall: ufw default deny incoming ufw default allow outgoing ufw enable # Now let us open a port for a Beam node: ufw allow in to any port 10000
Lets add some swap space to prevent memory issues. Digital Ocean will hate you for this. Sorry Digital Ocean, you guys rock!
sudo fallocate -l 4G /swapfile mkswap /swapfile swapon /swapfile echo ‘/swapfile none swap sw 0 0’ | sudo tee -a /etc/fstab
Create a Beam Wallet
Following the instructions here it seems first we need to run the wallet to create an account.
# 1. Download the wallet wget https://github.com/BeamMW/beam/releases/download/mainnet-release/linux-beam-wallet-cli-1.0.3976.tar.gzsha256sum linux-beam-wallet-cli-1.0.3976.tar.gz# b6be6f95848ba439ea3d1f17da0d5523d7087abbe973fdbe584c56bfff8a1b2a linux-beam-wallet-cli-1.0.3976.tar.gz # Compare your sha256 to https://www.beam.mw/downloads
Unzip the wallet and get a key/secret pair. You are going to want to save the output of all the following info somewhere safe (a.k.a not on your desktop).
tar -zxf linux-beam-wallet-cli-1.0.3976.tar.gz ./beam-wallet init # Enter a secure password, and SAVE EVERYTHING HERE SOMEWHERE SAFE! ./beam-wallet export_owner_key I 2019-01-03.15:05:17.525 Rules signature: ed91a717313c6eb0 I 2019-01-03.15:05:17.525 starting a wallet... Enter password: ******************** Owner Viewer key: XXXXX ./beam-wallet export_miner_key --subkey=1 I 2019-01-03.15:12:57.828 Rules signature: ed91a717313c6eb0 I 2019-01-03.15:12:57.828 starting a wallet... Enter password: ******************** Secret Subkey 1: XXXXXXX
Now we need to download the node and mine!
wget https://github.com/BeamMW/beam/releases/download/mainnet-release/linux-beam-node-1.0.3976.tar.gzsha256sum linux-beam-node-1.0.3976.tar.gz # d9bb70066f77df8862d34a4050fd267eeb11c3ae4399075de4a9c033ac3b77a1 linux-beam-node-1.0.3976.tar.gz # Compare your sha256 to https://www.beam.mw/downloads# Unzip and quickly test everything is good: mkdir /root/history tar -zxf linux-beam-node-1.0.3976.tar.gz ./beam-node --port 10000 --mining_threads=2 --file_log_level info key_mine=EXPORT_MINER_KEY key_view=EXPORT_OWNER_KEY --pass=PASSWORD storage=/root/node.db --history_dir=/root/history/ miner_type=cpu --peer eu-node01.mainnet.beam.mw:8100
Be sure to replace the Miner key and owner key from the wallet step. You should see something like this if all is going well:
I 2019-01-03.15:25:55.369 Rules signature: ed91a717313c6eb0 I 2019-01-03.15:25:55.372 starting a node on 10000 port... I 2019-01-03.15:25:55.373 Node ID=d6d62d2b90c207a8 I 2019-01-03.15:25:55.373 Initial Tip: 0-0000000000000000 I 2019-01-03.15:25:55.373 Requesting block 0-0000000000000000
Now press CTRL+C to exit the process. We will make it a background task
Setup a background task to mine
Now to be sure that you continue to mine in case your server restarts, use supervisor to keep the node running:
vi /etc/supervisor/conf.d/beam.conf [program:beam] command=/root/beam-node --port 10000 --mining_threads=2 --file_log_level info key_mine=EXPORT_MINER_KEY key_view=EXPORT_OWNER_KEY --pass=PASSWORD storage=/root/node.db --history_dir=/root/history/ miner_type=cpu --peer eu-node01.mainnet.beam.mw:8100 directory=/root/ autostart=true restart=true stderr_logfile=/var/log/beam.log stdout_logfile=/var/log/beam.log stdout_logfile_maxbytes=5MB stderr_logfile_maxbytes=5MB stdout_logfile_backups=2 stderr_logfile_backups=2
Now after you save and exit from vim, lets start up the daemon and rest easy:
supervisorctl supervisor> reread beam: available supervisor> update supervisor> start all supervisor> status beam RUNNING pid 19204, uptime 0:00:06 supervisor> exit
You can check out the logs if you like:
If you want to check your balance, just run this command
./beam-wallet info -n localhost:10000 ____Wallet summary____Current height............1818 Current state ID..........929bee0adb1bdf02Available.................0 groth Maturing..................0 groth In progress...............0 groth Unavailable...............0 groth Available coinbase .......0 groth Total coinbase............0 groth Avaliable fee.............0 groth Total fee.................0 groth Total unspent.............0 groth
Like I said earlier, you’re highly unlikely to actually mine anything. Happy mining! We look forward to adding beam to faa.st soon!