Welcome to the Course
Learn how to customize the Ethereum Virtual Machine.
In this course you will learn how to customize your own EVM. We will configure the EVM using the available parameters of the chainConfig and modify the VM by adding precompiles. At the end of this course you will be able to build customized and optimized versions of the EVM.
Why take this Course?
A significant innovation in blockchain is the development of multi-chain systems, such as Avalanche, which provide a significant improvement in scalability, interoperability, and flexibility. At the core of these multi-chain systems is the ability to run multiple blockchains powered by different virtual machines simultaneously. Each VM of a chain is optimized for specialized use cases, thereby boosting the network's overall performance.
Configuring and modifying the Ethereum Virtual Machine (EVM) is an incredible efficient way to create a specialized VM, since developers can build on top years of work of an active community and leverage an extensive ecosystem around the EVM consisting of wallets, explorers and development frameworks.
Customizing the EVM running on the Ethereum network or any other "one-chain-fits-all" network is a difficult process, requiring a wide consensus that the proposed change is mutually beneficial for all network participants. This can make customizations for unique use cases challenging, if not impossible.
Course Content
EVM Basics & Precompiles
In the first section of the course we will go through some basic concepts of the EVM, such as the account-based model, keys, addresses, transactions, and blocks. Furthermore, we will explain what a precompile is and let you interact with a precompile of the Fuji testnet.
Development Environment Setup
We will show different ways to set up a development environment for building customized EVMs. You will learn about Codespace, DevContainer and if you opt for the local setup, you will install a code editor, the Go language, configure your shell, and install some more dependencies.
Hands-On Exercises
The following sections contain hands-on exercises where you customize the EVM. The difficulty of the customizations will increase from section to section. Find out more about each exercise by clicking its name below:
Prerequisites
Avalanche
This course is intended for people with a solid understanding of the basic concepts of Avalanche. You should be familiar with these concepts:
- Virtual Machines: What they are and what VM customization means
- Blockchains: What the difference between a VM, Blockchain, and an Avalanche L1 is
If some of this is not clear, I strongly recommend taking the Avalanche Fundamentals and Multi-Chain Architecture courses first.
Software Development
You will need a general understanding of Software Development. You won't have to write a lot of code, but you will have to be able to understand some. Therefore, we recommend:
- Solidity: Basic Knowledge, familiarity with types and interfaces. Familiarity with Hardhat will help in advanced sections.
- Go: You don't necessarily need to know Go, but should have some experience with an advanced object-oriented and typed language (C, C++, Java, TS)
- Testing: It will help you in later sections if you are generally familiar with the concept of unit testing
Learning Outcomes
By the end of this course, students will:
- Understand what Precompiles are and when to use them
- Understand how the development of precompiles enables developers to create more optimized and capable blockchain systems and to tackle completely new use cases not achievable with previous solutions
- Apply the knowledge gained in the course by building multiple precompiles
Overall, this course aims to provide an advanced understanding of the customization of the EVM. By completing this course, students will be better prepared to build advanced blockchain applications.