MINERS: HOW THEY KEEP THE BLOCKCHAIN SAFE!

Hi guys! Today I want to share with you a very common concept in the bitcoin world which I have been seeing a lot and I didn´t know what was about. I´m talking about “mining”:

Mining is the process of adding transaction records to Bitcoin's public ledger of past transactions. This ledger of past transactions is called the blockchain as you may know and contains all Bitcoin transactions that have been executed and is organized as blocks, a set of recordings of part of all the recent transactions which, once it is completed goes into the blockchain as a permanent database and a new block is created. These blocks are constantly being added in a linear, chronological order with every block containing a hash of the previous block, like a chain (BLOCKCHAIN).

It can be used to explore any transaction made between any bitcoin addresses, at any point and time on the network. A constantly updated copy of the block is given to everyone who participates, so that they know what is going on.
But a general ledger has to be trusted, and all of this is held digitally. How can we be sure that the blockchain stays intact, and is never tampered with, for example, spending the same bitcoin twice ? This is where the miners come in.

When a new block of transactions is created, miners put it through a process and applying a mathematical formula, they turning it into a shorter and ramdom sequence of numbers and letters known as hash which is stored at he end of the blockchain at that time.

It’s easy to produce a hash but it’s practically impossible to work out what the data was just by looking at it. Every hash is unique. Each block hash is produced using the hash of the block before it, so if you try to tamper with one hash the previous one will automatically change, everyone will know and The block would be instantly spotted as a fake.
Competing for coins
So, that’s how miners ‘seal off’ a block. They all compete with each other to do this, using software written specifically to mine blocks. Every time someone successfully creates a hash, they get a reward, the blockchain is updated, and everyone on the network hears about it. That’s the incentive to keep mining, and keep the transactions working.

It´s very easy to produce a hash from a collection of data using a computer, the bitcoin network has to make it more difficult, otherwise everyone would hash hundreds of transactions blocks each second. So the bitcoin protocol also introduce the “proof of work” Every hash must contains a certain number of zeros at the beginning.

Miners aren’t supposed to meddle with the transaction data in a block, but they must change the data they’re using to create a different hash. They do this using another, random piece of data called a ‘nonce’. This is used with the transaction data to create a hash. If the hash doesn’t fit the required format, the nonce is changed, and the whole thing is hashed again. It can take many attempts to find a nonce that works, and all the miners in the network are trying to do it at the same time. That’s how miners earn their bitcoins.

The first miner to find the solution announces it to others on the network. The other miners then check whether the sender of the funds has the right to spend the money, and whether the solution to the puzzle is correct. If enough of them grant their approval, the block is cryptographically added to the ledger and the miners move on to the next set of transactions (hence the term “blockchain”).

Sort:  

Congratulations @jose-alberto! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of posts published

Click on any badge to view your own Board of Honnor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.23
TRX 0.22
JST 0.036
BTC 98537.12
ETH 3353.21
USDT 1.00
SBD 3.15