You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/cli/05_debug.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,4 @@ sidebar_label: Debug
12
12
`leo debug` has been removed in Leo 4.0. The interactive interpreter is no longer available.
13
13
:::
14
14
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.
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.
13
+
A 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.
14
14
15
-
To initialize devnode, run the following command:
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
+
19
+
To initialize a devnode, run the following command:
16
20
17
21
```bash
18
22
leo devnode start --private-key <PRIVATE_KEY>
@@ -26,7 +30,7 @@ The default endpoint for a local devnode is `http://localhost:3030`.
26
30
27
31
<!-- markdown-link-check-enable -->
28
32
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.
30
34
31
35
## `leo devnode start`
32
36
@@ -36,20 +40,26 @@ leo devnode start [OPTIONS]
36
40
37
41
| Flag | Short | Default | Description |
38
42
|------|-------|---------|-------------|
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) |
|`--socket-addr`|`-a`|`127.0.0.1:3030`| Address and port for the REST API |
42
46
|`--genesis-path`|`-g`| (built-in) | Path to a custom genesis block file |
43
47
|`--manual-block-creation`|`-m`|`false`| Disable automatic block creation after broadcast |
48
+
<<<<<<< HEAD
44
49
|`--storage`|`-s`| (in-memory) | Directory for persistent ledger storage. If `-l` is given without a path, defaults to `./devnode/`|
45
50
|`--clear-storage`|`-c`|`false`| Clear the ledger directory before starting. Requires `--storage`|
51
+
=======
52
+
|`--ledger-path`|`-l`| (in-memory) | Path for persistent ledger storage. If `-l` is given without a path, defaults to `./devnode`|
53
+
|`--clean`|`-c`|`false`| Clear the ledger directory before starting. Requires `--ledger-path`|
54
+
>>>>>>> b8a96c0d62f165a26a91d2d23c18bae88f72a67e
46
55
47
-
**Examples**
56
+
### **Examples**
48
57
49
58
```bash
50
59
# In-memory (ephemeral, no persistence)
51
-
leo devnode start
60
+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH
52
61
62
+
<<<<<<< HEAD
53
63
# Persistent, default directory (./devnode/)
54
64
leo devnode start -s
55
65
@@ -59,9 +69,20 @@ leo devnode start -s ./my-ledger
59
69
# Fresh start — wipe existing ledger before starting
60
70
leo devnode start -s --c
61
71
leo devnode start -s ./my-ledger -c
72
+
=======
73
+
# Persistent, default directory (./devnode)
74
+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l
75
+
76
+
# Persistent, custom directory
77
+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l ./my-ledger
78
+
79
+
# Fresh start — wipe existing ledger before starting
80
+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l --clean
81
+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -l ./my-ledger --clean
82
+
>>>>>>> b8a96c0d62f165a26a91d2d23c18bae88f72a67e
62
83
63
84
# Manual block creation (blocks only advance when explicitly requested)
64
-
leo devnode start -m
85
+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -m
65
86
```
66
87
67
88
## `leo devnode advance`
@@ -77,7 +98,7 @@ leo devnode advance [NUM_BLOCKS] [OPTIONS]
77
98
|`NUM_BLOCKS`|`1`| Number of blocks to create |
78
99
|`--socket-addr`|`127.0.0.1:3030`| Address of the running devnode |
79
100
80
-
**Examples**
101
+
### **Examples**
81
102
82
103
```bash
83
104
# Advance by 1 block
@@ -90,27 +111,27 @@ leo devnode advance 10
90
111
leo devnode advance 5 --socket-addr 127.0.0.1:4040
91
112
```
92
113
93
-
## Using Leo CLI Commands with Devnode
114
+
## Skipping Proof Generation
94
115
95
116
When targeting a devnode, two proof-generation steps can be skipped for faster iteration. Proofs are not verified by the devnode, so generating them is unnecessary overhead.
96
117
97
-
**Deploying a program**
118
+
### **Deploying a Program**
98
119
99
120
```bash
100
121
leo deploy --skip-deploy-certificate --endpoint http://localhost:3030
101
122
```
102
123
103
124
`--skip-deploy-certificate` skips generating the deployment proof. Without it, deployment will still work but will be significantly slower.
104
125
105
-
**Executing a transition**
126
+
### **Executing a Transition**
106
127
107
128
```bash
108
129
leo execute <TRANSITION><INPUTS> --skip-execute-proof --endpoint http://localhost:3030
109
130
```
110
131
111
132
`--skip-execute-proof` skips generating the execution proof. Without it, execution will still work but will be significantly slower.
112
133
113
-
**Upgrading a program**
134
+
### **Upgrading a Program**
114
135
115
136
```bash
116
137
leo upgrade --skip-deploy-certificate --endpoint http://localhost:3030
@@ -120,7 +141,7 @@ leo upgrade --skip-deploy-certificate --endpoint http://localhost:3030
120
141
121
142
```bash
122
143
# 1. Start a persistent devnode
123
-
leo devnode start -s
144
+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -s
124
145
125
146
# 2. Deploy your program (in another terminal, from your Leo project directory)
126
147
leo deploy --skip-deploy-certificate --endpoint http://localhost:3030
@@ -129,5 +150,5 @@ leo deploy --skip-deploy-certificate --endpoint http://localhost:3030
129
150
leo execute <TRANSITION><INPUTS> --skip-execute-proof --endpoint http://localhost:3030
130
151
131
152
# 4. Reset and start fresh when needed
132
-
leo devnode start -s -c
153
+
leo devnode start --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH -s -c
Copy file name to clipboardExpand all lines: documentation/cli/13_run.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ toc_max_heading_level: 2
10
10
11
11
# `leo run`
12
12
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.
14
14
15
15
To run a Leo entry function with inputs from the command line, run the following command:
0 commit comments