-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into yarik/full-node-local-da
- Loading branch information
Showing
12 changed files
with
200 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# Quick Start Guide for Artela EVM++ with Rollkit | ||
|
||
<script setup> | ||
import constants from '../.vitepress/constants/constants.js' | ||
</script> | ||
|
||
This guide will assist you to quickly set up a rollup node with [Artela EVM++](https://docs.artela.network/main/Artela-Blockchain/EVM++) execution layer using Rollkit and local-DA. | ||
|
||
![artela-evm-rollkit](/artela-evm-rollkit/artela-evm-rollkit.png) | ||
|
||
EVM++ is a modular dual-VM execution layer that supports the dynamic creation of native extension modules for blockchain at runtime. It enables developers to leverage WasmVM to build native extensions that co-process with EVM, offering enhanced customization capabilities. More than just a dual-VM setup, these native extensions facilitate blockchain-level customization. They allow for the integration of custom logic throughout the transaction lifecycle, providing access to an expanded runtime context. | ||
|
||
## 📦 Clone the Artela Rollkit Repository | ||
|
||
Start by cloning the Artela Rollkit repository: | ||
|
||
```bash | ||
git clone https://github.com/artela-network/artela-rollkit.git | ||
cd artela-rollkit | ||
``` | ||
|
||
## 🛥️ Run with Docker Compose | ||
|
||
Ensure Docker is installed on your system before setting up the Artela rollup node. If not already installed, download and follow the setup instructions available [here](https://www.docker.com/products/docker-desktop/). | ||
|
||
:::tip | ||
Make sure you meet these [prerequisites](https://docs.docker.com/engine/network/tutorials/host/#prerequisites) of enabling host network mode in Docker. | ||
::: | ||
|
||
After installing Docker, run the following command to start a local development node: | ||
|
||
```bash | ||
docker compose up -d | ||
``` | ||
|
||
This command launches the Artela rollup node with Rollkit and local-DA. To monitor the logs, use this command: | ||
|
||
```bash | ||
docker logs artroll -f | ||
``` | ||
|
||
If you observe the following output, the local development node is running properly: | ||
|
||
```bash | ||
... | ||
7:09AM INF finalized block block_app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager num_txs_res=0 num_val_updates=0 | ||
7:09AM INF executed block app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager | ||
7:09AM INF indexed block events height=3 module=txindex | ||
7:09AM INF Creating and publishing block height=4 module=BlockManager | ||
... | ||
``` | ||
|
||
## 🔑 Get prefunded test accounts | ||
|
||
Access testing accounts by entering the `artroll` Docker container: | ||
|
||
```bash | ||
docker exec -ti artroll /bin/bash | ||
``` | ||
|
||
Retrieve the address and private key of testing accounts using: | ||
|
||
```bash | ||
# 👇 Alternatively, you can use myKey2.info, myKey3.info, myKey4.info | ||
./entrypoint keyinfo --file ~/.artroll/keyring-test/mykey.info --passwd test | ||
``` | ||
|
||
This will display the testing private key and its address: | ||
|
||
```bash | ||
private key: { Plain Private Key in Hex Format } | ||
address: { Address Associated with the Private Key } | ||
``` | ||
There are four testing accounts available in the local development node for interacting with the EVM chain. | ||
## 🧪 Build on EVM++ | ||
Let’s dive into Artela EVM++ by kicking off with the Hello World project, the following code will guide you through the essentials: | ||
👉 [Contract interaction tutorial](/tutorials/evm-contract-interaction): Get hands-on experience with deploying and interacting with smart contracts on the Artela rollup node. | ||
:::tip | ||
When you are following the Contract interaction tutorial, you need to make the following replacements: | ||
1. Use https://github.com/artela-network/gm-portal.git instead of the original `gm-portal` repo. | ||
2. Use the private key you obtained from the previous step in this tutorial instead of the one used in the Contract interaction tutorial. | ||
3. The contract address should be `0x9fcEbD70654D360b41ccD123dADAAad6ce13C788` instead of the one starts with `0x18D...`. | ||
::: | ||
👉 [Quick Start for Aspect on EVM++](https://docs.artela.network/develop/get-started/dev-aspect): Try your first [Aspect](https://docs.artela.network/develop/core-concepts/aspect-programming) with Artela rollup node. | ||
:::tip | ||
Please note that when you are following the Aspect on EVM++ tutorial, you need to make the following replacements: | ||
1. Replace `npm install -g @artela/aspect-tool` with `npm install -g @artela-next/aspect-tool` | ||
2. Replace the Artela Testnet node URL in `project.config.json` with `http://localhost:8545` to connect to your local rollup node. | ||
3. Use the private key you obtained from the previous step in this tutorial instead of creating a new account. | ||
::: | ||
By now, we assume that you: | ||
- Have a basic understanding of Artela technology. | ||
- Have installed and played with Artela development tools. | ||
- Understand how Aspect functions and its impact on making dApps distinct and superior. | ||
- May already have numerous innovative ideas for building on Artela. | ||
### 📖 More to know | ||
If you want to gain a deeper understanding of Aspect’s capabilities and limitations to fully grasp how it can enhance or constrain your project, make sure not to overlook these essential concepts: | ||
- [Aspect Runtime](https://docs.artela.network/develop/core-concepts/aspect-runtime) | ||
- [Aspect Lifecycle](https://docs.artela.network/develop/core-concepts/lifecycle) | ||
- [Join Point](https://docs.artela.network/develop/core-concepts/join-point) | ||
- [Aspect Tool](https://docs.artela.network/develop/reference/aspect-tool/overview) | ||
- [Aspect Libs](https://docs.artela.network/develop/reference/aspect-lib/overview) | ||
### 💥 Build with examples | ||
Our community has built numbers of projects with Aspect, you can refer to these projects and modify them to learn how to use Aspect more effectively. | ||
Simple examples that use the basic functionalities of Aspect: | ||
- Example 1: [Aspect Reentrancy Guard](https://github.com/artela-network/example/blob/rollkit/curve_reentrance/README.md) | ||
- Example 2: [Black List Aspect](https://github.com/artela-network/blacklist-aspect/tree/rollkit) | ||
- Example 3: [Throttler Aspect](https://github.com/artela-network/throttler-aspect/tree/rollkit) | ||
Real-world use cases that show how to build more complex projects with Aspect: | ||
- [Session key Aspect](https://github.com/artela-network/session-key-aspect/tree/rollkit): use Aspect to extend EoA with session keys and improve | ||
- [JIT-gaming Aspect](https://github.com/artela-network/jit-gaming/tree/rollkit): use Aspect to add automatic on-chain NPC for a fully on-chain game. | ||
## 🛑 Stopping the Node | ||
To cease operations and shutdown the Artela rollup node, use: | ||
```bash | ||
docker compose down | ||
``` | ||
This command halts all running containers and clears the environment. | ||
## 🎉 Conclusion | ||
Congratulations! You have successfully learnt some basic knowledge of EVM++ and have set up an Artela EVM++ rollup using Rollkit and local-DA. This setup enables you to test the integrated capabilities of Artela’s EVM++ with Rollkit. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,9 @@ After successfully starting a light node, it's time to start posting the batches | |
|
||
## 🏗️ Prerequisites {#prerequisites} | ||
|
||
From the [GM world rollup](/tutorials/gm-world) tutorial, you should already have the `rollkit` CLI and `ignite` CLI installed. | ||
|
||
* `rollkit` CLI installed from the [GM world rollup](/tutorials/gm-world) tutorial. | ||
* `ignite` CLI v28.4.0 installed `curl https://get.ignite.com/[email protected]! | bash` | ||
|
||
## 🏗️ Building your sovereign rollup {#building-your-sovereign-rollup} | ||
|
||
Remove the existing `gm` project and create a new one using ignite: | ||
|
@@ -49,6 +50,12 @@ Add the Rollkit app: | |
ignite rollkit add | ||
``` | ||
|
||
Build the rollup node binary to use it for the chain configuration and to initialize: | ||
|
||
```bash | ||
ignite chain build | ||
``` | ||
|
||
Initialize the Rollkit chain configuration: | ||
|
||
```bash | ||
|
@@ -120,7 +127,7 @@ The output of the command above will look similar to this: | |
Your DA AUTH_TOKEN is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiXX0.cSrJjpfUdTNFtzGho69V0D_8kyECn9Mzv8ghJSpKRDE | ||
``` | ||
|
||
Lastly, let's set up the namespace to be used for posting data on Celestia: | ||
Next, let's set up the namespace to be used for posting data on Celestia: | ||
|
||
```bash | ||
DA_NAMESPACE=00000000000000000000000000000000000000000008e5f679bf7116cb | ||
|
@@ -138,6 +145,13 @@ Replace the last 20 characters (10 bytes) in `0000000000000000000000000000000000 | |
[Learn more about namespaces](https://docs.celestia.org/developers/node-tutorial#namespaces). | ||
::: | ||
|
||
Lastly, set your DA address for your light node, which by default runs at | ||
port 26658: | ||
|
||
```bash | ||
DA_ADDRESS=http://localhost:26658 | ||
``` | ||
|
||
## 🔥 Running your rollup connected to Celestia light node | ||
|
||
Finally, let's initiate the rollup node with all the flags: | ||
|
@@ -148,6 +162,7 @@ rollkit start \ | |
--rollkit.da_auth_token $AUTH_TOKEN \ | ||
--rollkit.da_namespace $DA_NAMESPACE \ | ||
--rollkit.da_start_height $DA_BLOCK_HEIGHT \ | ||
--rollkit.da_address $DA_ADDRESS \ | ||
--minimum-gas-prices="0.025stake" | ||
``` | ||
|
||
|
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 |
---|---|---|
|
@@ -283,7 +283,7 @@ | |
|
||
"@keplr-wallet/[email protected]": | ||
version "0.12.82" | ||
resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.12.82.tgz#182e542a6463d70933f8b3125bf771cfeef3cc09" | ||
resolved "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.82.tgz" | ||
integrity sha512-cNjkSvIHpWQEaM0cS9eQRJWTdwL55J9LQtRyCfOaB8bSEsFwBOvwcb2vpwMjLCJ3t0zkQ6VirOjvZWPutydpMQ== | ||
dependencies: | ||
long "^4.0.0" | ||
|
@@ -1414,7 +1414,7 @@ uvu@^0.5.0: | |
|
||
vite@^4.4.9: | ||
version "4.5.3" | ||
resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.3.tgz#d88a4529ea58bae97294c7e2e6f0eab39a50fb1a" | ||
resolved "https://registry.npmjs.org/vite/-/vite-4.5.3.tgz" | ||
integrity sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg== | ||
dependencies: | ||
esbuild "^0.18.10" | ||
|