The Blockchain Primer: Part 2 - How blockchain works?

The Blockchain Primer: Part 2 - How blockchain works?

In Part 1, we studied what blockchain is and why was there a need to develop such a technology. We will now have a peek at some of its inner workings. While the underlying technology is quite complex, I will however try my best to keep it light on tech and attend largely to the fundamental concepts. If you’re looking for something meatier than this, I would be happy to recommend some really good resources that will take you deeper into the details.

Let me make it clear from the very beginning. You don’t NEED TO learn how blockchain works in order to use products that are built on top of it. Just like the internet.

It is important to note that not all blockchains have the exact same underlying principles. There are numerous ways a blockchain can be designed in order to accurately serve its use-case. For the matter of this article, we’ll use the Bitcoin blockchain as a general reference to understanding how blockchains usually work.

A Chain of Blocks

First things first - what do the words ‘block’ and ‘chain’ in blockchain even mean? A good analogy to blocks in a chain is pages in a book. More technically, a block is nothing but a file that comprises of the below:

  1. The contents of the block. E.g., In Bitcoin, it includes transactions and the miner’s incentive. In other blockchains, it could contain any other data as well, usually information that signifies the transfer of value.
  2. A header which contains the data about the block itself. E.g., In Bitcoin, the header contains a reference to the previous block, a fingerprint (hash) of the data contained in this block and a timestamp among other things.

This hash is important for the ordering of blocks in a sequence, just like page numbers in a book. However, one significant difference to know is that unlike page numbers, these hashes are dependent on the contents of the blocks themselves. This ensures that if someone tampers with some of the transactions in a historical block, its hash would change and it would not fit in the right sequence when other nodes see that block. We’ll see later in this article, how making the process of creating the hash of a block slow (mining) makes blockchains protected against the baddies.

Distributed Storage Network

In the Bitcoin blockchain, every time someone wishes to send bitcoins to a friend, they broadcast it to the entire network instead of just sending it as an individual message to the friend. This empowers each node in the network to keep a record of all transactions made by everyone at all times while also having the ability to validate every transaction against the entire history of transactions from each account. Having a public ledger eliminates the need to depend on a central server to authenticate and validate every transaction.

This is how Blockchain solves the problem of centralization. By making everyone the owner of the data. No more risk of a single point of attack. No more one human gone crazy, taking over the network.

Mining

‘Mining’ is a process in which participating nodes add a new block of valid transactions to the blockchain upon successfully solving a mathematical puzzle (recall block fingerprint/hash). The solution to the puzzle is called Proof of Work and it requires spending huge amounts of computational resources (& electricity) to generate it. Hence, miners are incentivized for mining each block. Since doing this is a slow process for an individual node, if someone wants to rewrite parts of the blockchain with a malicious intent, it will take them a very long time to overtake the rest of the honest network combined. The concepts of mining and proof of work are at the core of why blockchains have a ‘tamper-proof’ and ‘immutable’ reputation.

Consensus

In blockchain, it is possible for multiple nodes to generate conflicting but valid updates (mined blocks) to the ledger at roughly the same time. For instance, it is quite common in the Bitcoin blockchain for more than one nodes to guess the proof of work for the latest block simultaneously. Since blocks take time to be shared across the network, different nodes may receive different blocks at the same time. When this happens, which one should be considered legit by all nodes?

To solve this problem, the Bitcoin blockchain adopts the ‘longest chain rule’.

‘Longest chain rule’ is the protocol that resolves any conflicts of data replication and ensures that the entire network stays in a state of consensus on the latest state of the ledger. It is designed to ensure it’s in the best interest of each node to mine on top of the latest block added to the network and increase their odds of winning the race for the proof of work on the next block before everybody else and subsequently, grab the incentive.

By aligning miner incentives with the honest operation of the network - replicating the entire blockchain and achieving consensus across the network, blockchain makes it astronomically hard for the hackers to tamper with the data. The blockchain ecosystem puts all of these concepts together in a wonderfully concerted manner to make what was previously impossible, possible.

Winding up

Now, there are some advanced ideas introduced in this post. These are mainly useful to understand blockchain in the context of Bitcoin. Not all blockchains need Bitcoin mechanisms such as proof of work, mining, longest chain rule etc. Bitcoin was the first attempt at maintaining a decentralized, public ledger with no formal control or governance. With a coordinated global effort, this field is under radical evolution and a lot of new developments in blockchain technology can be seen popping up in the news all the time.

Hope this high-level view of how the Bitcoin blockchain works was useful. Once again, hit me up if you’re looking for resources to dive deeper.

See you in the next one!

要查看或添加评论,请登录

Nivedan Rathi的更多文章

  • ?? Life Coach That Never Sleeps

    ?? Life Coach That Never Sleeps

    Hello! Back with a spring in our step for edition 101! After milestone editionj last week, we're diving right back into…

    4 条评论
  • ???? Win Legal Battles With AI

    ???? Win Legal Battles With AI

    Hello! Nivedan here. Welcome to the 100th edition of the Future & AI Newsletter.

    2 条评论
  • ?? Meta Challenges Sora

    ?? Meta Challenges Sora

    Hello! Nivedan here. Back with another edition of my newsletter.

  • ?? Peek into Meta's AR Future

    ?? Peek into Meta's AR Future

    Hello! Nivedan here. Back with another edition of my newsletter.

  • 1?? One Prompt To Rule Marketing

    1?? One Prompt To Rule Marketing

    Hello! Nivedan here. Greetings from the Garden City of India! I'm writing this edition from Bangalore.

  • ?? Become Research Pro with AI

    ?? Become Research Pro with AI

    Hello! Nivedan here. I'm packing for my upcoming trip to Singapore and Thailand (it's for a talk, not a sultry…

    5 条评论
  • Wealth Inequality Explained in 6 Simple Ideas

    Wealth Inequality Explained in 6 Simple Ideas

    Wealth inequality is not the problem, our poor understanding of it is. Here's a power explainer using first principles.

    3 条评论
  • ?? Write Perfect Resumes with AI

    ?? Write Perfect Resumes with AI

    Hello! Nivedan here. Phew, what a week this is turning out to be! Been dodging raindrops, shooting podcasts, and…

    1 条评论
  • ?? Ideogram 2.0: New Design King

    ?? Ideogram 2.0: New Design King

    Hello! Nivedan here. I'm delighted to bring you another edition of my newsletter.

  • ?? Big Launches from Google & X

    ?? Big Launches from Google & X

    Hello! It's Nivedan. Nice to see you again and boy, do I have a treat for you today! A lot went down this week in AI.

    1 条评论

社区洞察

其他会员也浏览了