For those who studied a science throughout school, college and university — this article follows the same principle; what was originally said isn’t strictly true, some key technical details have been left out for simplicity.
Let’s begin with Bitcoin’s Distributed Ledger Technology. In blockchain, it is easier computationally to maintain a record of all past transactions rather than displaying the current balance of an individual’s wallet.
Let’s discuss an example. Assume the blockchain is three blocks long:
0. The genesis block in which Bitcoin was first created.
1. The first transaction, 10 Bitcoins were sent to Alice.
2. The second transaction, 5 Bitcoins were sent to Bob.
The current state of the blockchain is that Alice has 5 Bitcoin and Bob has 5 Bitcoin. However, this is read as:
“The Genisis block sent 10 Bitcoin to Alice”.
“Alice has 10 Bitcoin, sent 10 to Bob and sent 5 to Alice”.
“Bob has 5 Bitcoin”.
So, Bitcoin works in the sense that all transactions are actually linked together, you can see the chain of transactions from the genesis block to Alice, from Alice to Bob and Alice to Alice. Your transaction must be sent from a prior transaction in the chain and any change is sent back to yourself. This way all transactions are traceable and have a chain of public record.
A great example of this can be seen in this recent, $1B transaction. Notice how the receiving address consists of multiple addresses? These are essentially where the parts of bitcoin came from to create the total of 6,044.48 BTC.
Next, we dissect the components of a block in more detail:
How many Bitcoins are being sent
The public key of the person receiving
The transaction chain of where the prior bitcoin transaction has come from
Update: There is no sent from address.
The time and date of the transactions.
The block index.
The Hash has a little bit more going on than previously stated. Let’s take a look under the bonnet. The first component is all of the transactions themselves, take this example with four transactions:
First, you hash the transactions.
Second, you hash the pairs of the transactions.
Next, you hash the next set of pairs.
Then, you repeat this until there is only one hash left and for good measure… you guessed it, you hash it again. This completes the merkle root.
Now, we can see in detail why even changing one detail, in say, transaction 3 will result in a beyond unrecognisable hash for the block header. It is almost infeasible to change that detail and match every single hash from that point up until the current block header. This is the trustless system and how we can rely on it.
This information, complete with the previous article, enclosed below, should put you ahead of the majority of the population in terms of understanding how bitcoin’s transactions and a basic blockchain work.
To delve further from here, your next topic areas are Segregated Witness and the Lightning Network.
This article was originally published here and was reposted with permission.