Skip to content

Add DuskEVM page #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/modular_vs_monolithic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/content/docs/developer/smart-contract/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ description: Discover the essential tools, dependencies, and IDEs for developing

This page explains what dependencies you need to have installed on your computer to start writing smart contracts in Rust.

:::tip
The full list of dependencies and their versions can be found in the <a href="https://github.com/dusk-network/rusk/blob/master/README.md" target="_blank">Rusk</a> readme.
:::

### Rust

To start writing contracts in Rust we need installed <a href="https://www.rust-lang.org/tools/install" target="_blank">Rust</a> 1.71 nightly or higher.
To start writing contracts in Rust we need installed <a href="https://www.rust-lang.org/tools/install" target="_blank">Rust</a> `1.75.0` nightly (nightly-2023-11-10).

:::tip[Install Rust]
You can find information to install Rust <a href="https://www.rust-lang.org/tools/install" target="_blank">here</a>.
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/developer/smart-contract/guides/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ components = ["rust-src", "rustfmt", "cargo", "clippy"]

This ensures compatibility with the `dusk-core` dependency in your contract.

For the full list of dependencies, please look at the <a href="https://github.com/dusk-network/rusk/blob/master/README.md" target="_blank">Rusk</a> readme.

### 3. Add the wasm target

If you have not yet added the wasm32 target to Rust, you can add it with the following command:
Expand Down
4 changes: 3 additions & 1 deletion src/content/docs/learn/core-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Blocks are added to the blockchain if they receive enough votes. The Determinist

[Deep dive into Succinct Attestation](/learn/deep-dive/succinct-attestation)

## Execution Layer: Dusk VM
## Execution Layers

### Dusk VM

[Dusk VM](/learn/deep-dive/dusk-vm) is a highly optimized <a href="https://en.wikipedia.org/wiki/Virtual_machine#Process_virtual_machines" target="_blank">virtual machine</a> built around Wasmtime, a WASM runtime. It is a ZK-friendly virtual machine, enabling the development and execution of privacy-focused smart contracts and applications.

Expand Down
69 changes: 69 additions & 0 deletions src/content/docs/learn/deep-dive/dusk-evm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: DuskEVM
description: DuskEVM is a fully EVM-compatible execution environment built on the Dusk Network. Powered by the OP Stack and EIP-4844 (Proto-Danksharding), it enables developers to leverage EVM tooling while settling on Dusk’s compliant and modular infrastructure.
---

DuskEVM is an EVM-equivalent execution environment within the modular Dusk stack, delivering scalable smart contract execution while inheriting security, consensus, and settlement guarantees from DuskDS.

DuskEVM enables developers to deploy smart contracts using standard EVM tooling while benefiting from a modular architecture designed to support regulatory compliance and meet the needs of financial institutions.

:::note[Note]
The separation of execution environments like DuskEVM from DuskDS introduces modularity into Dusk’s architecture, enabling scalability, extensibility, and protocol composability.
:::

## Dusk's Modular Stack

With the introduction of DuskEVM, Dusk has expanded into a modular stack, providing a clean separation between settlement and execution environments:

| Layer | Description |
|------------------|-----------------------------------------------------------------------------|
| **DuskDS** | Settlement and data availability layer.|
| **DuskEVM** | EVM execution environment |
| **DuskVM** | Execution environment using Phoenix |



DuskDS provides consensus, data availability, and settlement for the disintermediate trading of securities and other regulated assets.

Execution environments like DuskEVM operate at the application layer, where disintermediation logic is executed. These environments can incorporate advanced cryptographic techniques, such as ZK and FHE, to enable privacy-preserving and compliant computations.

:::note[Note]
Dusk's modular architecture makes Dusk highly extensible and composable, as new execution environments can be introduced without modifying the consensus and settlement layer.
:::


### How DuskEVM works

The Ethereum Virtual Machine (EVM) is a general-purpose, stack-based, stateless execution environment that processes smart contract logic. As the EVM is independent of consensus and data availability, it can be instantiated independently.

DuskEVM leverages the <a href="https://docs.optimism.io/stack/getting-started" target="_blank">OP Stack</a> and supports <a href="https://www.eip4844.com/" target="_blank">EIP-4844</a> (Proto-Danksharding)

While DuskEVM uses the OP Stack architecture, it settles directly using DuskDS rather than Ethereum. This required no modification to <a href="https://github.com/ethereum-optimism/optimism" target="_blank">Optimism</a> core components and it has been implemented by adding additional services.


:::note[Note]
DuskEVM leverages DuskDS to store call data and blobs, enabling developers to use EVM tooling while relying on DuskDS for settlement and data availability.
:::


### Components

DuskEVM relies on the following components:

| Component | Description |
|------------------|--------------------------------------------------------------------------|
| **Sequencer** | Batches transactions |
| **Execution Node**| Executes smart contracts
| **Batcher** | Posts data and transaction batches to DuskDS |
| **Fraud Proofs** | Provides a mechanism to challenge invalid state transitions |


:::note[Note]
DuskEVM currently inherits a 7-day challenge period from the OP Stack. This is a temporary limitation, as future upgrades will introduce one-block finality.
:::

### Architecture

The diagram below illustrates Dusk’s evolution from a monolithic design to a modular architecture, where DuskDS acts as the foundational consensus and data availability layer, and multiple execution environments operate independently at the application layer:

![Dusk's modular architecture](../../../../assets/modular_vs_monolithic.png)
Loading