Skip to content

Commit 8047d9f

Browse files
committed
add solana chain to the docs
1 parent 6ff0e6c commit 8047d9f

File tree

2 files changed

+177
-1
lines changed

2 files changed

+177
-1
lines changed

docs/config/_meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"chains": "Chains Directive Syntax",
44
"relayers": "Relayers Directive Syntax",
55
"features": "Feature Toggles",
6-
"ethereum": "Ethereum"
6+
"ethereum": "Ethereum",
7+
"solana": "Solana"
78
}

docs/config/solana.mdx

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# Solana Chain Configuration in Starship
2+
3+
Solana support in Starship allows users to deploy Solana validator nodes using simple configurations.
4+
This section details how to configure Solana-based chains within Starship.
5+
6+
## Solana Chain
7+
8+
The Solana chain runs a Solana validator node that can handle transactions and maintain the blockchain state.
9+
10+
### Basic Config
11+
```yaml
12+
chains:
13+
- id: solana
14+
name: solana
15+
numValidators: 2
16+
ports:
17+
rpc: 8899
18+
ws: 8900
19+
exposer: 8001
20+
faucet: 9900
21+
resources:
22+
cpu: 2000m
23+
memory: 2048Mi
24+
```
25+
26+
### Lite Configuration (CI/Testing)
27+
28+
For CI environments or testing scenarios where you need minimal resource usage, you can use the lite configuration:
29+
30+
```yaml
31+
chains:
32+
- id: solana
33+
name: solana
34+
numValidators: 1
35+
ports:
36+
rpc: 8899
37+
ws: 8900
38+
exposer: 8001
39+
faucet: 9900
40+
resources:
41+
cpu: 1500m
42+
memory: 1500Mi
43+
44+
exposer:
45+
resources:
46+
cpu: 100m
47+
memory: 100Mi
48+
49+
faucet:
50+
resources:
51+
cpu: 200m
52+
memory: 200Mi
53+
```
54+
55+
## Configuration Options
56+
57+
### Chain Properties
58+
59+
- **id**: The chain identifier (can be string or number)
60+
- **name**: Must be `"solana"` for Solana chains
61+
- **numValidators**: Number of validator nodes to deploy (minimum: 1)
62+
63+
### Ports
64+
65+
- **rpc**: JSON RPC port (default: 8899)
66+
- **ws**: WebSocket port (default: 8900)
67+
- **exposer**: Exposer service port for chain information
68+
- **faucet**: Faucet service port for requesting test tokens
69+
70+
### Resources
71+
72+
You can specify CPU and memory resources for the Solana validators:
73+
74+
```yaml
75+
resources:
76+
cpu: 2000m # 2 CPU cores
77+
memory: 2048Mi # 2GB RAM
78+
```
79+
80+
For lighter deployments (like CI), you can reduce these requirements:
81+
82+
```yaml
83+
resources:
84+
cpu: 1500m # 1.5 CPU cores
85+
memory: 1500Mi # 1.5GB RAM
86+
```
87+
88+
## Default Configuration
89+
90+
Starship uses the following defaults for Solana chains:
91+
92+
- **Image**: `ghcr.io/hyperweb-io/starship/solana-agave:v2.3.4`
93+
- **Binary**: `solana-validator`
94+
- **Home Directory**: `/root/.solana`
95+
- **Denomination**: `lamports` (base unit), `sol` (display unit)
96+
- **HD Path**: `m/44'/501'/0'/0'`
97+
- **Coin Type**: 501
98+
- **Faucet**: Enabled by default with Solana-specific faucet
99+
100+
## Registry Integration
101+
102+
When using the registry service, Solana chains are automatically registered with the following asset information:
103+
104+
```yaml
105+
registry:
106+
enabled: true
107+
ports:
108+
rest: 8081
109+
resources:
110+
cpu: "0.1"
111+
memory: "100M"
112+
```
113+
114+
## Usage Examples
115+
116+
### Full Development Environment
117+
118+
For a complete development setup with multiple validators:
119+
120+
```yaml
121+
name: solana-dev
122+
version: 1.10.0
123+
124+
chains:
125+
- id: solana
126+
name: solana
127+
numValidators: 2
128+
ports:
129+
rpc: 8899
130+
ws: 8900
131+
exposer: 8001
132+
faucet: 9900
133+
resources:
134+
cpu: 2000m
135+
memory: 2048Mi
136+
137+
registry:
138+
enabled: true
139+
ports:
140+
rest: 8081
141+
```
142+
143+
### CI/Testing Environment
144+
145+
For continuous integration or testing environments where resources are limited:
146+
147+
```yaml
148+
name: solana-ci
149+
version: 1.10.0
150+
151+
chains:
152+
- id: solana
153+
name: solana
154+
numValidators: 1
155+
ports:
156+
rpc: 8899
157+
ws: 8900
158+
exposer: 8001
159+
faucet: 9900
160+
resources:
161+
cpu: 1500m
162+
memory: 1500Mi
163+
164+
exposer:
165+
resources:
166+
cpu: 100m
167+
memory: 100Mi
168+
169+
faucet:
170+
resources:
171+
cpu: 200m
172+
memory: 200Mi
173+
```
174+
175+
This lite configuration is perfect for CI pipelines where you need to test Solana functionality with minimal resource overhead.

0 commit comments

Comments
 (0)