kian bradley's blog

How to Solo-mine WhaleCoin

WhaleCoin is a new cryptocurrency designed to power a decentralized social network. It launched on September 4th with mining open to all from the beginning.

WhaleCoin is a fork of ethereum, and the project has their own version of geth, called gwhale. It's new enough that (as of September 2017) you can still profitably solo-mine, without using a pool. You'll need to

  • generate an address and private key (or, use an existing Ethereum address/key)
  • start a gwhale node
  • change some settings in gwhale to set the payout address
  • connect to your node, and start mining with Ethminer

This tutorial assumes you're using Linux.

Building gwhale

There are no prebuilt binaries for gwhale, so you'll have to build it yourself.

Update, then install go:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
curl -O
tar -xvf go1.8.3.linux-amd64.tar.gz
sudo mv go /usr/local

Modify ~/.profile to add the go binary to your PATH:

vim ~/.profile

Add this line to the bottom of the file:

export PATH=$PATH:/usr/local/go/bin

Save the file, then source it:

source ~/.profile

Finally, build WhaleCoin

git clone
cd WhaleCoin
make gwhale

Set up wallet in gwhale

You can either create a new wallet, or import an existing one.

Creating a new wallet

./build/bin/gwhale account new

Importing an existing private key

Create a file containing the private key:

vim ~/privatekey.txt

Then, import it

./build/bin/gwhale import ~/.privatekey.txt

Importing an existing JSON account file

Simply copy the .json file to ~/.whalecoin/keystore/ (you may have to create this directory if it doesn't exist yet.)

Starting and configuring gwhale

Starting the node

Start the node with RPC, allowing connections from localhost only:

./build/bin/gwhale --rpc --rpcaddr "" --rpcport "8545" --rpccorsdomain "*" --rpcapi "personal,db,eth,net,web3"

Alternatively, you can allow connections from remote machines. (if you do this, be careful! only do this if your network is firewalled, as anyone can access your wallet!)

./build/bin/gwhale --rpc --rpcaddr "" --rpcport "8545" --rpccorsdomain "*" --rpcapi "personal,db,eth,net,web3"

Configuring for mining

Open a new terminal window, enter this command to connect to gwhale:

./build/bin/gwhale attach

Enter this command to set your payout address (also known as the etherbase, or coinbase):

miner.setEtherbase("YOUR ETH ADDRESS")

And optionally, set the extra data included with each block. By default this is something like 'geth/go1.7.4/linux', but you can change it if you want.


The full list of commands is available here:

Connecting with ethminer

Download the latest version of ethminer, if not already installed:

extract it

tar xvf ethminer-0.12.0rc1-Linux.tar.gz

And finally, start solo mining. If gwhale is running locally, use 'localhost' for the ip.

./bin/ethminer -G -F http://[ip address of node]:8545

How do I tell if I mined a block?

Whalecoin explorer

The easiest way to tell is by keeping and eye on your address at

Gwhale output

In the gwhale node output window, you'll see the following:

INFO [09-12|09:39:32] mined potential block                  number=23791 hash=210ec7...eb085a

And then, once it is accepted into the blockchain:

INFO [09-12|09:41:29] block reached canonical chain          number=23791 hash=210ec7...eb085a

Ethminer output

In the ethminer output window, you'll see the following:

09:39:09|ethminer  Solution found; Submitting to http://localhost:8545 ...
09:39:09|ethminer    Nonce: 3976102000210460399
09:39:09|ethminer    headerHash: 2d5cae94000ce88c84775fb902d08fa4d651890cbf47bdad40c63f63dfd12acc
09:39:09|ethminer    mixHash: 1c11ed774735393c8ba9c1de2448f0035e1fe3170913455e31ef27e1c08025e6
09:39:09|ethminer  B-) Submitted and accepted.

posted 2017-09-13 22:54:29