@@ -4,8 +4,8 @@ This package implements a simple orchestrator for the avalanchego
4
4
nodes of a local network. Configuration is stored on disk, and nodes
5
5
run as independent processes whose runtime state is also written to
6
6
disk. Using persistent storage for configuration and runtime state
7
- allows for both the avctl cli tool and e2e test fixture to orchestrate
8
- the local networks without the use of an rpc daemon.
7
+ allows for both the testnetctl cli tool and e2e test fixture to
8
+ orchestrate the local networks without the use of an rpc daemon.
9
9
10
10
## Package details
11
11
@@ -27,27 +27,27 @@ shared configuration abstractions without complication.
27
27
28
28
## Usage
29
29
30
- ### Via avctl
30
+ ### Via testnetctl
31
31
32
- A local network can be managed by the avctl cli tool:
32
+ A local network can be managed by the testnetctl cli tool:
33
33
34
34
``` bash
35
35
# From the root of the avalanchego repo
36
36
37
- # Build the avctl binary
38
- $ go build -o build/avctl ./tests/e2e/fixture/cmd/ * .go
37
+ # Build the testnetctl binary
38
+ $ scripts/build_testnetctl.sh
39
39
40
40
# Start a new network
41
- $ ./build/avctl start-network --avalanchego-path=/path/to/avalanchego
41
+ $ ./build/testnetctl start-network --avalanchego-path=/path/to/avalanchego
42
42
...
43
- Started network 1337 @ /home/me/.avctl /1337-20230705-213938-1707053131
43
+ Started network 1337 @ /home/me/.testnetctl /1337-20230705-213938-1707053131
44
44
45
- Configure avctl to target this network by default with one of the following statements:
46
- - source /home/me/.avctl /1337-20230705-213938-1707053131/network.env
47
- - export AVCTL_NETWORK_DIR =/home/me/.avctl /1337-20230705-213938-1707053131
45
+ Configure testnetctl to target this network by default with one of the following statements:
46
+ - source /home/me/.testnetctl /1337-20230705-213938-1707053131/network.env
47
+ - export TESTNETCTL_NETWORK_DIR =/home/me/.testnetctl /1337-20230705-213938-1707053131
48
48
49
49
# Stop the network
50
- $ ./build/avctl stop-network --network-dir=/path/to/network
50
+ $ ./build/testnetctl stop-network --network-dir=/path/to/network
51
51
```
52
52
53
53
### Via code
@@ -57,7 +57,7 @@ A local network can be managed in code:
57
57
``` golang
58
58
network , _ := local.StartNetwork (
59
59
ginkgo.GinkgoWriter ,
60
- " " , // Use default root dir (~/.avctl )
60
+ " " , // Use default root dir (~/.testnetctl )
61
61
&local.LocalNetwork {
62
62
LocalConfig : local.LocalConfig {
63
63
ExecPath: " /path/to/avalanchego" , // Defining the avalanchego exec path is required
@@ -82,7 +82,7 @@ configuration and by supplying a nodeCount argument of `0`:
82
82
``` golang
83
83
network , _ := local.StartNetwork (
84
84
ginkgo.GinkgoWriter ,
85
- " " , // Use default root dir (~/.avctl )
85
+ " " , // Use default root dir (~/.testnetctl )
86
86
&local.LocalNetwork {
87
87
LocalConfig : local.LocalConfig {
88
88
ExecPath: " /path/to/avalanchego" , // Default avalanchego path
@@ -121,7 +121,7 @@ A local network relies on configuration written to disk in the following structu
121
121
122
122
```
123
123
HOME
124
- └── .avctl // Default parent directory for local networks
124
+ └── .testnetctl // Default parent directory for local networks
125
125
└── 1337-20230630-203525-2336789419 // Network path with form [network-id]-[timestamp]
126
126
├── NodeID-37E8UK3x2YFsHE3RdALmfWcppcZ1eTuj9 // The id of a node is the name of its data dir
127
127
│ ├── chainData
@@ -171,11 +171,11 @@ at `[chain-config-dir]/C/cchain_config.json`.
171
171
172
172
### Network env
173
173
174
- A shell script that sets the ` AVCTL_NETWORK_DIR ` env var to the path
175
- of the network is stored at ` [network-dir]/network.env ` . Sourcing this
176
- file (i.e. ` . network.env ` ) in a shell will configure ginkgo e2e and
177
- the avctl command to implicitly target the network path specified in
178
- the env var.
174
+ A shell script that sets the ` TESTNETCTL_NETWORK_DIR ` env var to the
175
+ path of the network is stored at ` [network-dir]/network.env ` . Sourcing
176
+ this file (i.e. ` . network.env ` ) in a shell will configure ginkgo e2e
177
+ and the testnetctl command to implicitly target the network path
178
+ specified in the env var.
179
179
180
180
### Node configuration
181
181
0 commit comments