Online Courses
Blockchain Security
Online Courses
Blockchain Security
  • Blockchain Security
  • Fundamentals of Blockchain Security
    • Introduction to blockchain
    • The promises of blockchain
    • Inside the blockchain hype
    • Blockchain structures
    • What is public-key cryptography?
      • How does public-key cryptography work?
      • Public-key cryptography in the blockchain
    • Security assumptions of public-key cryptography
      • Quantum computing
    • Hash function in blockchain
      • Properties of hash functions
      • Hash functions in the blockchain
      • Blockchain security hash key functions
    • Quiz
  • Consensus Algorithm Security
    • Introduction
      • The Byzantine generals problem
      • Security via scarcity
      • Common blockchain consensus algorithms
      • The longest chain rule
    • Proof of work
      • Inside PoW mining
    • Attacking proof of work
      • The 51% attack
      • Denial of service: Artificial difficulty increases
    • Proof of stake
      • Choosing the block creator
    • Attacking PoS consensus
      • XX% attack and the PoS "timebomb"
      • Fake stake attacks
      • Long-range attack
      • Nothing at stake problem
      • Sour milk attack
    • Quiz
  • Blockchain in Action
    • Nodes and network
      • Inside the node
      • How blocks are created
    • Attacking block creation
      • Denial-of-service
      • Frontrunning
      • Selfish mining
      • SPV mining
    • Attacking blockchain nodes
      • Blockchain software misconfiguration
      • Denial of service
      • Malicious transactions
    • Attacking the blockchain network
      • Eclipse attack
      • Routing attack
      • Sybil attack
    • Quiz
  • Smart Contract Security
    • What are smart contracts?
      • Smart contracts
    • General programming vulnerabilities
      • Arithmetic vulnerabilities
      • Right-to-left control character
    • Blockchain vulnerabilities
    • Ethereum vulnerabilities
    • Quiz
  • Beyond the Basics
    • Alternative distributed ledger architectures
      • Introduction to DAGs
      • Introduction to block lattices
      • Introduction to sidechains
    • Second-level blockchain protocols
      • How a state channel works
    • Advanced cryptography in blockchain
      • Multisignatures
      • Zero-knowledge proofs
      • Stealth addresses
      • Ring signatures
      • Commitment schemes
    • Quiz
  • Cumulative Quiz
Powered by GitBook
On this page
  • Why does blockchain need consensus?
  • Example
  1. Consensus Algorithm Security

Introduction

Why does blockchain need consensus?

The blockchain is a distributed, decentralized ledger. Each node in the blockchain network keeps its own copy of the ledger

Any node in the network can create a block. Control over block creation gives control over the ledger, and this breaks decentralization

Consensus algorithms decide who should create the next block. These algorithms must be able to be run in a decentralized fashion

Example

Imagine you and your friends are playing a game where you have to keep track of all the scores. Instead of having one person in charge of keeping the scores, you decide that everyone should have their own copy of the scoresheet. This way, if someone tries to cheat or change the scores, everyone else can catch them.

In the world of blockchain, this idea of everyone having their own copy of the scoresheet is called decentralization. But here's the challenge: if everyone can create a new entry on the scoresheet, how do you decide whose entry is valid? This is where consensus algorithms come in. They are like rules that everyone follows to agree on who gets to add the next entry to the scoresheet.

Consensus algorithms make sure that the blockchain stays decentralized and secure. They ensure that no one person has too much power and that everyone agrees on the valid entries. It's like having a fair and trustworthy referee in your game.

PreviousQuizNextThe Byzantine generals problem

Last updated 9 months ago