What is blockchain
How does blockchain work?
A blockchain is an ever-growing set of data blocks.
Each block records a series of transactions, which are not stored on a centralised computer database, but are instead distributed across myriad computers. Each computer records a copy of the blockchain transactions.
Part of blockchain’s appeal is both security and its immutability – the data is tamper-proof. Each transaction is recorded using cryptography, a mathematical method to keep data secret and prove identities.
Cryptography involves hashing, which reduces any set of data to a unique series of 64 characters. If you liken a hash to a fingerprint, it becomes easier to understand. It is unique and specific to the data within the block. Rather cleverly, it also includes a link to the finger print of the previous block in the chain.
There are many algorithm programmes to generate hash codes, but it is considered virtually impossible to extract the related data from the hash. If just one character is even slightly tweaked, it will result in a completely different hash.
This would become immediately apparent as it would no longer relate to the previous block. Compare this with a book ledger, or even an online ledger, where it is possible to delete a complete page and replace it with a dummy page with different data. It might take days, or even months, before these alterations are noticed, or maybe not at all.
What is mining? Mining is the process by which the blocks are locked onto the blockchain. As transactions are announced on a blockchain network, related computers compete to solve the complex mathematical puzzle. They need to find a number that, when combined with the data in the block and passed through a hash function, produces a result that is within a certain range.
This is not as easy as it may sound, as it really involves guessing at a selection of random numbers. It takes on average ten minutes to solve each puzzle. The result is known as a nonce, a ‘number used once’.
In the case of bitcoin, the nonce is an integer between zero and 4,294,967,296 The successful computer announces it to the network. Other miners on the network immediately stop working on the puzzle, and instead work to verify that the assets in question have not been previously sold. Each block generally contains four pieces of information: a reference to the previous block, a summary of the included transactions, a date stamp and Proof of Work, that went into creating the secure block. As reward for solving the puzzle, the computer is paid crypto currency.