DEV Community

Emmanuel C. Onyema
Emmanuel C. Onyema

Posted on

On Blockchain — Understanding the absolute basics.

Image Title

In this post, we are going to learn about blockchain in its simplest form, my objective for this post is that by the end, you would have a better understanding of the blockchain, and also be able to explain to your friends or that 5-year-old-kid. I’m going to start with an introduction, then we define blockchain and clarify some of our misconceptions, after which we would talk about the types and quickly see some applications.
Alright, let’s dive right in.

Before we begin to learn what blockchain is, first, I would like to start with what the blockchain is not. Contrary to what some people think or assume, blockchain is not a cryptocurrency, it is not the bitcoin, it is not limited to financial transactions, the blockchain is much more than that, as it’s not for solving just one issue for some people, but can fix many problems for everyone.
It’s the foundation on which these other structures are built upon. It’s so much more that we keep on finding more and more ideas where this technology can help solve problems every day. Hopefully, by the end of this piece, you would get to understand this revolutionary technology.
For simplicity, I would limit my examples to the use of financial transactions.

So, What is blockchain?
First, what are blocks?
Let’s say I’m to record all my financial transactions and present them as a single big database encyclopedia, I would record on a single sheet of a paper list of transactions on grocery, including amounts, date, grocery store, etc. until it gets filled up.
Illustrating a single block

I would run a validation exercise, cross-checking my bank statements, and asking 6 of my friends I went with to the grocery store that day to help me check if the values are accurate. On successful validation, I would save this sheet of paper inside the encyclopedia where I can’t remove it until the day, I’m going to submit it. Then I would get a new sheet of paper on which I would continue to record subsequent transactions.
illustrating a collection of blocks

The database encyclopedia can be likened to represent the blockchain, while the sheet(s) of paper the block(s).
However, in reality, the blockchain operates a little differently. It abides by certain ideologies which make it unique from our traditional database (record-keeping) system. This is then going to lead us into understanding some of the principles guiding the blockchain.

The blockchain core principles

Decentralization

This principle is all about delegating power, decision-making ability, supervision, maintenance, control from a central entity (a person, group, authority, or an administrator) to a dispersed network of nodes, all the nodes on the network contain the same information and have equal rights. It ensures no entity can claim ownership or control of the blockchain.

Decentralized database

A decentralized database is one where there is no centralized storage of data or system administrator hence no single source of failure or weakness in a system. And that is essentially what the blockchain is all about.

Distributed peer-to-peer network

