Skip to content

Commit ea9ec2a

Browse files
committed
add doc
1 parent 7c45b17 commit ea9ec2a

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

docs/examples.md

+19
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,25 @@ curl -X POST -k http://localhost:8081/v1/control/listsubnets
186186
avalanche-network-runner control list-subnets
187187
```
188188

189+
To add a node as a validator to a Subnet:
190+
191+
```sh
192+
curl -X POST -k http://localhost:8081/v1/control/addsubnetvalidators -d '[{"subnetId": "'$SUBNET_ID'", "nodeNames":["node1"]}]'
193+
194+
# or
195+
avalanche-network-runner control add-subnet-validators '[{"subnet_id": "'$SUBNET_ID'", "node_names":["node1"]}]'
196+
```
197+
198+
To remove a node as a validator from a Subnet:
199+
200+
```sh
201+
curl -X POST -k http://localhost:8081/v1/control/removesubnetvalidator -d '[{"subnetId": "'$SUBNET_ID'", "nodeNames":["node1"]}]'
202+
203+
# or
204+
avalanche-network-runner control remove-subnet-validator '[{"subnet_id": "'$SUBNET_ID'", "node_names":["node1"]}]'
205+
```
206+
207+
189208
## Operating with blockchains
190209

191210
**Note**: To create a blockchain, the vm binary for it should be present under the plugin dir, with a filename equal to the vm id. The plugin dir

docs/reference.md

+26
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,32 @@ curl --location 'http://localhost:8081/v1/control/addpermissionlessvalidator' \
172172
]}'
173173
```
174174

175+
## `add-subnet-validators`
176+
177+
Adds subnet validators
178+
179+
### Usage
180+
181+
```sh
182+
avalanche-network-runner control add-subnet-validators validatorsSpec [options] [flags]
183+
```
184+
185+
### Example
186+
187+
cli
188+
189+
```sh
190+
avalanche-network-runner control add-subnet-validators '[{"subnet_id": "p433wpuXyJiDhyazPYyZMJeaoPSW76CBZ2x7wrVPLgvokotXz", "node_names":["node1"]}]'
191+
```
192+
193+
curl
194+
195+
```sh
196+
curl --location 'http://localhost:8081/v1/control/addsubnetvalidators' \
197+
--header 'Content-Type: application/json' \
198+
--data '[{"subnetId": "p433wpuXyJiDhyazPYyZMJeaoPSW76CBZ2x7wrVPLgvokotXz", "nodeNames":["node1"]}]'
199+
200+
175201
## `attach-peer`
176202

177203
Attaches a peer to the node.

0 commit comments

Comments
 (0)