Course Materials Book
This book is the host of all written materials used within the Polkadot Blockchain Academy. The slides presented in lessons, links and instructions to required materials for activities, and exercises are included1 in sequence for your reference.
Read the Book
The latest version is hosted at: polkadot-blockchain-academy.github.io/pba-site/
See the Contributors Guide to view offline and how to get started with content development.
Learn more about and apply for the next Academy today!
Notably, the graded assignments for the Academy and some solutions to public activities and exercises remain closed source, and links are intentionally left out of this book. These materials will be shared with students in person during the Academy.
FIXME all links are wrong right now β
SEE https://github.com/Polkadot-Blockchain-Academy/pba-content/pull/851/
Module 1: Cryptography
βCryptography rearranges power: it configures who can do what, from whatβ
Phillip Rogaway, The Moral Character of Cryptographic Work
Lessons Plan
This module consists of a combination of lectures, activities, and sections of the accompanying exercises to to students at what time. As there is a large amount of variance in student experience around cryptography, we want to make sure that we have a variety of content for students of different experience levels.
Graded Assignment
All graded assignments and solutions must remain private to the Academy staff, faculty, and enrolled students!
There is a private to the Academy graded exercise, in a template repository titled pba-cryptography--master that should be introduced after the first lectures are complete.
Instructors should _create a per cohort, private, derived from the master copy, make it a template repo, and configure the cohort Github Classroom to use this new repo as an assignment.
The 'px... assignment problem' sections indicates that students are now capable of completing them with the content so far covered.
They should be encouraged to start working on them as time allows outside of class time!
They should not zone-out of class to complete this during class time, they should prioritize in-class activities and exercises over working on the assignment!
Day 1
Morning
- 1-Intro
- 2-Addresses
- πͺ
subkeydemo
- πͺ
p1_hashingassignment problemp9_attacks::low_entropy_hashassignment problem
Afternoon
- 3-Hashes
- πͺ hashing demo
p2_addressesassignment problemp3_encryptionassignment problemp8_aes_modesassignment problem for advanced students β Break- Many time pad assignment problem
Day 2
Morning
- 4-Encryption
- 5-Basic_Signatures
- πͺ signature demo
p4_signingassignment problem- β Break
- 6-Advanced_Signatures
- π» AES Modes Activity
p6_merkleassignment problem
Afternoon
- 7-Hash_Based_Data_Structures-slides
- π» Merkle Tree Activity
p5_data_integrity_and_recoveryassignment problemp7_exoticsassignment problem if it exists- β Break
- VRF poker
Day 3 (0.5 day)
Morning
- 8-Exotic_Primitives
- 9-Cryptography_In_Context
p9_attacks::timing_attacksassignment problem
Introduction to Cryptography
Addresses and Keys
Hash Functions
Encryption
Digital Signature Basics
Advanced Digital Signatures
Hash Based Data Structures
Exotic Primitives
Cryptography In Context
FIXME listing
STUB page only π
Listing of more things to do...
- Learn and impl more from: https://rust-lang.github.io/mdBook/index.html
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
- Perhaps use
extra-watch-dirs = [...]to watch in a mono-repo with slides to trigger a build? So changes in the slides trigger reveal & mdBook?
- Perhaps use
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
Economics Basics
Game Theory Basics
Price Finding Mechanisms
Collective Decision Making
The Economics of Polkadot
FIXME listing
STUB page only π
Listing of more things to do...
- Learn and impl more from: https://rust-lang.github.io/mdBook/index.html
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
- Perhaps use
extra-watch-dirs = [...]to watch in a mono-repo with slides to trigger a build? So changes in the slides trigger reveal & mdBook?
- Perhaps use
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
Week 2 - Smart Contracts and Blockchain
Blockchain Overview
Designing DAG-based consensus
Adding Privacy to the UTXO model
Blockchain Forks
Blockchain Structure
Consensus Authoring
Accounting Models & User Abstractions in Blockchains
Consensus Finality
Fees, Ordering
Peer-to-Peer (P2P) Networking
Light Clients and Bridges
Econ & Game Theory in Blockchain
Unstoppable Applications
Coordination and Trust in Web3
Digital Services as State Machines
Platform Agnostic Bytecode
The Quest for Infrastructure
EVM, Solidity, and Vyper
WASM Smart Contracts in Ink!
ink! Workshop (First Day)
ink! Workshop (Second Day)
Smart Contracts
Contracts Pallet
ink!
FIXME listing
STUB page only π
Listing of more things to do...
- Learn and impl more from: https://rust-lang.github.io/mdBook/index.html
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
- Perhaps use
extra-watch-dirs = [...]to watch in a mono-repo with slides to trigger a build? So changes in the slides trigger reveal & mdBook?
- Perhaps use
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
Introduction to Substrate
Substrate; Show Me The Code
Substrate Wasm meta-protocol
Substrate Merklized Storage
Interacting With a Substrate Blockchain
SCALE Codec
Substrate/FRAME Tips and Tricks
Substrate's Transaction Pool and its Runtime API
(Deprecated)JSON-RPC Protocol
(Deprecated)Polkadot JS API Crash Course
(Deprecated)Substrate CLI
(Deprecated)Substrate Folder Structure
FIXME listing
STUB page only π
Listing of more things to do...
- Learn and impl more from: https://rust-lang.github.io/mdBook/index.html
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
- Perhaps use
extra-watch-dirs = [...]to watch in a mono-repo with slides to trigger a build? So changes in the slides trigger reveal & mdBook?
- Perhaps use
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
Introduction to FRAME
FRAME Pallet Coupling
FRAME Pallets & Traits
FRAME Calls
Events and Errors
FRAME Storage
FRAME/Pallet Hooks
Construct Runtime
FRAME Origin
More FRAME Benchmarking
FRAME Benchmarking
Runtime Migrations Try Runtime
FRAME Deep Dive
FRAME Extras
Outer Enum
Signed Extensions
FIXME listing
STUB page only π
Listing of more things to do...
- Learn and impl more from: https://rust-lang.github.io/mdBook/index.html
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
- Perhaps use
extra-watch-dirs = [...]to watch in a mono-repo with slides to trigger a build? So changes in the slides trigger reveal & mdBook?
- Perhaps use
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
Introduction to Polkadot
Data Availability and Sharding
Execution Sharding in Polkadot
Cross-Chain Message Passing (XCMP)
Blockspace: The Product of Polkadot
Build Simple Parachain
Cumulus Deep Dive
Deep Dive, Asynchronous Backing
Shallow Dive, Asynchronous Backing
Deep Dive, Availability Cores
Blockchain Scaling 1: Monolithic and Homogeneous
Blockchains Scaling 2: Modular and Heterogeneous
Polkadot Fellowship
Light Clients and Unstoppable Apps
Nominated Proof of Stake
OpenGov
The Decisions of Polkadot
Polkadot Ecosystem and Economy
What is Shared Security?
Zombienet
FIXME listing
STUB page only π
Listing of more things to do...
- Learn and impl more from: https://rust-lang.github.io/mdBook/index.html
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
- Perhaps use
extra-watch-dirs = [...]to watch in a mono-repo with slides to trigger a build? So changes in the slides trigger reveal & mdBook?
- Perhaps use
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
Cross Consensus Messaging (XCM)
XCVM
XCM Pallet
Parachain XCM Configuration
XCM in Polkadot
XCM in Use
XCM Beyond Asset Transfers
FIXME listing
STUB page only π
Listing of more things to do...
- Learn and impl more from: https://rust-lang.github.io/mdBook/index.html
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
- Perhaps use
extra-watch-dirs = [...]to watch in a mono-repo with slides to trigger a build? So changes in the slides trigger reveal & mdBook?
- Perhaps use
- https://rust-lang.github.io/mdBook/format/configuration/general.html#build-options
Cybersecurity Overview
User Centric Security in Web3
Security Awareness in Web3
Application Security
Formal Methods for Rust
Contributing Guide
Thank you for investing your time in contributing to the Academy! β¨.
Read our Code of Conduct to keep our community approachable and respectable.
Quick Start
This book is a monorepo for all public content used in the Academy, omitting Rust source code in a few other repositories linked to in the book. There are git submodules included, most notably of which is the embedded slides source and associated tooling to build them.
You may opt out of cargo make described below, but minimally will need to have an installation of mdBook to read and contribute to the book itself.
Serve the book offline with:
# Run from the working dir of this repo
mdbook serve --open
Installation and Development
The Academy is Rust heavy and as such, you need to install rust before anything else here.
In order to make your life easy π, there is a set of tasks that use cargo make.
With cargo make installed, you can list all tasks included to facilitate further installation, building, serving, formatting, and more with:
# Run from the top-level working dir of this repo
makers --list-all-steps
The tasks should be self-explanatory, if they are not - please file an issue to help us make them better.
Development Workflow
To view and edit slides:
makers install # Get all the deps needed for the book
makers serve # serve the existing submodule build artifacts in the book in watching mode for the book only
To work on both the embedded slides and the book in tandem:
makers install-all # Get all the deps needed for the book and submodules
makers serve-slides # Serve the embedded slides in watching mode not included in the book, yet!
# ....Make changes to the book and/or the slides...
makers serve-updated # Build the slides (clobbering those tracked by the book repo in `./slides`), embed in the book, view the updated book.
# git commit into the submodules *first* and make a PR on those repos
# *Then* commit into the book as a companion to submodule repos to finally a PR to the book.
π« In your PRs to this book, please do be sure to add yourself to our illustrious contributors showcase π¨βπ€
Refactoring Considerations
We opt out of the handy helper to create missing files if linked in SUMMARY.md, as this indicates something is likely amis in our translation of slides -> stub pages mapping correctly.
This is useful to turn back on when radically updating the slides path structure and/or file names as _those changes must be manually applied to link to the correct new location in /slides/.../*-slides.html
You can opt in by editing book.toml:
[build]
- create-missing = false # do not create missing pages
+ create-missing = true # create missing pages
CI
Using simple raw example
Contributor Covenant Code of Conduct
Our Pledge
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
Our Standards
Examples of behavior that contributes to a positive environment for our community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
Scope
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
1. Correction
Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
2. Warning
Community Impact: A violation through a single incident or series of actions.
Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
3. Temporary Ban
Community Impact: A serious violation of community standards, including sustained inappropriate behavior.
Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
4. Permanent Ban
Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
Consequence: A permanent ban from any sort of public interaction within the community.
Attribution
This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
Contributors
Here is a list of the contributors who have helped in creating the Academy content. HUGE shout-out to them! π¦Έ
- Nuke π
- FIXME more!!