P2p short for peer-to-peer is a model based on a simple decentralization principle, instead of relying on a centralized administrator or server to control communication functions, the blockchain rather utilizes a decentralized network communication model between two nodes (peers) which aids storing and sharing of records without the need for a central intermediary. Unlike traditional client-server systems where there is a dedicated central server where a client downloads from and a server to store, the p2p system is maintained by a network of nodes — where each node can act both as server and a client (server when another client is making a request and a client when it is making its request.

Security

All records are individually encrypted, The blockchain is built in such a way that together with all other underlying principles, security is prioritized such that taking part in the network is far more economically incentivized than attacking it. Also, because of its decentralized nature and no single central point of control, it’s nearly impossible for hackers to attack or attempt to hack into it, if anyone were to alter a single copy of the block, it would no longer contain the same copy of information distributed across other nodes hence would not be recorded into the block.

Immutability

Remember when I said the blockchain operates a little differently from how our database functions, here is another unique difference. There are what are known to be CRUD (Create, Read, Update, Delete) functions performed on persistent storage applications. Ability to create a record, read a record, update a record and finally delete a record. On the blockchain, the last two operations were omitted. You can only be able to create and read a record without updating or deleting it. This is how the blockchain got its immutability property, the ability of records to remain unchanged or almost impossible to reverse a recorded transaction.

Group consensus

Before data can be recorded on the blockchain in permanence, all the data that are being independently recorded by the participating nodes (computers) are periodically checked and if 51% (or more than) of those nodes agree upon the validity of a record, it gets committed to the blockchain, never to be altered again. This ensures that whatever data we read of the blockchain comes with the backup that was recorded by the majority of the participating nodes. So essentially, a consensus mechanism allows many participants to maintain one truth together which roughly translates to ‘’we are participants, therefore we can all check it, and whatever majority of us decides is the truth, because the majority of us cannot independently record false data.’’
Having established the basics and core principles of the blockchain, we can now agree on a higher level overview that the

Blockchain is a decentralized database distributed across participating peer-to-peer nodes which is immutable and very secure.

Now, we have understood what blockchain is, Let’s go back to clarify one of our earlier misconceptions about the relationship between blockchain and cryptocurrencies.

Blockchain and Cryptocurrencies

Most people got exposure to the blockchain through the knowledge of a cryptocurrency of which bitcoin is an example and the first to be created in 2008, so it’s not unusual for misconceptions to exist. But here is the real deal, cryptocurrencies are digital, decentralized, disintermediated, trustless currencies that get transacted through the blockchain. In essence, because of the infrastructures and principles by which the blockchain operates, cryptocurrencies can run on them to make it possible for secure peer-to-peer transactions to happen between people without any third party whilst ensuring privacy and accurate record of transactions.

To say that the blockchain is equal to bitcoin or any other cryptocurrency is like saying that a railroad is equal to a train, they are not, rather the train can transport people because it can travel on top of the railroad.

Types of blockchain

Oftentimes, when we hear of the blockchain, we generally think we have just one type of blockchain on which every other thing is built upon. Although all blockchains operate on certain common principles, They can also be built in a variety of different ways to best offer solutions to a specific use case or application. Fundamentally, we have just two types of blockchain, the public, and private blockchain but as we are going to see shortly, we have four of them in total.

Public blockchain

In a public blockchain, anyone anywhere in the world can become part of the blockchain network, read the data, send and receive data, and upon validation would be added to the ledger. They would be able to join the consensus process hence they are often referred to as permission-less because they are non-restrictive. By nature, this type of blockchain is open source and completely decentralized. Examples are the Bitcoin and Ethereum blockchain.

Private blockchain

They are blockchains controlled by a single entity, often referred to as a permissioned blockchain because the central admin decides and permits who becomes a part of the blockchain. As a result, there is a partial level of decentralization, security and they are more likely to encounter fraud or error whilst enjoying a faster and shorter time validating data as a result of few participating nodes, high level of privacy, and a higher level of scalability.
This type of blockchain is usually used within a single organization where only the selected members are allowed to be part of the blockchain.

Consortium blockchain

The consortium blockchain is a semi-decentralized type of blockchain unlike the private blockchain, more than one entity manages the blockchain, as a result, there is a higher level of decentralization, security than the private blockchain.
In this type of blockchain, they can consist of a group of large financial firms, here each (selected) participating firm would manage a node on the consortium blockchain.

Hybrid Blockchain

A hybrid type of blockchain is that type that can combine the best of both public and private types of blockchain. examples are the Dragonchain and Xinfins hybrid blockchain.
However, there are some advantages and disadvantages attached to each type of blockchain, so it’s always best when we define what we want, set priorities and then choose what type of blockchain to implement that would offer the best solution to our problems.

Applications of the blockchain

There is no use for medical knowledge if it can’t be applied to solving an abnormality in the body. You might have that same question for the use of blockchain, well we are going to quickly go through a few of them.
The use of blockchain can help us ensure

  • Transparent voting system.
  • Insurance through a smart contract,
  • Effective cloud storage
  • Record management,
  • Curbing money laundering
  • Financial management and accounting,
  • Securely share medical information,
  • Data protection, and storage
  • Effective Identity management,
  • Borderless transfer of money across countries easily
  • Proper Asset tracking across the supply chain. Thank you

Discussion (25)

Collapse
codenameone profile image
Shai Almog

Counterpoint: blockchain was an interesting idea that was taken into production too soon. It has no actual utility and was taken over by crooks who've made it into a ponzi scheme.

Voting could be defeated by a government willing to put up enough computing power. The problem is that the integrity of voting would be further in doubt even if they don't.

NFTs mean nothing. They have no legal standing. We already have contracts and they work. This is a solution looking for a problem. For NFTs to be effective you need verification into the real world at which point a centralized system makes more sense in all respects.

Cloud storage?
Pay 1000000 times more than any simple cloud storage to store 3 kb?

Curbing money laundering is... Right now this is used by criminals more than any other tool. It was promoted as private. So now the selling point is that it isn't private? At least that's technically correct.
The problem is that it won't "curb" anything. People just won't use it.

Money transfer at a cost 20x that of SWIFT isn't exactly worth it.

Collapse
miketalbot profile image
Mike Talbot

Totally agree, "Proof of Stake" is open to corruption and "Proof of Work" is killing the planet.

Collapse
thorstenhirsch profile image
Thorsten Hirsch

What about Algorand's PPoS? I think they solved a lot of issues of previous PoS attempts, see: algorand.com/resources/blog/algora...

Thread Thread
miketalbot profile image
Mike Talbot

I'm not going to claim to be an expert, but my initial reaction to this was: isn't Pure PoS only really a principle based on the fact that a majority holder of coins isn't going to "be silly" enough to devalue their own holding? Seems like it isn't a perfect argument to me and further that if the contracts on the chain are relating to physical world items, let's say a land registry for property, then the practical value of the assets is different to the coins on the chain by a huge factor making a calculation of who is the majority holder a complex and non-digital one.

Collapse
fjones profile image
FJones • Edited on

The privacy is the one thing that trips even crypto enthusiasts up, funnily enough. On the one hand, you'll hear about putting medical records on the chain, but on the other hand it's super great that every message on the chain is traceable!

It's not just a solution looking for a problem, it's a solution trying for every problem and failing every time.

(Nevermind that the actual traceability eats even more power if you actually want to verify integrity...)

Collapse
imthedeveloper profile image
ImTheDeveloper

I think you dancing between at least 3 topics here with the same argument for each and ultimately trying to treat them as the same thing .. namely "crypto".

Blockchain has valid use cases, hence why businesses such as R3 are doing so well.

Crypto for payments, maybe.. but quickly you get wrapped into privacy and money laundering. So yea I'm on the fence with this one too.

NFTs and proof of ownership, no more or less valid than a piece of paper claiming ownership. It's down to recognition as legal tender or agreement between parties. That's not such a brutal hurdle to overcome.

Collapse
codenameone profile image
Shai Almog

It's not me whose dancing. It's crypto trying to find a valid use case.

Right now they're trying to treat it as a commodity (like gold) but it's pretty terrible at that too.

NFTs have no current valid use case. When you have a piece of paper it relates to a single government registry and legal system that enforces ownership/IP etc. The "writing something in the blockchain" is the easy part. Ensuring that it's respected and you're truly the owner, that's why we have governments and local registries.

NFTs don't prove anything other than the fact that you registered something. Just today I read an article claiming 80% of NFT deals are frauds by people who don't hold the IP to the work they're selling.

Collapse
siy profile image
Sergiy Yevtushenko

You forgot to mention, that traditional money are only useful as long as people believe that they have value. So, at some point there is always trust of one people to other people about meaning and value of some things. With this in mind, traditional blockchains are no different from traditional money. And there are also other blockchains (BFT-consensus-based clusters) which don't exchibit many limitations of traditional blockchains, including energy consumption, transfer fees and performance (which could scale far beyond of capabilities of traditional payment systems).

P.S. it does not worth to try to attack me as if I'm blockchain entusiast (I'm not).

