Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ Emerald is calling the Engine API RPC methods when handling events emitted by th
- `AppMsg::ReceivedProposalPart` When all the parts of a proposed blocked have been received, Emerald validates the block against the execution client by calling `newPayload`.

- `AppMsg::Decided` Once consensus is reached, the block is validated again against the execution client (via a `newPayload` call).
This is necessary as the proposer has not called `newPayload` in `ReceiveProposalParts`
This is necessary as the proposer has not called `newPayload` in `ReceiveProposalParts`.
Then, a call to `forkchoiceUpdated` updates the head of the chain in the execution client.
As an optimization, Emerald avoid re-validation by caching blocks that have been validated already so that non-proposing nodes do not have to call `newPayload` twice.

- `AppMsg::ProcessSyncedValue` When Emerald is syncing, it validates blocks received from other nodes by calling `newPayload` (as in `RecieveProposalParts`).

- `AppMsg::GetDecidedValue` When other Emerald nodes are syncing, they might ask for blocks that are no longer in the local store.
In that case, Emerald is calling `getPayload` to get the block from the execution client.

2 changes: 1 addition & 1 deletion docs/operational-docs/src/architecture/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Architecture

Emerald is a modular framework designed with simplicity at its core, enabling users to deploy reliable, easy to operate, high performance, EVM-compatible networks.
Its architecture is intentionally clean and composable, consisting of three key components.
Its architecture is intentionally clean and composable, consisting of three key components:

- [Consensus Layer](consensus.md)
- [Execution Layer](execution-client.md)
Expand Down
20 changes: 10 additions & 10 deletions docs/operational-docs/src/local-devnet/command-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Use the following command to check the network status:
```
</details>

For example, checking the status after having started a four-node testnet should results in the following output:
For example, checking the status after having started a four-node testnet should result in the following output:

<details>
<summary>Output for <code>emerald testnet status</code></summary>
Expand Down Expand Up @@ -199,7 +199,7 @@ Use the following command to stop a single node:
```
</details>

For example, running this command for Node `1` should results in the following output:
For example, running this command for Node `1` should result in the following output:
<details>
<summary>Output for <code>emerald stop-node 1</code></summary>

Expand All @@ -212,7 +212,7 @@ For example, running this command for Node `1` should results in the following o
```
</details>

And checking the network status should results in the following output:
And checking the network status should result in the following output:
<details>
<summary>Output for <code>emerald status</code></summary>

Expand Down Expand Up @@ -261,7 +261,7 @@ Use the following command to restart an existing node:
```
</details>

For example, restarting the node that was previously stopped should results in the following output:
For example, restarting the node that was previously stopped should result in the following output:

<details>
<summary>Output for <code>emerald start-node 1</code></summary>
Expand Down Expand Up @@ -300,7 +300,7 @@ Starting Reth node 1 on ports:
```
</details>

And checking the network status should results in the following output:
And checking the network status should result in the following output:
<details>
<summary>Output for <code>emerald status</code></summary>

Expand Down Expand Up @@ -351,7 +351,7 @@ Use the following command to add a new node to the network:
```
</details>

Running this command should results in the following output:
Running this command should result in the following output:
<details>
<summary>Output for <code>emerald add-node</code></summary>

Expand Down Expand Up @@ -409,7 +409,7 @@ Starting Reth node 4 on ports:
```
</details>

And checking the network status should results in the following output:
And checking the network status should result in the following output:
<details>
<summary>Output for <code>emerald status</code></summary>

Expand Down Expand Up @@ -518,7 +518,7 @@ Gas used: 153301
```
</details>

And listing the validators should results in the following output:
And listing the validators should result in the following output:

<details>
<summary>Output for <code>emerald-utils poa -r http://127.0.0.1:8645 list</code></summary>
Expand Down Expand Up @@ -569,7 +569,7 @@ Use the following command to stop the local testnet:
```
</details>

Running this command should results in the following output:
Running this command should result in the following output:

<details>
<summary>Output for <code>emerald testnet stop</code></summary>
Expand Down Expand Up @@ -609,7 +609,7 @@ Use the following command to remove all testnet data:
```
</details>

