Skip to content

Mining

What does it mean to mine Ethereum?

Mining is the process of creating a block of transactions to be added to the Ethereum blockchain. Miners essentially process pending transactions and are awarded block rewards in the form of Ether, the Ethereum network's native currency, for each block generated. Generating a block requires intensive computational work (or hashing power) due to the difficulty set by the Ethereum network protocol. This difficulty level is proportional to the total amount of computational power (also known as the total hashrate of the network) being used to mine Ethereum and serves as a way to secure the network from attacks as well as tuning the speed at which blocks (and block rewards) are generated. This system of using hashing power generated by costly computer hardware is known as Proof of Work (PoW).

Who can become a miner on the Ethereum network?

Technically, anyone is able to mine on the Ethereum network using their computer. However, not everyone is able to mine Ether profitably. In most cases, miners must purchase dedicated computer hardware in order to mine profitably. While it is true anyone can run the mining software on their computer, it is unlikely that the average computer would be able to earn enough block rewards to cover the associated costs of mining (See question below for more details).

What are the costs associated with mining?

  • Potential costs of the hardware necessary to build and maintain a mining rig
  • Electrical cost of powering the mining rig
  • If you are mining in a pool, mining pools fees typically charge a flat % fee of each block generated by the pool
  • Potential cost of equipment to support mining rig (ventilation, energy monitoring, electrical wiring, etc.)
  • Tax obligations may vary by jurisdiction (For example, block rewards are considered gross income by the IRS)

Mining profitability calculators, such as CoinWarz, CryptoCompare, and EtherScan, can be helpful in determining if you may be able to mine profitably. Note that mining calculators may not 100% accurate and it may be useful to compare and contrast several results.

Where can I find the latest information on mining?

How much longer will Ethereum mining be around?

See Serenity phases for more information.

Block Generation

Block structure

Diagram of an Ethereum Block

A block consists a header, which includes information identifying the block and linking it to the rest of the chain, and a body of transactions. Miners select these transactions to be included in their block from the pending transaction pool based on their own criteria (most commonly by the highest fees paid).

Block times

The Ethereum network is designed to produce a block every 12 seconds. Block times will vary based upon how long it takes miners to generate a hash that meets the required mining difficulty at that moment. 12 seconds was chosen as a time that is as fast as possible, but is at the same time substantially longer than network latency. A 2013 paper by Decker and Wattenhofer in Zurich measured Bitcoin network latency and determined that 12.6 seconds is the time it takes for a new block to propagate to 95% of nodes. The goal of the 12 second design is to allow the network to propagate blocks as fast as possible without causing miners to find a significant number of stale blocks.

Etherscan example explained

All of the following examples are based on this block.

Height:

This number is the current number of blocks that exist in the Ethereum blockchain

Example: 6969122

TimeStamp:

The UNIX timestamp for when the block was collated

Example: 29 secs ago (Dec-28-2018 05:01:54 PM +UTC)

Transactions:

The transactions included in the block

Example: 43 transactions and 91 contract Internal Transactions in this Block

Hash:

The hash of the block itself

Example: 0xa6312ebbcea717972344bc598c415cb08e434c01b94d1c2a9b5415624d2c2b81

Parent Hash:

The hash of the block from which this block was generated, also known as its parent block.

Example: 0xa48e2ad13de011f127b345a81a91933d221f5a60d45852e7d7c2b5a07fda9fe2

Sha3Uncles:

A SHA3 hash of the uncle block data included in the block

Example: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347

Mined By:

The address of who mined the block and received the block reward

Example: 0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c (SparkPool) in 2 secs

Difficulty:

A number that represents the difficulty required to mine this block

Example: 2,511,265,102,818,605

Total Difficulty:

A number that represents the total mining difficulty of the chain up until this block

Example: 8,470,035,190,867,378,349,872

Size:

The size of the block file in bytes

Example: 13160 bytes

Gas Used:

The total amount of gas used by all the transactions included in this block

Example: 7,997,769 (99.97%)

Gas Limit:

The total limit of the amount of gas that could have been used by all transactions included in this block

Example: 8,000,029

Nonce:

A hash of the generated proof-of-work. This value will be null when a block is pending

Example: 0x1510f53c063f9669

Block Reward:

The total amount of Ether (ETH) given to the address which mined this block. This value includes the total block reward issued by the protocol combined with the fees/gas paid by all the transactions included in this block

Example: 3.032755182184797136 Ether (3 + 0.032755182184797136)

Uncles Reward:

The total amount of Ether (ETH) awarded to the uncle blocks included in this block

Example: 0

Extra Data:

This is an optional 32-byte value that can be used for storing information on the blockchain. This field is commonly used by mining pools to "tag" blocks that are mined by their pool.

Example: sparkpool-eth-cn-hz2 (Hex:0x737061726b706f6f6c2d6574682d636e2d687a32)

Uncle Blocks

Uncle blocks are stale blocks that are included in the calculation of which chain is the "longest"; that is to say, not just the parent and further ancestors of a block, but also the stale descendants of the block's ancestor (in Ethereum jargon, "uncles") are added to the calculation of which block has the largest total proof of work backing it. Block rewards are given to stales: a stale block receives 87.5% of its base reward, and the nephew that includes the stale block receives the remaining 12.5%. Transaction fees, however, are not awarded to uncles.

Ethereum implements a simplified version of GHOST which only goes down seven levels. Specifically, it is defined as follows:

A block must specify a parent, and it must specify 0 or more uncles

  • n uncle included in block B must have the following properties:
  • It must be a direct child of the k-th generation ancestor of B, where 2 <= k <= 7.
  • It cannot be an ancestor of B
  • An uncle must be a valid block header, but does not need to be a previously verified or even valid block
  • An uncle must be different from all uncles included in previous blocks and all other uncles included in the same block (non-double-inclusion)
  • For every uncle U in block B, the miner of B gets an additional 3.125% added to its coinbase reward and the miner of U gets 93.75% of a standard coinbase reward.

This limited version of GHOST, with uncles includable only up to 7 generations, was used for two reasons. First, unlimited GHOST would include too many complications into the calculation of which uncles for a given block are valid. Second, unlimited GHOST with compensation as used in Ethereum removes the incentive for a miner to mine on the main chain and not the chain of a public attacker.

Resources