Begin your journey in the rapidly expanding blockchain industry. Learn crypto, earn, become certified, and gain access to an unlimited number of internship opportunities.
Simply put, a blockchain is a digital ever-growing list of records on a database where data can only be added but never removed or changed. Such a list comprises many blocks of data, which are organized in chronological order and are linked and secured by cryptographic proofs.
Essentially, a blockchain is a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems. Everyone on the network has access to this ledger at any given time.
Transactions are periodically added to a blockchain inside what we call blocks. Each block in the chain contains a number of transaction information and important metadata. Every time a new transaction occurs on the blockchain, a record of that transaction is added to every participant’s ledger.
We call the structure a chain because each block’s metadata includes a piece of information that links it to the previous one. Specifically, it includes a hash of the previous block, which is more like details on the previous block. Hashing is the ‘glue’ that holds blocks together.
The hash function astronomically reduces the probability of you finding two pieces of data with the same output. Because of this, if someone attempted to modify an older block, its hash would be different because it cannot link to both the previous block and the next one all linked to it. This would automatically invalidate the older block as if the block would be changed, all the blocks that come after it would need to be changed as well.
This process makes the blockchain one of the most secured networks there is!
Since everyone on a blockchain can validate transactions and signatures with their public-key cryptography, when a new block is added, everyone’s ledger is updated through their nodes. When a node receives a block, it performs a number of checks. If anything is invalid, the block is rejected.
When a node receives a valid block, it makes its own copy of it and then propagates that block to other nodes. They then do the same until the block has spread throughout the whole network. This process is also carried out for unconfirmed transactions – that is, transactions that have been broadcast, but not yet included in the blockchain.
A blockchain's integrity is undermined if false financial information can be recorded. At the same time, there is no administrator or leader in the distributed system that maintains the ledger – so how do we ensure that participants are acting honestly?
Earlier in the technology development, Satoshi proposed a Proof of Work system, which allowed anyone to suggest a block to append to the blockchain. To put forward a block, users must sacrifice computational power to guess at a challenge set out by the protocol.
Today, Proof of Work is the most tried-and-tested scheme for achieving consensus amongst users, but it is by no means the only one. Alternatives such as Proof of Stake are increasingly being explored, although they have yet to see proper implementation in their true form. Hybrid consensus mechanisms have also been around for some time.
Assuming Betty owes Mark $50 and wants to pay via bank transfer, she notifies her bank. Let’s assume that the two parties use the same bank for simplicity’s sake. The bank checks that Betty has the funds to perform the transaction. If Betty has enough funds, the bank processes the transaction and updates both Betty and Mark’s account on their database. (e.g., -$50 to Betty, +$50 to Mark).
This is similar to what goes on with a blockchain, except there is no central authority like the bank to handle the ledger updates. So everyone on the network must verify the transactions going on, and ledger updates together, through their nodes.
If Betty wants to send 5 BTCs to Mark, she broadcasts this to the network. It won’t be added to the blockchain straight away – nodes will see it, but other actions must be completed for the transaction to be confirmed.
Once that transaction is completed and added to the blockchain, all of the nodes can see that it’s been made. They’ll update their copy of the blockchain to reflect it. Now, Betty can’t send those same five units to another person because the network knows that she’s already sent them to Mark.
There’s no concept of usernames and passwords – public-key cryptography is used to prove ownership of funds. To receive funds in the first place, Mark needs to generate a private key. That’s just a very long random number that would be virtually impossible for anyone to guess, even with hundreds of years at their disposal. But if he tells anyone his private key, they’ll be able to prove ownership over (and therefore spend) his funds. So it’s important that he keeps it secret.
What Mark can do, however, is derive a public key from his private one. He can then give the public key to anyone because it’s near-infeasible for them to reverse-engineer it to get the private key. In most cases, he’ll perform another operation (like hashing) on the public key to get a public address.