Skip to content

Commit f1c64a0

Browse files
committed
readme improvements
1 parent ca8a34d commit f1c64a0

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@ This Command Line Interface (CLI) is designed to simplify the process of setting
77
* **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.
88
* **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.
99

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)
21+
22+
## Installation
23+
24+
1. Clone the repository:
25+
```bash
26+
git clone https://github.com/madara-alliance/madara-cli.git
27+
cd madara-cli
28+
```
29+
30+
2. Build the CLI:
31+
```bash
32+
cargo build
33+
```
34+
1035
## Containerized Solution
1136

1237
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
87112
Where `MODE` is one of: `devnet`, `full-node`, `sequencer`, or `app-chain`.
88113

89114
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 |
162+
| AppChain deployment fails | Check L1 connection, wallet balance, and network configuration |
163+
| Connection refused | Ensure Docker is running and network settings are correct |

0 commit comments

Comments
 (0)