News:

Are you new to Groestlcoin and have questions you are afraid to ask?
Check out the New Users board and post there.
Welcome to all newcomers.

Main Menu

How mining and the block chain works

Started by jackielove4u, June 21, 2014, 12:21:21 AM

Previous topic - Next topic

jackielove4u

This guide will help people new to mining get up to speed on how the blockchain works.

Where Groestlcoins come from.
Coins are created by "solving a block." A "Block" is just a collection of transactions that have been hashed and added to the official chain. The "confirmations" the you get when you send or receive a transaction is the result of your transaction being hashed and included in the block chain.
Since solving a block is so difficult, you get a reward for doing so... 25 Groestlcoins.

How do I solve a block? It's a lottery of shares.
To complete a new block your, computer running mining software tries to guess the hash of the new block based off the hash of the old block. You aren't really computing the answer to an equation per say. You are just making a guess. The thing you have to remember about block is that there is no "percent complete." A block is never 45% or 75% solved. It's either solved or not.  In fact, it helps to look at this like buying lottery tickets. The chances of winning the lottery are low, but  you can increase you odds if you buy more tickets (by adding more hashes).
Your miners compute hashes against the current block and when it thinks it has a potential winner, it submits it as a share. Hashes are generally measured in number of Khases/sec or Mhashes/sec. This would be thousands of hashes per second or millions of hashes per second (respectively). For example an R9 290 tri-x video card can compute roughly 9 to 17 mhash/sec depending on how you configure it.
The share you submitted is sent across the entire network. All peers must agree if a share is the winner.

Solving blocks is difficult.
The percent chance that a single hash will be the winner is determined by the current Difficulty.
This changes every block and goes up or down based on how fast the previous block were solved. Groestlcoin is supposed to have blocks solved once every minute. If blocks are being solved faster than this, then the difficulty will increase at the next block limit to slow it down back to 1 minute. Conversely, if blocks are being solved slower than this, the difficulty will be lowered to increase the block solve speed.

Orphans/Invalids
Even though the odds are so high to solve a block, there is a potential for two clients to submit a winning share at the same time. When this happens, the network chooses the definitive winner. The loser's block is then orphaned from the blockchain and declared invalid. Invalid blocks are a rare occurrence, but it does happen.

Increase your chances with Mining Pools
Since the probability of the average home computer to find the correct hash is so slim, people "pool" their resources together--in much the same way an office might buy several lottery tickets together.
You along with all the others in the pool submit shares. Pools are operated by groups, or individuals and are kept alive by taking a small cut of your profits (Fees).
- Pay Per Last Number of Share (PPLNS) and Proportional (Prop)
When a block is solved among one of the pool members, the 25 groestlcoin reward is split among all those who submitted shares during that round. The more shares you submit, the larger your portion of the reward.
Rewards are based on the overall luck of the pool. If the pool happens to solve many blocks in a row, you rewards are much higher.
- Pay Per Share (PPS)
The pool keeps all the block rewards, but pays rewards as a set fee to the miner for each share submitted.
Reward fees per share are based on the current Difficulty. The higher the difficulty, the lower the fee paid to the miner. Miners don't have to worry about the luck involved with solving a block (however, the pool operator does).

Bad Things - Stale Shares and Idles
When you belong to a pool, you are trying to solve a block that the pool has relayed to you:
The Pool gets the current block from the network.
It sends your miner that information.
Your miner works on it.
Your miner submits shares it thinks will be potential winners.
If a block is solved elsewhere on the network, the pool must tell your miner to stop what it is doing and start work on the new block, this is called Stratum.
If your miner does not get this new block information, it will continue to work on submitting shares for the previous block. When this happens, your shares are stale and do not count for anything. A small amount of stale shares are normal.
If the pool does not send any block information to your miner, it will become idle and not do anything (not contributing).
The best way to fix any of these problems on the miner end is to stop--and restart the miner software. It will then submit a new request for new block information from the pool.

So, now you know what your miner is doing while it is.... mining.