Running this command should results in the following output:
Running this command should result in the following output:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least I was consistent :)


<details>
<summary>Output for <code>emerald testnet destroy</code></summary>
Expand Down
19 changes: 1 addition & 18 deletions docs/operational-docs/src/local-devnet/interactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,6 @@ curl -X POST http://127.0.0.1:8645 \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","latest"],"id":1}'
```

**Send a transaction:**
Copy link
Collaborator Author

@sainoe sainoe Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work in the testnet setup, as it requires the sender's private keys to be available in the EVM client.

```bash
curl -X POST http://127.0.0.1:8645 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"eth_sendTransaction",
"params":[{
"from":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"to":"0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"value":"0x1000000000000000000",
"gas":"0x5208"
}],
"id":1
}'
```

## Using `cast` (Foundry)

**Prerequisite:** [Foundry](https://getfoundry.sh/introduction/installation/)
Expand Down Expand Up @@ -63,7 +46,7 @@ Configure your Web3 library to connect to `http://127.0.0.1:8645`:

**ethers.js (JavaScript):**
```javascript
const { ethers } = require('ethers');
import { ethers } from 'ethers';

const provider = new ethers.JsonRpcProvider('http://127.0.0.1:8645');
const wallet = new ethers.Wallet('0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', provider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ To remove a validator from the active set:

```bash
cargo run --bin emerald-utils poa -r http://127.0.0.1:8645 remove-validator \
--validator-pubkey 0x04681eaaa34e491e6c8335abc9ea92b024ef52eb91442ca3b84598c79a79f31b75... \
--validator-identifier 0x04681eaaa34e491e6c8335abc9ea92b024ef52eb91442ca3b84598c79a79f31b75... \
--owner-private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
```

Expand All @@ -121,7 +121,7 @@ To change a validator's voting weight:

```bash
cargo run --bin emerald-utils poa -r http://127.0.0.1:8645 update-validator \
--validator-pubkey 0x04681eaaa34e491e6c8335abc9ea92b024ef52eb91442ca3b84598c79a79f31b75... \
--validator-identifier 0x04681eaaa34e491e6c8335abc9ea92b024ef52eb91442ca3b84598c79a79f31b75... \
--power 200 \
--owner-private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
```
4 changes: 2 additions & 2 deletions docs/operational-docs/src/local-devnet/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ View consensus logs for each validator:

```bash
# View logs from validator 0
tail -f nodes/0/emerald.log
tail -f nodes/0/logs/node.log

# View logs from all validators simultaneously
tail -f nodes/{0,1,2,3}/emerald.log
tail -f nodes/{0,1,2,3}/logs/node.log
```

**What to look for:**
Expand Down
6 changes: 4 additions & 2 deletions docs/operational-docs/src/local-devnet/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ Before starting, ensure you have:
- Docker Compose (usually included with Docker Desktop)
- Make (typically pre-installed on Linux/macOS; Windows users can use WSL)
- Git (for cloning the repository)
- [Protobuf](https://protobuf.dev/installation) (to compile Emerald `.proto` files)

**Verify installations:**
```bash
rustc --version # Should show rustc 1.85+
rustc --version # Should show rustc 1.88+
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which crates requires 1.88+?
I am able to verify MSRV 1.85 for:

  • app
  • cli
  • engine
  • utils
  • types

We should also update https://github.com/informalsystems/emerald/blob/main/Cargo.toml#L18 accordingly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh and I see we are missing rust-version = { workspace = true } here https://github.com/informalsystems/emerald/blob/main/cli/Cargo.toml#L8

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alloy and Reth require 1.88+.

docker --version # Should show Docker 20.10+
make --version # Should show GNU Make
make --version # Should show GNU Make 3.81+
protoc --version # Should show libprotoc 33.1+
```

## Installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

4. Check emerald logs
```bash
tail -f nodes/0/emerald.log
tail -f nodes/0/logs/node.log
```

## Validator Operations Fail
Expand Down