Skip to content
This repository was archived by the owner on May 4, 2026. It is now read-only.

Commit e13e6d0

Browse files
author
Mohammad Fawaz
committed
General improvements to the leo devnode docs
1 parent f8ac219 commit e13e6d0

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

documentation/cli/08_devnode.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ toc_min_heading_level: 2
66
toc_max_heading_level: 2
77
---
88

9-
[general tags]: # "cli, leo_devnode, devnode local_devnode"
9+
[general tags]: # "cli, leo_devnode, devnode, local_devnode"
1010

1111
# `leo devnode`
1212

1313
Leo devnode is a lightweight-node network that bypasses the consensus algorithm and the requirement to generate proofs for deployment and execution transactions. It is a development tool intended for rapidly iterating on Aleo program design and running end-to-end tests prior to deploying Aleo programs to testnet and mainnet.
1414

15+
:::note
16+
`leo devnode` is the recommended local development tool for lightweight testing. The older [`leo devnet`](./07_devnet.md) command (which requires a full snarkOS installation and spins up a multi-validator network) remains available for more complex testing scenarios.
17+
:::
18+
1519
To initialize devnode, run the following command:
1620

1721
```bash
@@ -26,7 +30,7 @@ The default endpoint for a local devnode is `http://localhost:3030`.
2630

2731
<!-- markdown-link-check-enable -->
2832

29-
Press `Ctrl+C` to stop the devnode. If started with persistent storage (`-l`), the ledger state is saved and can be resumed by running `leo devnode start -l` again. If started without persistent storage, the ledger is discarded when the devnode exits.
33+
Press `Ctrl+C` to stop the devnode. If started with `--ledger-path`, the ledger state is saved and can be resumed by running the same command again. If started without `--ledger-path`, the ledger is discarded when the devnode exits.
3034

3135
## `leo devnode start`
3236

@@ -36,32 +40,27 @@ leo devnode start [OPTIONS]
3640

3741
| Flag | Short | Default | Description |
3842
|------|-------|---------|-------------|
39-
| `--private-key` | `-p` | | Private key (required, or set via environment variable) |
43+
| `--private-key` | | | Private key (required, or set via `PRIVATE_KEY` environment variable) |
4044
| `--verbosity` | `-v` | `2` | Log verbosity level (`0``2`) |
41-
| `--socket-addr` | `-a` | `127.0.0.1:3030` | Address and port for the REST API |
42-
| `--genesis-path` | `-g` | (built-in) | Path to a custom genesis block file |
43-
| `--manual-block-creation` | `-m` | `false` | Disable automatic block creation after broadcast |
44-
| `--ledger-path` | `-l` | (in-memory) | Directory for persistent ledger storage. If `-l` is given without a path, defaults to `./devnode/` |
45-
| `--clean` | `-c` | `false` | Clear the ledger directory before starting. Requires `--ledger-path` |
45+
| `--socket-addr` | | `127.0.0.1:3030` | Address and port for the REST API |
46+
| `--genesis-path` | | (built-in) | Path to a custom genesis block file |
47+
| `--manual-block-creation` | | `false` | Disable automatic block creation after broadcast |
48+
| `--ledger-path` | | (in-memory) | Path for persistent ledger storage. If omitted, the ledger is stored in memory and discarded on exit |
4649

4750
**Examples**
4851

4952
```bash
5053
# In-memory (ephemeral, no persistence)
51-
leo devnode start
54+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH
5255

53-
# Persistent, default directory (./devnode/)
54-
leo devnode start -l
56+
# Persistent storage
57+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH --ledger-path ./devnode
5558

5659
# Persistent, custom directory
57-
leo devnode start -l ./my-ledger
58-
59-
# Fresh start — wipe existing ledger before starting
60-
leo devnode start -l --clean
61-
leo devnode start -l ./my-ledger --clean
60+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH --ledger-path ./my-ledger
6261

6362
# Manual block creation (blocks only advance when explicitly requested)
64-
leo devnode start -m
63+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH --manual-block-creation
6564
```
6665

6766
## `leo devnode advance`
@@ -120,14 +119,15 @@ leo upgrade --skip-deploy-certificate --endpoint http://localhost:3030
120119

121120
```bash
122121
# 1. Start a persistent devnode
123-
leo devnode start -l
122+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH --ledger-path ./devnode
124123

125124
# 2. Deploy your program (in another terminal, from your Leo project directory)
126125
leo deploy --skip-deploy-certificate --endpoint http://localhost:3030
127126

128127
# 3. Execute a transition
129128
leo execute <TRANSITION> <INPUTS> --skip-execute-proof --endpoint http://localhost:3030
130129

131-
# 4. Reset and start fresh when needed
132-
leo devnode start -l --clean
130+
# 4. Reset and start fresh when needed (delete the ledger directory, then restart)
131+
rm -rf ./devnode
132+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH --ledger-path ./devnode
133133
```

documentation/guides/08_testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ or
163163
leo test addition
164164
```
165165

166-
See the `leo test` CLI documentation [here](./../cli/13_test.md)
166+
See the `leo test` CLI documentation [here](./../cli/14_test.md)
167167

168168
## Running a Devnet
169169

0 commit comments

Comments
 (0)