You need to enable JavaScript to run this app.
Bankless Academy
Blockchain Basics

Blockchain Basics

Learn about the fundamental architecture of blockchain technology.
Lesson ContentUpdated
English
DeutschEspañolFrançaisPortuguêsItaliano日本語Українська简体中文Türkçeहिन्दीBahasa IndonesiaTiếng ViệtРусский한국어PolskiČeštinaKiswahiliবাংলাमराठीதமிழ்తెలుగు繁體中文NederlandsFilipinoไทยالعربيةاردو

Introduction

Blockchain technology is a revolutionary way of storing and tracking data, while also making that data accessible to anyone. It is a way of organizing data in a single public list of all historical transactions that anyone can view but cannot edit. This public list of transactions is collectively known as the blockchain ledger.

After examining the layers of a blockchain, you will understand the structure that a blockchain tool called a block explorer displays: the list of blocks, the transactions within those blocks, and the details of each individual transaction. To see it in action, try Etherscan, a popular block explorer for Ethereum.

Blockchain Structure

The term blockchain can be used as a noun (the Bitcoin blockchain) or as an adjective (blockchain technology). Either way, blockchain refers to the entire structure cryptocurrencies are built on.

Zooming in from the outside, there are 3 levels of structure in a blockchain:

  1. The overall blockchain is made up of blocks that are linked together in order
  2. Blocks are made up of groups of transactions put together
  3. Transactions are transfers of value, or instructions to programs, between addresses on the network

This three-tiered structure comes together to create a cryptographic ledger - an unalterable history of all transactions performed on the network.

Knowledge Check 1

What is a blockchain?

  • [ ] Organized groups of transactions called blocks

  • [ ] A shared record anyone can view but no one can edit

  • [ ] Blocks linked together in sequence

  • [ ] All of the above

Examining the Ledger

In typical money systems, we trust third parties like banks to keep track of how much money each person has. But, to be truly Bankless, we want a system that doesn’t require us to trust one entity to manage the ledger.

The ledger is the list of ALL transactions ever made on a blockchain, and anyone can see it for public blockchains. Discrete groups of transactions from the ledger form the blocks that together make the blockchain.

When new transactions are added to the ledger, balances stored at each address get updated; past transactions cannot be altered. It’s like letting anyone look at everyone’s all-time bank account transaction history, at any time.

Transactions on the Ledger

Let’s look at some example transactions:

  • Alice sends 5 ETH to Bob
  • Bob sends 2 ETH to Charlie

Individual transactions show the change in the amount of cryptocurrency for each address so the total result of all transactions IS the amount of cryptocurrency each address has.


⇒ Alice has lost 5 ETH

⇒ Bob has gained 3 ETH total (received 5, sent 2)

⇒ Charlie has gained 2 ETH

Knowledge Check 2

Which of the following is true for public blockchain ledgers?

  • [ ] All transactions are public and past transactions are unchangeable

  • [ ] The ledger tracks how much cryptocurrency each address currently has

  • [ ] The ledger grows as new transactions are added to it

  • [ ] All of the above

Decentralization

Not only are transactions included on a blockchain ledger unchangeable, they are also shared and distributed amongst a large network of computers. To make sure that no single entity has the power to change the data, copies of the blockchain ledger are stored on many computers, called nodes, across the network.

This shared data is what makes the blockchain ledger decentralized. No single authority or entity controls the data. Blockchains like Ethereum are also public because the ledger can be viewed by anyone.

For this lesson, just remember that the ledger data is shared across the many computers running the Ethereum network.

Knowledge Check 3

What makes a blockchain decentralized?

  • [ ] Only one entity can write to the blockchain

  • [ ] It meets decentralization requirements set by the government

  • [ ] No single entity controls the ledger, stored on many computers

  • [ ] The ledger is stored on a single secure server

Block Anatomy

An important feature of blockchains is that past transaction data cannot be changed after it has been included in a block. This is because each block has a unique block hash, like a fingerprint, that is used to link the blocks together one after another. No one can change past transactions without changing that fingerprint and the fingerprint of EVERY block that follows it because each fingerprint depends on the previous one.

So each block is simply a group of transactions, plus a unique fingerprint (its block hash) computed from the block’s contents. The blocks are chained together because each one references the previous block’s unique fingerprint to form one connected blockchain.

Knowledge Check 4

What is the purpose of a block hash?

  • [ ] To encrypt block data so no one can read it

  • [ ] To link blocks together and keep past transaction data unchangeable

  • [ ] To ensure transactions are sent to the correct address

  • [ ] To ensure the blockchain stays decentralized

Inside a Block

Remember, block data is just a group of transactions put together. Looking within a single block, we see a list of transactions and some data about who created the block.

From our example earlier when discussing the blockchain ledger, both of those transactions might be grouped within one block, or spread out into multiple blocks over time. But no matter what block they are included in, they are all added to the overall blockchain ledger eventually.

  • Alice sends 5 ETH to Bob
  • Bob sends 2 ETH to Charlie

Recall that each block must also reference the past block’s block hash to link the blockchain together.

Knowledge Check 5

What information is contained in a block?

  • [ ] All the information contained in previous blocks

  • [ ] Anything relevant to the blockchain as block size is unlimited

  • [ ] Transaction data and a reference to the previous block

  • [ ] All transaction data generated within a fixed timeframe

Individual Transactions

The data on any blockchain is simply a list of transactions, records of currency moved between users. Each transaction must be signed by the sender’s digital signature to be valid.

This is what you do when you confirm a transaction with a wallet, you are signing with your digital signature to authorize a transaction. You can think of it as the digital equivalent of physically signing a check, receipt, or credit card transaction.

Transactions can be simple, like sending crypto assets, or more complex, such as swapping crypto assets or even deploying special code that executes when triggered, called smart contracts.

Finally, each transaction has a unique digital identifier, called its transaction hash, that no other transaction has. This makes it easy to refer to any single transaction later on and ensures that the details of that transaction can’t be changed afterward.

Knowledge Check 6

Data on a blockchain is simply a list of transactions grouped into blocks. Examples of such transactions might include:

  • [ ] Sending or receiving crypto assets

  • [ ] Changing the size of the block

  • [ ] Editing past blockchain data

  • [ ] All of the above

User Addresses

An address is a public identifier that anyone can look up on the blockchain. Like an email address, anyone can send funds to it but only someone who controls the private key can unlock and use the funds at that address.

On Ethereum, an address always starts with _0x__________ and is 42 characters of numbers and letters derived from the public key of that address.

When looking at a single transaction in a block explorer, we can see the From: and To: addresses. This doesn’t tell us who the people are who control those addresses but allows any user to track the movement of cryptocurrency throughout the blockchain ledger.

Knowledge Check 7

What is true about blockchain addresses?

  • [ ] They are the public identifiers of different entities on a blockchain

  • [ ] They always start with 0x on Ethereum

  • [ ] Whoever controls the private key can use the funds at that address

  • [ ] All of the above

Start Lesson