What is Mining?

Glossary: How does cryptocurrency mining work? / Miners keep the network secure / What is PoW? / What is a mining pool?

Cryptocurrency mining is the process in which transactions between users are verified and added to the blockchain public ledger. The mining process is the result of introducing new coins into the circulating supply and is the key element that allows for cryptocurrencies to work as a peer-to-peer decentralized network, without the need for a centralized third-party controlling it.

A miner is a node in the network that collects transactions and organizes them into blocks. Whenever transactions are made, all network nodes receive them and verify their validity. Then, miner nodes gather these transactions from the memory pool and begin assembling them into a block.

 


peer to peerSo how does cryptocurrency mining work?

The first step of mining a block is to individually hash (which is an algorithm that turns an arbitrarily-large amount of data into a fixed-length hash) each transaction taken from the memory pool, but before starting the process, the miner node adds a transaction where they send themselves the mining reward (block reward).

After every transaction is hashed, the hashes are then organized into something called a Merkle Tree (or a hash tree) – which is formed by organizing the various transaction hashes into pairs and then hashing them. The outputs are then organized into pairs and hashed once again, and the process is repeated until “the top of the tree” is reached.

The root hash along with the hash of the previous block and a random number called nonce (which is a 32-bit field whose value is adjusted by miners so that the hash of the block will be less than or equal to the current target of the network) is then placed into the block’s header.

The block header is then hashed producing an output based on those elements (root hash, previous block’s hash, and nonce) plus a few other parameters. The resulting output is the block hash and will serve as the identifier of the newly generated block.

In order to be considered valid, the output (block hash) must be less than a certain target value that is determined by the protocol. In other words, the block hash must start with a certain number of zeros. The target value, also known as the hashing difficulty, is regularly adjusted by the protocol, ensuring that the rate at which new blocks are created remains constant and proportional to the amount of hashing power devoted to the network.

Therefore, every time new miners join the network and competition increases, the hashing difficulty will raise, preventing the average block time from decreasing. In contrast, if miners decide to leave the network, the hashing difficulty will go down, keeping the block time constant even though there is less computational power dedicated to the network.

 


bitcoin minersMiners keep the network secure

Miners secure the Bitcoin network by making it difficult to attack, alter or stop. The more miners that mine, the more the secure the network. The only way to reverse Bitcoin transactions is to have more than 51% of the network hash power. Distributed hash power spread among many different miners keeps Bitcoin secure and safe.

To successfully attack the Bitcoin network by creating blocks with a falsified transaction record, a dishonest miner would require the majority of mining power so as to maintain the longest chain. This is known as a 51% attack and it allows an attacker to spend the same coins multiple times and to blockade the transactions of other users at will.

In order to do this, an attacker needs to own more mining hardware than all other honest miners. This imposes a high monetary cost on any such attack. At this stage of Bitcoin’s development, it’s unlikely that such an attack will occur as it’s unclear what benefit a bad actor would gain from degrading or destroying Bitcoin.

The network has been designed to be protected by the work that cryptocurrency miners conduct and therefore given the opportunity of receiving a reward for mining the block.

While the block reward is granted to the miner who discovers the valid hash first, the probability of finding the hash is equal to the portion of the total mining power on the network. Miners with a small percentage of the mining power stand a very small chance of discovering the next block on their own.

 


What is PoW?

A proof of work is a piece of data which was difficult (costly, time-consuming) to produce so as to satisfy certain requirements. It must be trivial to check whether data satisfies said requirements.

Producing proof of work can be a random process with a low probability, meaning that a large sum of trial and error is needed on average before a reliable proof of work is generated. One implementation of this concept is to use hashcash as a means to avoid email spam, allowing proof of work on the contents of the email (including to the address) on each post.what is pow

Legitimate emails will be able to do the work to generate the proof easily (not much work is required for a single email), but mass spam emailers will have difficulty generating the required proofs (which would require huge computational resources).

Hashcash proofs of work are used in Bitcoin for block generation. Proofs of work that are tied to the data of each block are required for the blocks to be accepted. The [difficulty of this work](/what-is-bitcoin-mining-difficulty/) is adjusted so as to limit the rate at which new blocks can be generated by the network to one every 10 minutes.

Due to the very low probability of successful generation, this makes it unpredictable which worker computer in the network will be able to generate the next block.

For a block to be valid it must hash to a value less than the current target; this means that each block indicates that work has been done generating it. Each block contains the hash of the preceding block, thus each block has a chain of blocks that together contain a large amount of work.

Changing a block (which can only be done by making a new block containing the same predecessor) requires regenerating all successors and redoing the work they contain. This protects the block chain from tampering.

The most widely used proof-of-work scheme is SHA-256, which was introduced by Bitcoin. Some other hashing algorithms that are used for proof-of-work include scrypt, Blake-256, CryptoNight, HEFTY1, Quark, SHA-3, scrypt-jane, scrypt-n and combinations.

 


What is a mining pool?

Mining pools are created to solve this problem. It means pooling of resources by miners, who share their processing power over a network, to split the reward equally among everyone in the pool, according to the amount of work they contribute to the probability of finding a block.

bitcoin mining poolPoolin.com allows you to connect with other miners who more or less can share their knowledge about the mining process. Memberships also provide you the chance to seek new opportunities by connecting with members in the Poolin community.

At its core, mining is the process by which computational power (hash power) is used in an attempt to unlock a block in a blockchain. Each block unlocked provides a reward. The more attempts (hashes) you can perform per second, the higher the probability that you will obtain the reward. Because miners by themselves typically don’t have enough hashing power to frequently find blocks, they join a pool that combines the hash power of multiple miners to hash blocks.

With greater collective hashing power, it is easier to find blocks with decreased variance. The reward is split among the miners relative to the proportion of hash power that they contributed to the pool.

 


 

Bitcoin WhitePaper 

 

Comments 10

  1. g our says:

    WOW just what I was searching for. Came here by searching for g first

  2. g they says:

    I’ve been browsing on-line greater than 3 hours nowadays, but I
    by no means discovered any fascinating article like yours.

    It’s lovely value sufficient for me. Personally, if all web owners and bloggers made excellent content material as you did, the net will be much more useful than ever
    before.

  3. in g says:

    Hey very nice web site!! Guy .. Excellent .. Wonderful ..
    I will bookmark your web site and take the feeds also?
    I am satisfied to search out so many helpful information here within the put up, we’d like work out more techniques
    in this regard, thanks for sharing. . . . . .

  4. I like the helpful info you provide in your articles.
    I will bookmark your blog and check again here regularly.
    I am quite certain I will learn many new stuff right here!
    Good luck for the next!

  5. Does your site have a contact page? I’m having problems locating it but, I’d
    like to send you an e-mail. I’ve got some recommendations for your blog you might be interested
    in hearing. Either way, great website and I look forward to seeing it
    expand over time.

  6. It is perfect time to make some plans for the future and it’s time to be happy.
    I’ve read this post and if I could I wish to
    suggest you some interesting things or suggestions. Perhaps you can write next articles referring to this article.
    I wish to read even more things about it!

  7. Pretty! This has been an extremely wonderful article.

    Thanks for supplying this information.

  8. My relatives every time say that I am killing my time here at net, except I know I am getting familiarity daily by reading thes pleasant posts.

  9. We are a group of volunteers and opening a new scheme in our community.
    Your website offered us with valuable information to work on. You have done a formidable job and our entire community will
    be grateful to you.

  10. It’s nearly impossible to find knowledgeable people in this particular subject, however, you sound like you know what
    you’re talking about! Thanks

Leave a Reply

Your email address will not be published.