As an additional, optional and ungraded resource for you to be able to dive more deeply into the material, we have developed a series of interactive labs with Jupyter Notebooks that will take you through the process of building a basic blockchain. Each hands-on lab will be based on a demo session from section 3.2: Analyzing a Blockchain.
The labs will be made available in three formats: HTML for browser viewing, IPYNB (Jupyter) to download and run the files locally, and a lab environment with each relevant unit.
Cryptographic Hashes (Module 3.2.1)
HTML | IPYNB | LAB ENVIRONMENT
The first lab demonstrates the concept of hashing as it applies to the blockchain. It allows you to explore the one-way SHA-256 hashing function that is used on the Bitcoin blockchain by evaluating various inputs.
Ultimately, you will learn how hashing drastically facilitates the concept of immutability on the blockchain and prepare to build the individual blocks on a blockchain.
![](/asset-v1:Brainlab+BC101+2019_T1+type@asset+block/lab-screenshot-hashing.png)
Blocks (Module 3.2.2)
HTML | IPYNB | LAB ENVIRONMENT
Understanding the concept of hashing allows us to analyze the key elements that form a block in a blockchain — namely, the block number, nonce
We'll understand what makes a block valid and introduce mining as the process of solving a
![](/asset-v1:Brainlab+BC101+2019_T1+type@asset+block/lab-screenshot-blocks.png)
Assembling Blocks into a Blockchain (Module 3.2.3)
HTML | IPYNB | LAB ENVIRONMENT
Understanding what makes up an individual block will allow us to see how blocks are linked together in a blockchain (or chain of blocks). We will package the code from the previous hands-on sessions into a neat Python class called "Block" that will have all the required data and helper methods.
Furthermore, we'll define a "Blockchain" class to wrap its core functionalities as a glorified list and provide the means to easily test for its validity.
![](/asset-v1:Brainlab+BC101+2019_T1+type@asset+block/lab-screenshot-blockchain.png)
Distributed Blockchains (Module 3.2.4)
HTML | IPYNB | LAB ENVIRONMENT
Lastly, we will be ready to take what we'll have learned about hashing, blocks
We'll define a "DistributedBlockchain" class to associate each copy of the blockchain to a single peer, or owner in the network. Then, we'll see what happens when one peer's copy is modified but the rest of the
![](/asset-v1:Brainlab+BC101+2019_T1+type@asset+block/lab-screenshot-distributed-blockchain.png)