This graduate-level course teaches you about blockchain foundations. The course focuses on the first principles and foundations behind blockchains with the aim of understanding how and why blockchain technology works and is secure. We do not focus on Bitcoin or Ethereum engineering peculiarities, but we explore the general concepts of the blockchain field. However, the course is heavy on both engineering (writing code) and theory.
The course focuses on three questions:
- What are blockchains?
- How do they work?
- Why are they secure?
This 56-hour course is structured in 16 lessons. We explore proof-of-work, proof-of-stake, transactions in the UTXO and accounts model, authenticated data structures such as Merkle Trees, simple payment verification, smart contracts, and their programming. A central topic of the course is understanding why blockchains are secure. We treat the question in theoretical depth using the cryptographic backbone model. View the full syllabus.
The exercises form the most important part of the course. They involve building our own blockchain, Marabu. It is a proof-of-work UTXO blockchain designed for educational purposes to be simple to implement and debug. As a student, you will implement your own Marabu full node from scratch. Your node must connect to the nodes of other students and maintain a common blockchain with them. Implement the protocol by following through with the exercises.
Throughout the course, we will also have a few additional exercises on smart contracts, as well as some theory problems.
The following implementations are solutions to the exercises. If you want to make your own node, you should try not to look at them too much.
- traverso, a Marabu node in Rust by Petros Angelatos
- marablu, a Marabu node in Deno by Marios Balamatsias
- sylvstrupp, a Marabu node in C++ by Giannis Gkoulioumis
- birdman, a Marabu node in TypeScript by Nikolaos Kamarinakis
- penguin, a Marabu node in Python by Dimitris Karakostas
- go-marabu, a Marabu node in Go by Kostis Karantias
- marabou, a Marabu node in Typescript by Dimitris Lamprinos
- maracucho, a Marabu node in Java by Angel León
- malibu, a Marabu node in TypeScript by Dionysis Zindros (a bootstrapping node is running on keftes.di.uoa.gr:18018)
Who is this course for?
This is an experimental course for graduate-level students in computer science. We are currently teaching it in-person to four students as a test, but it may be offered at the university level once we develop it further. Anyone is welcome to develop a node and follow through with the exercises, however.
This course is designed for graduate-level students or as an advanced elective course for 4th year undergraduate students. The prerequisites for the course are a professional knowledge of at least one programming language (for implementing the node), a basic knowledge of networking (TCP/IP), basic understanding of probability theory (probabilities, expectations, distributions, tail bounds), discrete mathematics (graphs, proof techniques), and a basic understanding of computability/complexity theory (Turing Machines, P, NP, reductions). A very basic understanding of cryptography (hashes, signatures, proof techniques) is helpful but not required.
- Instructor: Dionysis Zindros
- Teaching Assistant: Kostis Karantias
- Students: Giannis Gkoulioumis, Nikolaos Kamarinakis, Dimitris Lamprinos, Apostolos Tzinas
The central topic of the course, answering the question of why blockchains are secure, is not yet fully treated in any books. We are developing our own lecture notes.
Some engineering books on the topic that discuss the specific implementation details of Bitcoin and Ethereum are Mastering Bitcoin and Mastering Ethereum by Andreas Antonopoulos (but the point of the course is not to focus on Bitcoin and Ethereum-specific details). These books are available online for free, but you can also buy them in print.
As a cryptography reference, we recommend Introduction to Modern Cryptography by Katz and Lindell. It is an excellent book. If you need to refresh your knowledge in computability, the Introduction to the Theory of Computation by Sipser is the best book in computer science ever written. If you need a refresher in discrete math and discrete probabilities, Liu's Elements of Discrete Mathematics is great.
We will study the following papers throughout the course:
- The Bitcoin paper by Satoshi Nakamoto
- The Bitcoin backbone paper (2020 revision) by Juan Garay, Aggelos Kiayias, and Nikos Leonardos