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: README.md
+74Lines changed: 74 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,31 @@ This Command Line Interface (CLI) is designed to simplify the process of setting
7
7
***Devnet**: A local development network that functions like a Sequencer but comes with predeployed and funded accounts, as well as test contracts for development purposes. Ideal for developers building and testing applications on StarkNet.
8
8
***AppChain**: A comprehensive suite of tools (including Madara, Orchestrator, Bootstrapper, and others) that enables hassle-free deployment of L2 or L3 solutions with settlement in Ethereum or Starknet. This mode provides everything needed for a production-ready blockchain deployment.
9
9
10
+
## Prerequisites
11
+
12
+
Before using the Madara CLI, ensure you have the following installed:
13
+
14
+
-**Docker** (version 20.10.0 or higher) and Docker Compose
15
+
-**Rust** (version 1.70.0 or higher)
16
+
- Minimum hardware requirements:
17
+
- 4 CPU cores
18
+
- 8GB RAM
19
+
- 50GB free disk space (more recommended for FullNode and Sequencer modes)
20
+
- Open ports: 9944 (P2P), 9933 (RPC), 9615 (Metrics)
Madara CLI runs in a containerized environment, providing all necessary Dockerfiles to build the images locally. The containerization approach ensures:
@@ -87,3 +112,52 @@ cargo run create MODE
87
112
Where `MODE` is one of: `devnet`, `full-node`, `sequencer`, or `app-chain`.
88
113
89
114
This will execute the CLI with the specified mode using default configurations. While this approach might not fully adapt to all specific needs, it provides a quick way to test the CLI.
115
+
116
+
## Examples
117
+
118
+
### Running a Local Devnet
119
+
120
+
For local development and testing:
121
+
122
+
```bash
123
+
# Start a devnet with default settings
124
+
cargo run create devnet
125
+
126
+
# Access the RPC endpoint at http://localhost:9944
127
+
```
128
+
129
+
### Setting Up a Full Node
130
+
131
+
To synchronize with an existing network:
132
+
133
+
```bash
134
+
# Start a full node connected to the Sepolia testnet
135
+
cargo run create full-node
136
+
137
+
# Specify network and RPC endpoint
138
+
cargo run create full-node --network testnet --rpc-api-url https://valid-sepolia-rpc
139
+
```
140
+
141
+
### Deploying an AppChain with Custom Configuration
142
+
143
+
To deploy a custom L2/L3 solution:
144
+
145
+
```bash
146
+
# First create a configuration file
147
+
cargo run init
148
+
149
+
# Edit parameters as needed, then deploy
150
+
cargo run create app-chain --config-file deps/data/my-config.toml
151
+
```
152
+
153
+
## Troubleshooting
154
+
155
+
### Common Issues
156
+
157
+
| Issue | Solution |
158
+
|-------|----------|
159
+
| Docker permission errors | Run with `sudo` or add your user to the Docker group |
160
+
| Port conflicts | Ensure ports 9944, 9933, and 9615 are available or change them in the configuration |
161
+
| Out of disk space | Free up disk space or use a volume with sufficient capacity |
0 commit comments