How to mine AfterEther

To mine AfterEther you will need geth.
You can download precompiled geth binary or build it yourself.

1. Using precompiled binary

Step 1. Download AfterEther binaries

Only Linux 64 bit binaries are available at this time. They will run on most linux distributions.

Download v1.7.2-bin.tar.gz from our GitHub repository

Step 2. Uncompress the tar file

tar zxf v1.7.2-bin.tar.gz
cd v1.7.2-bin

Step 3. Initialize the blockchain

./geth init afterether-genesis.json
            
This command will set up the directory $HOME/.afterether with all the required files, if you want to change it use --datadir option.

Step 4. Create an account

./geth account new
If you already have an account, just copy the account file to $HOME/.afterether/keystore or wherever your datadir is.

Step 5. Start geth

./geth console
A Javascript console will be opened, you can execute any javascript function listed in Ethereum Javascript API, including mining functions.

Step 6. Start mining

>eth.coinbase=[YOUR ACCOUNT ADDRESS]
>miner.start(1)
The first command will set your newly created account to be the owner of all mined coins. The second will start 1 mining thread. To stop mining use miner.stop() function

2. Compiling geth from sources

This step will require C and Go compilers installed on your Linux box.

Step 1. Download Ethereum

Download Ethereum v1.7.2 release

https://github.com/ethereum/go-ethereum/archive/v1.7.2.tar.gz

Untar all the files:
tar zxf go-ethereum-1.7.2.tar.gz
cd go-ethereum-1.7.2

Step 2. Download AfterEther patch


Download go-afterether-v1.7.2.diff .

Put this file into go-ethereum directory.

Step 3. Apply AfterEther patch

patch -p1 < go-afterether-v1.7.2.diff

Step 4. Build Ethereum

Make sure your $GOROOT environment variable points to Go installation on your Linux distribution, and then type:
make all

Step 5. Initialize the blockchain

build/bin/geth init afterether-genesis.json
This command will create all the files in $HOME/.afterether , if you want to change it use --datadir option.

Step 6. Create an account

build/bin/geth account new
If you already have an account, just copy the account file to $HOME/.afterether/keystore or wherever your datadir is.

Step 7. Start geth

build/bin/geth console
A Javascript console will be opened, you can execute any javascript function listed in Ethereum Javascript API, including mining functions.
Now, wait a few seconds until you see this message:
INFO [10-29|13:40:13] Block synchronisation started 
It means, blockchain is being downloaded, wait until it finishes.

Step 8. Start mining

>eth.coinbase=[YOUR ACCOUNT ADDRESS]
>miner.start(1)
The first command will set your newly created account to be the owner of all mined coins. The second will start 1 mining thread. To stop mining use miner.stop() function.