A Byte of Blockchain - Week 35 Introduction to Ethereum - Blockchain 2.0

·

5 min read

A Byte of Blockchain - Week 35
Introduction to Ethereum - Blockchain 2.0

Blockchain 1.0 Recap

During the last 34 weeks, we discussed the first Blockchain - The Bitcoin Blockchain & referred to as Blockchain 1.0 where

  1. There is transfer of value in a decentralized environment &
  2. All transactions are authorized or agreed by all the participants through consensus mechanism
  3. Which are all coded into the underlying protocols.
  4. Without any centralized authority or a single point of failure

The new paradigm started by Satoshi Nakamoto through the Bitcoin whitepaper gave birth to Bitcoin cryptocurrency. This digital or cryptocurrency resolved a long pending problem surrounding double spending which was a nagging issue in the earlier attempts to create a digital currency.

Another issue which was solved through decentralization was dependency on a centralized set up for payments which caused many early projects to shut down. It also created the "Trust-less" concept where no one needs to trust any counter-party but everyone can trust the underlying protocol to follow the rules.

To ensure proper security in a decentralized set up, the transactions are validated by all the nodes and added to blocks by the miner nodes through computing power and consensus which means

  1. miner nodes need to expend processing power (and in effect, electricity) to mine blocks &

  2. only after all the other nodes agree will it be added to the Blockchain. Thus, blocks not agreed upon is rejected thus resulting in wastage of resources for that miner.

Thus malicious or bad actors have to take over more than 50% of the network AND have substantial processing power to do any fraudulent transaction which with the current processing requirement is virtually impossible or very infeasible. The Bitcoin Network processing power or Hash Rate is 218.83M TH/s (Source : here).

"TH/s" means Tera Hashes per second &

1 Tera Hash per second = 1 Trillion hashes per second

So, you can see the tremendous processing power required to mine and add blocks in the Bitcoin blockchain.

Also, the network considers the chain with the longest proof-of-work to be correct and the nodes work to extend that chain only.

Scripting Language

The logic of the underlying protocols in the Bitcoin blockchain is coded using a scripting language. Bitcoin scripting language is intentionally restricted in logic meaning there are only two conditions to evaluate spending - TRUE or FALSE.

For example, does a wallet have sufficient balance to make a spend transaction? It can either be YES or NO (TRUE or FALSE).

  1. If it is YES (TRUE), it means there is sufficient balance to make the spend otherwise

  2. If it is NO (FALSE),it means the balance is insufficient.

The below visualization makes it more clear:

Condition.jpg

Now, why this restriction in the Bitcoin blockchain code?

In programming languages, other than TRUE or FALSE, there are other conditions used to design program logic like WHILE loops, FOR loops, DO..WHILE loops etc which makes a program or part of a program run till a condition is satisfied. It will look like

do 
  Action A
while (condition = True)

This means the above code will run Action A infinitely as long as the condition is true. (More examples are beyond the scope of our discussion). This can cause Denial-of-Service attacks.

What is a Denial-of-Service attack?

denial-of-service-gf38201c1a_1280.png

Image by clickschool from Pixabay

A denial-of-service attack occurs when legitimate users are unable to access information, systems, devices, or other network resources due to the actions of a malicious cyber threat actor. A denial-of-service condition is accomplished by flooding the targeted host or network with traffic until the target does not respond or simply crashes. (Source :here)

As mentioned above, one of the ways to cause denial of service attacks is by running an infinite loop.

Bitcoin scripting language has been intentionally designed to only accept TRUE or FALSE conditions so that it prevent infinite loops which can eat away computing resources & cause Denial of Service attacks.

The normal turnaround time to add blocks in Bitcoin blockchain is 10 minutes meaning a new block is added every 10 minutes in the Bitcoin blockchain. Since all the nodes have to validate transactions and blocks, a denial-of-service attack can cause catastrophic delays in adding transactions & blocks.

Blockchain 2.0 - Ethereum

So, is it possible for a Blockchain to have applications beyond just cryptocurrency and moving value of that currency across different addresses? If yes, what would be the best approach to design such a Blockchain? These were the questions posed by the creators of Ethereum.

What is Ethereum?

To refresh our memory from Week 33 on layers, we use software on our computers. These software are created using programs or code. The code interacts with the operating system and that in turn interacts with the hardware giving us the final outcome.

On similar lines, Ethereum founders were thinking about an underlying decentralized platform that could support any application to run on that platform. This platform which will be maintained in different computers or devices scattered across the globe could function as ONE HUGE COMPUTER. The application developers need not worry about implementing peer-to-peer networks, consensus algorithms, proof-of-work etc. These will be abstracted away and the developers can focus only on the application and it's interaction with the underlying Blockchain platform.

This means Ethereum is a PROGRAMMABLE BLOCKCHAIN which means any type of decentralized applications can be built & deployed on its network.

In other words, Ethereum is a general purpose blockchain meaning it can be programmed to run any applications on it. This gives rise to unlimited possibilities and a whole new world of innovation and paradigms which we will get into in subsequent weeks.

We are going deep down the rabbit hole of new applications like NFTs, DEFI, DAOs and others being developed on Ethereum. There are other blockchains like Solana which is also being used as a decentralized platform for applications. I am learning & excited to share my journey down this rabbit hole with you. We are embarking on a new journey together with the knowledge that we have accumulated over the past weeks. We may repeat some concepts going forward as Ethereum uses the same foundations as Bitcoin blockchain with added functionalities.

sunset-g7f08786d9_1280.jpg

Image by Sasin Tipchai from Pixabay