Collapse
codenameone profile image
Shai Almog

I debate. I try not to take these things personally. If it feels like an attack I'm sorry and it isn't written with that intent. I feel we need to speak up against crypto as it's both a fraud and an ecological problem.

Traditional money is backed by a government. That's a huge difference. You have a central controlling body that regulates everything. This includes fraud prevention which is rampant as I mentioned.

I'm familiar with other blockchains with various levels of costs energy wise. But then you get back to the problem of fair distribution of the funds etc. as they aren't "earned" via mining. They are all "unproven" at scale, bitcoin doesn't scale but we know it sort of works...

There's a reason none of these coins gained traction in the mass market. I don't have as much of a problem with those coins as opposed to bitcoin et. al.

Thread Thread
siy profile image
Sergiy Yevtushenko

Great. Then let's continue debate (I really like such an approach).

If we omit dictatorships for brevity, then we may assume that government is backed by people who elected that government. So, it's still people trust behind money value.

Mining is not only way to earn. For example, in Radix network, "mining" is consequence of supporting and maintaining reliable network node and being recognized by community as a reliable node runner). In other words, this basically is no different from getting paid for providing services to community.

Thread Thread
codenameone profile image
Shai Almog

Yep. I'm pretty much comparing it to democracies we live in or trust.

Maintaining a node is a form of energy spend but yes. If it's a small energy overhead I don't have as much of a problem with it. There's the lack of regulation which has some advantages. But a lot of times crypto people gloss over the disadvantages. Commodity markets are highly regulated against "pump and dump" which in the case of crypto is just unavoidable as there's no tracking.

