13.06.2017 Views

Whitepaper - Ethereum Classic With Cover

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Ethereum</strong> <strong>Classic</strong> Documentation, Release 0.1<br />

> miner.hashrate<br />

712000<br />

After you successfully mined some blocks, you can check the ether balance of your etherbase account. Now<br />

assuming your etherbase is a local account:<br />

> eth.getBalance(eth.coinbase).toNumber();<br />

'34698870000000'<br />

In order to spend your earnings on gas to transact, you will need to have this account unlocked.<br />

> personal.unlockAccount(eth.coinbase)<br />

Password<br />

true<br />

You can check which blocks are mined by a particular miner (address) with the following code snippet on the<br />

console:<br />

function minedBlocks(lastn, addr) {<br />

addrs = [];<br />

if (!addr) {<br />

addr = eth.coinbase<br />

}<br />

limit = eth.blockNumber - lastn<br />

for (i = eth.blockNumber; i >= limit; i--) {<br />

if (eth.getBlock(i).miner == addr) {<br />

addrs.push(i)<br />

}<br />

}<br />

return addrs<br />

}<br />

// scans the last 1000 blocks and returns the blocknumbers of blocks mined by your coinbase<br />

// (more precisely blocks the mining reward for which is sent to your coinbase).<br />

minedBlocks(1000, eth.coinbase);<br />

//[352708, 352655, 352559]<br />

Note that it will happen often that you find a block yet it never makes it to the canonical chain. This means when<br />

you locally include your mined block, the current state will show the mining reward credited to your account,<br />

however, after a while, the better chain is discovered and we switch to a chain in which your block is not included<br />

and therefore no mining reward is credited. Therefore it is quite possible that as a miner monitoring their coinbase<br />

balance will find that it may fluctuate quite a bit.<br />

1.6.4 GPU mining<br />

Hardware<br />

The algorithm is memory hard and in order to fit the DAG into memory, it needs 1-2GB of RAM on each GPU. If<br />

you get Error GPU mining. GPU memory fragmentation? you do not have enough memory. The<br />

GPU miner is implemented in OpenCL, so AMD GPUs will be ‘faster’ than same-category NVIDIA GPUs. ASICs<br />

and FPGAs are relatively inefficient and therefore discouraged. To get openCL for your chipset and platform, try:<br />

• AMD SDK openCL<br />

• NVIDIA CUDA openCL<br />

Ubuntu Linux set-up<br />

For this quick guide, you’ll need Ubuntu 14.04 or 15.04 and the fglrx graphics drivers. You can use NVidia drivers<br />

and other platforms, too, but you’ll have to find your own way to getting a working OpenCL install with them,<br />

such as Genoil’s ethminer fork.<br />

68 Chapter 1. Contents

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!