-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update through hash-function-precompile
- Loading branch information
1 parent
6b9be90
commit 9fb007a
Showing
37 changed files
with
328 additions
and
500 deletions.
There are no files selected for viewing
15 changes: 0 additions & 15 deletions
15
content/course/customizing-evm/02-intro-to-evm/00-evm-and-precompiles.mdx
This file was deleted.
Oops, something went wrong.
16 changes: 8 additions & 8 deletions
16
content/course/customizing-evm/02-intro-to-evm/01-origin-of-evm.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
--- | ||
title: Origin of the EVM | ||
description: Learn about the origin of Ethereum Virtual Machine (EVM). | ||
updated: 2024-05-31 | ||
authors: [ashucoder9] | ||
description: Learn about the origin of the Ethereum Virtual Machine. | ||
updated: 2024-09-27 | ||
authors: [ashucoder9, owenwahlgren] | ||
icon: BookOpen | ||
--- | ||
|
||
The Ethereum Virtual Machine (EVM) is a key component of Ethereum’s infrastructure, responsible for executing smart contracts across the network. The origins of the EVM can be traced back to the creation of the Ethereum blockchain itself, which was proposed in a whitepaper by Vitalik Buterin in late 2013. | ||
The **Ethereum Virtual Machine (EVM)** is a fundamental component of Ethereum’s infrastructure, responsible for executing smart contracts across the network. The origins of the EVM can be traced back to the creation of the Ethereum blockchain itself, proposed in a whitepaper by **Vitalik Buterin** in late 2013. | ||
|
||
Buterin and the founding Ethereum team envisioned a platform where developers could build decentralized applications (dApps) on a blockchain. To accomplish this, they needed a way to execute arbitrary, complex computations in a secure and decentralized way. This is where the idea of the EVM was born. | ||
Buterin and the founding Ethereum team envisioned a platform where developers could build **decentralized applications (dApps)** on a blockchain. To accomplish this, they needed a way to execute arbitrary, complex computations in a secure and decentralized manner. This is how the concept of the EVM was born. | ||
|
||
The EVM, an integral part of the Ethereum ecosystem, operates as a quasi-Turing complete machine. This means it can run nearly any algorithm, given enough resources, and it's isolated from the main network, providing a sandboxed environment for smart contract execution. | ||
The EVM, an integral part of the Ethereum ecosystem, operates as a **quasi-Turing complete machine**. This means it can run nearly any algorithm, given enough resources. It's isolated from the main network, providing a sandboxed environment for smart contract execution. | ||
|
||
After the whitepaper was published, the Ethereum project moved into a development phase, with the first live version of the Ethereum network, including the EVM, launching on July 30, 2015. The Ethereum blockchain was designed to include the EVM at the protocol level to allow users to create and execute smart contracts. These smart contracts are essentially programs or scripts that autonomously execute the terms of a contract, and they are written in a high-level language such as Solidity or Vyper, which are then compiled down to EVM bytecode for execution on the EVM. | ||
Following the publication of the whitepaper, the Ethereum project moved into development. The first live version of the Ethereum network, including the EVM, launched on **July 30, 2015**. The Ethereum blockchain was designed with the EVM at the protocol level, enabling users to create and execute smart contracts. These smart contracts are essentially programs that autonomously execute the terms of an agreement. They are written in high-level languages like **Solidity** or **Vyper**, which are then compiled down to EVM bytecode for execution on the EVM. | ||
|
||
Since its creation, the EVM has become a vital component of the Ethereum blockchain, and it has set a precedent for other blockchain platforms that have adopted similar models for executing smart contracts. The advent of the EVM has undoubtedly revolutionized the blockchain world, introducing the concept of programmable blockchains. | ||
Since its creation, the EVM has become a crucial component of the Ethereum blockchain and has set a standard for other blockchain platforms that have adopted similar models for executing smart contracts. The advent of the EVM has undoubtedly revolutionized the blockchain world by introducing the concept of **programmable blockchains**. |
27 changes: 13 additions & 14 deletions
27
content/course/customizing-evm/02-intro-to-evm/02-accounts-keys-address.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,37 @@ | ||
--- | ||
title: Accounts, Keys and Addresses | ||
description: Learn about Accounts, Keys and Addresses in EVM. | ||
updated: 2024-05-31 | ||
authors: [ashucoder9] | ||
title: Accounts, Keys, and Addresses | ||
description: Learn about Accounts, Keys, and Addresses in EVM. | ||
updated: 2024-09-27 | ||
authors: [ashucoder9, owenwahlgrne] | ||
icon: BookOpen | ||
--- | ||
|
||
## Accounts | ||
|
||
In the EVM, there are two types of accounts: | ||
|
||
1. **Externally Owned Accounts (EOAs)**: These are accounts controlled by private keys and have no associated code with them. They can send transactions by creating and signing them with their private keys. Essentially, if you are an end user of Ethereum, you're likely using an EOA. | ||
1. **Externally Owned Accounts (EOAs)**: These accounts are controlled by private keys and do not have associated code. They can send transactions by creating and signing them with their private keys. If you're an end user of Ethereum, you're likely using an EOA. | ||
|
||
2. **Contract Accounts**: These are accounts that have associated code with them (Smart Contracts). Contract accounts can't initiate transactions on their own. Instead, they only perform an operation when instructed to do so by an EOA. This could be a simple token transfer or a function call in a smart contract. | ||
2. **Contract Accounts**: These accounts have associated code (smart contracts). Contract accounts can't initiate transactions on their own; instead, they only perform actions when instructed by an EOA. This could be as simple as a token transfer or a function call within a smart contract. | ||
|
||
## Public and Private Keys | ||
|
||
In Ethereum, as in many blockchain platforms, a cryptographic algorithm called the Elliptic Curve Digital Signature Algorithm (ECDSA) is used to generate a pair of keys: a public key and a private key. | ||
In Ethereum, as in many blockchain platforms, the **Elliptic Curve Digital Signature Algorithm (ECDSA)** is used to generate a pair of keys: a public key and a private key. | ||
|
||
The private key is a 32-byte number generated randomly. | ||
|
||
The public key is derived from the private key using a specific elliptic curve cryptography function. It is 64 bytes long, consisting of two concatenated 32-byte coordinates. | ||
- The **private key** is a 32-byte number generated randomly. | ||
- The **public key** is derived from the private key using elliptic curve cryptography. It is 64 bytes long, made up of two concatenated 32-byte coordinates. | ||
|
||
## Addresses | ||
|
||
An EVM address is derived from the public key through the following steps: | ||
|
||
1. **Keccak-256 Hashing**: The public key is first passed through the Keccak-256 hashing function (the version of SHA-3 used by Ethereum). Keccak-256 outputs a 64-byte string: | ||
1. **Keccak-256 Hashing**: The public key is first passed through the Keccak-256 hashing function (the version of SHA-3 used by Ethereum). Keccak-256 outputs a 64-byte string, for example: | ||
`025ad33e2479a53b02dc0be66eb0ce272fc0f4358c57a8f0a442410c3d831a` | ||
|
||
2. **Rightmost 20 bytes**: The resulting string is truncated to keep only the last 20 bytes. In hexadecimal, this means retaining the rightmost 40 hex digits (since two hex digits represent one byte): | ||
2. **Rightmost 20 bytes**: The resulting string is truncated to keep only the last 20 bytes. In hexadecimal, this means retaining the rightmost 40 hex digits (since two hex digits represent one byte), like so: | ||
`e66eb0ce272fc0f4358c57a8f0a442410c3d831a` | ||
|
||
3. **Adding '0x'**: Finally, "0x" is added at the start of the address for a total of 42 characters. The "0x" prefix indicates that what follows is a hexadecimal number, a common convention in the Ethereum ecosystem: | ||
3. **Adding '0x'**: Finally, "0x" is prefixed to the address for a total of 42 characters. The "0x" indicates that the following characters represent a hexadecimal number, a common convention in Ethereum: | ||
`0xe66eb0ce272fc0f4358c57a8f0a442410c3d831a` | ||
|
||
This process ensures that each Ethereum address corresponds uniquely to a public key. Since the address is a truncated hash of the public key, it's not possible to reverse-engineer the public key from the address. | ||
This process ensures that each Ethereum address uniquely corresponds to a public key. Since the address is a truncated hash of the public key, it's impossible to reverse-engineer the public key from the address. |
18 changes: 9 additions & 9 deletions
18
content/course/customizing-evm/02-intro-to-evm/03-transactons-and-blocks.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
content/course/customizing-evm/03-development-env-setup/00-intro.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
46 changes: 0 additions & 46 deletions
46
content/course/customizing-evm/03-development-env-setup/02-what-is-codespaces.mdx
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ment-env-setup/04-codespace-in-vscode.mdx → ...ment-env-setup/03-codespace-in-vscode.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 9 additions & 13 deletions
22
content/course/customizing-evm/04-your-evm-blockchain/00-intro.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
--- | ||
title: Your Own EVM Blockchain | ||
description: Learn how to spin up your own EVM blockchain. | ||
updated: 2024-05-31 | ||
authors: [ashucoder9] | ||
updated: 2024-09-27 | ||
authors: [ashucoder9, owenwahlgren] | ||
icon: Book | ||
--- | ||
|
||
In this part of our course, we'll explore how to run your own Avalanche Network with a custom EVM. Running your own EVM allows you to address specific use cases and highlights one of the key advantages of multi-chain systems over monolithic ones. | ||
In this part of the course, we'll explore how to run your own Avalanche L1 with a custom EVM. Running your own EVM allows you to address specific use cases, showcasing one of the key advantages of multi-chain systems over monolithic blockchains. | ||
|
||
## Hands-On Exercise | ||
## Topics | ||
|
||
In this section, you won't need to write any Go code. Instead, you'll run some commands to set up your EVM blockchain. | ||
We’ll cover the following topics: | ||
|
||
## Structure of This Section | ||
- **Avalanche CLI**: Learn how to configure and launch an Avalanche L1 using the Avalanche CLI. | ||
- **Token Transfer**: Explore how to perform token transfers with Foundry. | ||
|
||
We will cover the following topics: | ||
|
||
- **Avalanche CLI**: Learn how to use this tool to create your own Avalanche Network and add Avalanche L1s and blockchains. | ||
- **Token Transfer**: Discover how to perform token transfers with Foundry. | ||
|
||
This practical exercise will help you consolidate your knowledge and see the impact of customizations on EVM performance firsthand. | ||
This hands-on exercise will solidify your knowledge and allow you to observe how customizations impact EVM performance. | ||
|
||
## Learning Objective | ||
|
||
By the end of this section, you'll be equipped with the skills to effectively run your own Avalanche Network with a custom EVM blockchain, paving the way for your blockchain projects. | ||
By the end of this section, you’ll have the skills to effectively run your own Avalanche L1 with a custom EVM blockchain, empowering you to start building your blockchain projects! |
Oops, something went wrong.