Even if a government made it illegal. Because of the nature of crypto a person could be in a different country and perform the fraud. I think a lot of people have a view of "yes it's a pyramid scheme, let's get in, make money and get out...". There's very heavy FOMO and misinformation involved. Celebrities are peddling this and very few people understand the implications. I'm not an economist, but it looks to me like a house of cards.

We see market collapses in stocks and commodities. But governments bail us out when this happens. Here, people will be left without their savings. Exchanges and wallets might disappear overnight. Yes, they were wrong to put money there... But honestly, the level of misinformation out there... I don't blame the people who do that.

Thread Thread
siy profile image
Sergiy Yevtushenko

Energy consumed by node is close to just running a personal computer for usual purposes. There is no mining or other meaningless energy waste.

Collapse
codenameone profile image
Shai Almog

NFT sounds like it could be useful but when you get down to it there are no use cases that justify the effort. E.g. game items is a great example. But the game is already centrally managed so why would you need the items to be a token?

The costs of minting and the trouble around it make very little sense to me. Pretty much any case where you need an ID or item tracking would work better with a central identity server.

Collapse
spaghetti_rs profile image
Alejandro López

Will you upload a second part?

Collapse
ceonyema profile image
Emmanuel C. Onyema Author

Sure Alejandro, What would you like to know more about?

Collapse
spaghetti_rs profile image
Alejandro López

Don't know if it's possible, but it would be an interesting topic: Dig a bit into what is a smart contract, what's the relation between a blockchain and it, uses, pros, cons. As a newbie into these concepts like blockchain, but interested in how it could be applied in programming, that topi would be awesome to read about.

Again, thank you so much, your post just clarified a lot. Keep doing great bro ;)

Collapse
t0nyba11 profile image
Tony B

Nice article, but I am not sure you are right about decentralization seeing blockchain transactions almost always use a centralized exchange, written and developed by a core group of developers.

ceonyema profile image
Emmanuel C. Onyema Author

I would love to read when it gets published.

Collapse
ceonyema profile image
Emmanuel C. Onyema Author

Thank you very much, Anjan

Collapse
ceonyema profile image
Emmanuel C. Onyema Author

Thank you very, Anjan.

Collapse
zirkelc profile image
Chris

May I ask what font you’ve used for your cover image?