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

Commit b234337

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

5 files changed

Lines changed: 38 additions & 33 deletions

File tree

documentation/cli/00_overview.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,24 @@ You can print the list of commands by running `leo --help`
2525
- [`debug`](./05_debug.md) - Run the interactive debugger in the current package.
2626
- [`deploy`](./06_deploy.md) - Deploy a program to the Aleo network.
2727
- [`devnet`](./07_devnet.md) - Initialize a local devnet.
28-
- [`execute`](./08_execute.md) - Execute a program and produce a transaction containing a proof.
29-
- [`new`](./09_new.md) - Create a new Leo project in a new directory.
30-
- [`query`](./10_query.md) - Query live data and state from the Aleo network.
31-
- [`block`](./10_query.md#leo-query-block) - Query block information.
32-
- [`transaction`](./10_query.md#leo-query-transaction) - Query transaction information.
33-
- [`program`](./10_query.md#leo-query-program) - Query program source code and live mapping values.
34-
- [`stateroot`](./10_query.md#leo-query-stateroot) - Query the latest stateroot.
35-
- [`committee`](./10_query.md#leo-query-committee) - Query the current committee.
36-
- [`mempool`](./10_query.md#leo-query-mempool) - Query transactions and transmissions from the memory pool.
37-
- [`peers`](./10_query.md#leo-query-peers) - Query peer information.
38-
- [`remove`](./11_remove.md) - Remove a dependency from the current project.
39-
- [`run`](./12_run.md) - Run a program without producing a proof.
40-
- [`test`](./13_test.md) - Run the test cases for a Leo project.
41-
- [`update`](./14_update.md) - Update to the latest version of Leo.
42-
- [`upgrade`](./15_upgrade.md) - Upgrade a deployed program on the Aleo network.
43-
- [`synthesize`](./16_synthesize.md) - Generate proving and verifying keys for a program.
44-
- [`fmt`](./17_fmt.md) - Format Leo source files.
28+
- [`devnode`](./08_devnode.md) - Run a local lightweight devnode.
29+
- [`execute`](./09_execute.md) - Execute a program and produce a transaction containing a proof.
30+
- [`new`](./10_new.md) - Create a new Leo project in a new directory.
31+
- [`query`](./11_query.md) - Query live data and state from the Aleo network.
32+
- [`block`](./11_query.md#leo-query-block) - Query block information.
33+
- [`transaction`](./11_query.md#leo-query-transaction) - Query transaction information.
34+
- [`program`](./11_query.md#leo-query-program) - Query program source code and live mapping values.
35+
- [`stateroot`](./11_query.md#leo-query-stateroot) - Query the latest stateroot.
36+
- [`committee`](./11_query.md#leo-query-committee) - Query the current committee.
37+
- [`mempool`](./11_query.md#leo-query-mempool) - Query transactions and transmissions from the memory pool.
38+
- [`peers`](./11_query.md#leo-query-peers) - Query peer information.
39+
- [`remove`](./12_remove.md) - Remove a dependency from the current project.
40+
- [`run`](./13_run.md) - Run a program without producing a proof.
41+
- [`test`](./14_test.md) - Run the test cases for a Leo project.
42+
- [`update`](./15_update.md) - Update to the latest version of Leo.
43+
- [`upgrade`](./16_upgrade.md) - Upgrade a deployed program on the Aleo network.
44+
- [`synthesize`](./17_synthesize.md) - Generate proving and verifying keys for a program.
45+
- [`fmt`](./18_fmt.md) - Format Leo source files.
4546

4647
## Universal Flags
4748

documentation/cli/05_debug.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ sidebar_label: Debug
1212
`leo debug` has been removed in Leo 4.0. The interactive interpreter is no longer available.
1313
:::
1414

15-
For testing and debugging your Leo programs, use [`leo test`](13_test.md), which runs your test suite against the real VM. For integration testing against a live network or a local devnet, use the [SDK](https://github.com/ProvableHQ/sdk) directly.
15+
For testing and debugging your Leo programs, use [`leo test`](14_test.md), which runs your test suite against the real VM. For integration testing against a live network or a local devnet, use the [SDK](https://github.com/ProvableHQ/sdk) directly.

documentation/cli/08_devnode.md

Lines changed: 17 additions & 13 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,32 @@ 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`) |
4145
| `--socket-addr` | `-a` | `127.0.0.1:3030` | Address and port for the REST API |
4246
| `--genesis-path` | `-g` | (built-in) | Path to a custom genesis block file |
4347
| `--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/` |
48+
| `--ledger-path` | `-l` | (in-memory) | Path for persistent ledger storage. If `-l` is given without a path, defaults to `./devnode` |
4549
| `--clean` | `-c` | `false` | Clear the ledger directory before starting. Requires `--ledger-path` |
4650

4751
**Examples**
4852

4953
```bash
5054
# In-memory (ephemeral, no persistence)
51-
leo devnode start
55+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH
5256

53-
# Persistent, default directory (./devnode/)
54-
leo devnode start -l
57+
# Persistent, default directory (./devnode)
58+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l
5559

5660
# Persistent, custom directory
57-
leo devnode start -l ./my-ledger
61+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l ./my-ledger
5862

5963
# Fresh start — wipe existing ledger before starting
60-
leo devnode start -l --clean
61-
leo devnode start -l ./my-ledger --clean
64+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l --clean
65+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l ./my-ledger --clean
6266

6367
# Manual block creation (blocks only advance when explicitly requested)
64-
leo devnode start -m
68+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -m
6569
```
6670

6771
## `leo devnode advance`
@@ -120,7 +124,7 @@ leo upgrade --skip-deploy-certificate --endpoint http://localhost:3030
120124

121125
```bash
122126
# 1. Start a persistent devnode
123-
leo devnode start -l
127+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l
124128

125129
# 2. Deploy your program (in another terminal, from your Leo project directory)
126130
leo deploy --skip-deploy-certificate --endpoint http://localhost:3030
@@ -129,5 +133,5 @@ leo deploy --skip-deploy-certificate --endpoint http://localhost:3030
129133
leo execute <TRANSITION> <INPUTS> --skip-execute-proof --endpoint http://localhost:3030
130134

131135
# 4. Reset and start fresh when needed
132-
leo devnode start -l --clean
136+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l --clean
133137
```

documentation/cli/13_run.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ toc_max_heading_level: 2
1010

1111
# `leo run`
1212

13-
You can run an entry function by using the `leo run` command. This will simply run the specified entry function with the provided inputs and show what the produced output will be. It will NOT generate the zero-knowledge proof of execution or the transaction, and nothing will be run onchain. For that, please see the [`leo execute`](08_execute.md) command.
13+
You can run an entry function by using the `leo run` command. This will simply run the specified entry function with the provided inputs and show what the produced output will be. It will NOT generate the zero-knowledge proof of execution or the transaction, and nothing will be run onchain. For that, please see the [`leo execute`](09_execute.md) command.
1414

1515
To run a Leo entry function with inputs from the command line, run the following command:
1616

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)