DEV Community

Cover image for Blockchain explained easy
Rey
Rey

Posted on

Blockchain explained easy

You've probably heard about blockchain, right? It can seem pretty confusing though.. Don't worry anymore! In this article, we'll break down the important stuff about blockchain for beginners!

Key concepts

You have to remember that blockchain is: distributed, immutable, transparent and reliable. Let's explain a bit more about each of these concepts:

Distributive Nature

This means it is duplicated thousands of times across different computers worldwide. Each copy in blockchain is called a node, and they all work together to maintain the information consistency. So – the data is spread out, making it harder to manipulate it or lose it.

Immutability

Once something is written into the blockchain, it can't be changed or erased. This is immutability. Each piece of data is linked to the previous one in a chain, and any attempt to alter one block would break the chain, alerting everyone in the network!

Transparency

Every transaction that occurs on the blockchain is visible to anyone. This builds trust among users, as they can verify the accuracy of transactions without relying on a central authority.

Reliability: Consensus Mechanism

Decisions need to be made collectively by all the nodes. This is where the consensus mechanism comes into play. Different blockchain networks use various methods, such as Proof of Work (PoW) or Proof of Stake (PoS), to ensure everyone agrees on the state of the blockchain

The Block

This is the fundamental unit of a blockchain. Essentially blockchain is a sequence of linked blocks each holding a piece of information

The key components of a block in a blockchain are the block header and the block body
The block header is the portion of a block that contains information about the block itself (block metadata), typically including a timestamp, a hash representation of the block data, the hash of the previous block’s header, and a cryptographic nonce.
The body of a block contains transaction records including transaction counter and the block size.

How blocks are chained together

Blocks are records linked together by cryptography in a blockchain. This connection is achieved with hash functions. This means that the same input gets always the same output but the minor change in the input leads to change completely the output. This is called avalanche effect.

Each block has a block hash. The hash of the previous block is used to produce the hash value of the next block. The next block is "chained" with its prior block, reinforcing the integrity of all the previous blocks that came before.

Why block size is important

The block size determines the amount of data that can be included in a single block which ultimately affects the speed and efficiency of the blockchain network.
While some argue that larger block sizes are necessary to accommodate a growing number of transactions, others believe that smaller blocks are better suited for maintaining the decentralization and security of the network.
Let's see some of the main differences in blocks:

Smaller block size Larger block size
each block contains fewer transactions more transactions can be processed in a single block
are more secure and decentralized because they require less storage space and computational power, making it easier for smaller miners to participate in the network. require more storage space and computational power, which can make it difficult for smaller miners to participate in the network
longer transaction times and higher fees reduced transaction fees and speeded up transaction times

To sum up the blockchain is distributed, immutable, transparent, and reliable. The fundamental unit is the Block and these blocks are linked using cryptographic hash functions, ensuring data integrity through a chain of blocks.

Sources:
https://academy.binance.com/en/articles/what-is-blockchain-and-how-does-it-work
https://www.theblock.co/learn/245697/what-are-blocks-in-a-blockchain https://bitcoin.org/bitcoin.pdf
https://www.theblock.co/learn/245697/what-are-blocks-in-a-blockchain
https://info.etherscan.com/exploring-block-details-page/ https://csrc.nist.gov/glossary/term/block_header.
https://www.geeksforgeeks.org/blockchain-chaining-blocks/
https://www.researchgate.net/publication/309983377_Electronic_Voting_Service_Using_Block-Chain#pf3
https://fastercapital.com/content/Block-size--The-Impact-of-Block-Size-on-Cryptocurrency-Block-Headers.html

Top comments (4)

Collapse
 
fernandezbaptiste profile image
Bap

I really enjoyed this piece!!

One tiny thing that could benefit from a future iteration is the links provided. It could be more reader-friendly to hyperlink them into each source's title (instead of having the full link).

Other than that, I found the piece to be well-explained and I have just bookmarked it πŸ™

Collapse
 
greengeko profile image
Rey

Thanks @fernandezbaptiste ! Absolutely, I will do it!

Collapse
 
wavycoder profile image
Datravous Odds

This really give you a brief understanding of what blockchain is and refreshes your memory on, thank you!

Collapse
 
web3space profile image
Jasper

agree