Skip to content

Commit

Permalink
add vmid info
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Jul 21, 2023
1 parent 6a11793 commit c2bacf8
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,28 @@ avalanche-network-runner control create-subnets '[{}, {"participants": ["node1",
```
To get a list of all the subnet ids:
```bash
curl -X POST -k http://localhost:8081/v1/control/listsubnets
# or
avalanche-network-runner control list-subnets
```
_Note: To create a blockchain, the vm binary for it should be present under AVALANCHEGO_PLUGIN_DIR, with a filename equal to the vm id.
But, ANR receives a vm name as param, and uses it to generate a vm id to look for. So there is a need to get the expected
vm id from a user given vm name._
To get the vm id associated with a given vm name:
```bash
curl -X POST -k http://localhost:8081/v1/control/vmid -d '{"vmName": "'${VM_NAME}'"}'
# or
avalanche-network-runner control vmid ${VM_NAME}
```
To create a blockchain without a subnet id (requires network restart):
```bash
Expand Down Expand Up @@ -416,6 +438,24 @@ curl -X POST -k http://localhost:8081/v1/control/createblockchains -d '{"pluginD
avalanche-network-runner control create-blockchains '[{"vm_name":"'$VM_NAME'","genesis":"'$GENESIS_PATH'", "subnet_id": "'$SUBNET_ID'", "per_node_chain_config": "'$PER_NODE_CHAIN_CONFIG'", "network_upgrade": "'$NETWORK_UPGRADE_PATH'", "subnet_config": "'$SUBNET_CONFIG_PATH'"}]'
```
To get a list of all the blockchains (containing: blockchain id, subnet id, vm id, vm name):
```bash
curl -X POST -k http://localhost:8081/v1/control/listblockchains
# or
avalanche-network-runner control list-blockchains
```
To get a list of all the rpc urls given for all the blockchains and nodes:
```bash
curl -X POST -k http://localhost:8081/v1/control/listrpcs
# or
avalanche-network-runner control list-rpcs
```
To remove (stop) a node:
```bash
Expand Down

0 comments on commit c2bacf8

Please sign in to comment.