My Notes on Blockchain

James Borwick
3 min readOct 23, 2020

Put simply, a blockchain is a distributed database, which stores records of values and transactions. Almost anything can be recorded on the blockchain. Most transactions would normally require some sort of intermediary to provide trust, security, and to facilitate the transactions. An intermediary is a person or organisation who acts as a link between two parties (i.e. banks, financial institutions etc.). Blockchain technology removes the need for an intermediary, allowing people to transact directly with each other. Bitcoin is probably the most well known blockchain-based system.

A library holds the central database of all their books. There’s a particular book which you’d like to read and the library agrees to notify you when it becomes available. The library is the intermediary. The person who is currently borrowing the book you want to read lives in the house next to you. Do you think it’s necessary for your neighbour to return the book to the library once they’ve finished reading it, or would it make more sense to pass it over the garden fence to you? I think you’ll agree that passing the book over the garden fence makes more sense in this example. This is the idea behind blockchain; eliminate the intermediary. Because the blockchain is immutable, it can be trusted, and this eliminates the need for an intermediary.

How It Works

Each transaction or group of transactions creates a new block on the blockchain. The new block (block 2) is then added on top of the previous block (block 1). Block 2’s hash is generated by using block 1’s hash. This is what makes altering the blockchain so difficult. If someone were to make an alteration to block 1, they would also need to change block 1’s hash. Block 2’s hash would also need changing as a result of this. Block 3’s hash would also need changing, and so on… To change a transaction included in a block, each new block would have to be re-mined with new hashes faster than the rest of the network is adding blocks. It is generally accepted that once 6 blocks have been added on top of a block of transactions, it becomes computationally impossible to alter transactions in that block.

Bitcoin

A new block is added to the bitcoin blockchain every 10 minutes. Other blockchains can add blocks faster than this. The bitcoin network is over 10,000 times more powerful than the world’s top 500 supercomputers combined, and many people are critical of this wastefulness. They argue that this computing power could be used to solve world changing problems rather than just computing random numbers. There will eventually be a maximum of 21 million bitcoins, at which point mining will no longer be required. This is a fixed number, and it is likely that after this point each bitcoin will be divided up into floating point numbers.

Bitcoin mining is sometimes referred to as proof-of-work. The Ethereum blockchain uses a different method called proof-of-stake which is less wasteful. Bitcoin miners use a nonce (number used once) to try and generate a hash with a lower value than the hash in the block which came before it. The nonce is the answer to the puzzle that the miners must solve in order to add a valid block to the blockchain and earn their reward. If the generated hash is a higher value, the miner must choose a new nonce and run the calculation again until a lower hash value is generated. This is a random game of chance. When a lower hash is generated the miner adds a valid block to the blockchain, receives the transaction fees and the block reward. Miners tend to choose transactions which payout higher fees. Essentially, the miners are rewarded for their computing and electricity contributions to the blockchain network.

--

--