1
- # Voi Swarm Participation Node Setup
1
+ # Voi Swarm
2
2
3
- ## Prerequisites
3
+ ## About
4
4
5
- - ` curl `
6
- - ` apt-get `
5
+ This repository contains the installation script and configuration files for setting up a Voi participation node on a
6
+ Linux system.
7
7
8
- If any package is not available on your system, or if you do not have permission to use said package, follow operating
9
- system guidance on installation and setup.
8
+ Success criteria for the installation script are:
10
9
11
- ## Supported Operating Systems and Compute Platforms
10
+ Focus on providing a good user experience.
11
+ Provide a simple and easy way to onboard new participants.
12
+ Offer easy ways for users to operate and maintain their nodes.
12
13
13
- ### Operating Systems
14
+ To achieve the above the package is an opinionated way to join the network, and may thus not be suitable for
15
+ all use cases.
14
16
15
- - Debian
16
- - Ubuntu
17
+ ## Documentation
17
18
18
- ### Compute Platforms
19
+ Documentation can be found on [ https://voinetwork.github.io/voi-swarm/ ] ( https://voinetwork.github.io/voi-swarm/ )
19
20
20
- - arm64
21
- - amd64 (x86_64)
21
+ ## Contributing
22
22
23
- ## New to Voi
23
+ Contributions are welcome! Please join the [ Voi Network Discord server] ( https://discord.com/invite/vnFbrJrHeW ) to discuss
24
+ with other community members and contributors. You can also open an issue or a pull request on GitHub.
24
25
25
- To set up a new Voi node, run the following command:
26
+ ## License
26
27
27
- ``` bash
28
- /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh) "
29
- ```
30
-
31
- ## Using an Existing Account/Address with Mnemonic
28
+ AGPL-3.0. See [ LICENSE] ( LICENSE ) for more information.
32
29
33
- If you have an existing account/address with a mnemonic that you want to use, set the VOINETWORK_IMPORT_ACCOUNT
34
- environment variable to 1 and run the installation script:
35
-
36
- ``` bash
37
- export VOINETWORK_IMPORT_ACCOUNT=1
38
- /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh) "
39
- ```
40
30
41
- ## Installing Without Wallet Setup
42
31
43
- If you want to install without including wallet setup, set the VOINETWORK_SKIP_WALLET_SETUP environment variable to 1
44
- and run the installation script:
45
-
46
- ``` bash
47
- export VOINETWORK_SKIP_WALLET_SETUP=1
48
- /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh) "
49
- ```
50
32
51
33
## Updating Your Participation Key
52
34
@@ -59,199 +41,4 @@ expire, rerun the installation script to generate a new key.
59
41
/bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh) "
60
42
```
61
43
62
- ## Setting up Participation Key Expiry Notifications (Recommended)
63
-
64
- Each online account has a participation key that needs to be valid for the account to participate in the Voi network.
65
- A participation key is valid for a certain number of rounds, which is approximately 14 days. When the participation key
66
- expires the node runner will no longer be able to propose or vote on blocks. To avoid this situation you need to renew
67
- the participation key before expiration.
68
-
69
- To receive a notification when the participation key is about to expire, you can do the following:
70
-
71
- ### Copy the Example File
72
-
73
- Start by copying the example notification.yml file to the voi/docker directory:
74
-
75
- ` cp ~/voi/docker/notification.yml.example ~/voi/docker/notification.yml `
76
-
77
- ### Update the notification.yml File
78
-
79
- Update the notification.yml file with your preferred notification mechanism by updating the NOTIFICATION_URLS
80
- environment variable. The notification mechanism can be a webhook, email, push, or any other notification mechanism that
81
- is available via [ Apprise notifications] ( https://github.com/caronc/apprise?tab=readme-ov-file#supported-notifications )
82
-
83
- If you want to use multiple mechanisms, separate them with a comma. For example, to use both Discord and Pushbullet for
84
- notification, you would set the ` NOTIFICATION_URLS ` value in the ` notification.yml ` file to:
85
-
86
- ``` yaml
87
- NOTIFICATION_URLS="discord://<webhook_id>/<webhook_token>,pushbullet://<access_token>"
88
- ```
89
-
90
- ### Updating Notification Schedule
91
-
92
- To modify the notification schedule, adjust the ` - swarm.cronjob.schedule=0 16 * * * ` label in the copied example file.
93
- This is by default set to run daily at 4 PM UTC. Adjust this to your preferred time, accounting for your
94
- timezone's UTC offset. Use a resource like [ dateful.com] ( https://dateful.com/time-zone-converter ) for timezone conversion.
95
-
96
- The format of the schedule is following the standard [ cronjob format] ( https://en.wikipedia.org/wiki/Cron#Overview ) .
97
-
98
- ### Applying Notification Configuration to the Stack
99
-
100
- To apply your notification configuration to the stack, rerun the installation script:
101
-
102
- ``` bash
103
- /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh) "
104
- ```
105
-
106
- ### Testing Your Notification Configuration
107
-
108
- To test your notification configuration, you can manually trigger the notification service by running the following command:
109
-
110
- ``` bash
111
- ~ /voi/bin/notification-test
112
- ```
113
-
114
- ## Setting a Custom Telemetry Name
115
-
116
- To set a custom telemetry name, set the VOINETWORK_TELEMETRY_NAME environment variable to your desired name:
117
-
118
- ``` bash
119
- export VOINETWORK_TELEMETRY_NAME=" my_custom_telemetry_name"
120
- /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh) "
121
- ```
122
-
123
- Custom telemetry name can be combined with other environment variables.
124
-
125
- ## Uninstalling
126
-
127
- To uninstall, execute the following commands:
128
-
129
- - Leave the Swarm with ` docker swarm leave --force `
130
- - Remove the ` voi ` directory with ` rm -rf /voi/ `
131
- - Remove the ` data ` directory with ` sudo rm -rf /var/lib/voi `
132
-
133
- ## Useful Scripts
134
-
135
- This section provides a collection of useful scripts for managing your Voi participation node. These scripts are
136
- designed to be executed within a running Docker container. They closely follow the commands outlined in the
137
- [ D13 guide] ( https://d13.co/posts/set-up-voi-participation-node/ ) for setting up a Voi participation node under Ubuntu 22.04.
138
-
139
- ### Creating a Node Wallet
140
-
141
- Create a new wallet with the following command:
142
-
143
- ``` bash
144
- ~ /voi/bin/create-wallet < wallet_name>
145
- ```
146
-
147
- ### Creating an Account
148
-
149
- Create a new account with the following command:
150
-
151
- ``` bash
152
- ~ /voi/bin/create-account
153
- ```
154
-
155
- ### Retrieving Account Mnemonic
156
-
157
- Retrieve the mnemonic of an existing account with the following command:
158
-
159
- ``` bash
160
- ~ /voi/bin/get-account-mnemonic < account_address>
161
- ```
162
-
163
- ### Importing an Account
164
-
165
- Import an existing account with the following command:
166
-
167
- ``` bash
168
- ~ /voi/bin/import-account
169
- ```
170
-
171
- ### Generating Participation Key
172
-
173
- Generate a participation key for an existing account with the following command:
174
-
175
- ``` bash
176
- ~ /voi/bin/generate-participation-key < account_address>
177
- ```
178
-
179
- ### Checking Participation Status
180
-
181
- Check the participation status of an existing account with the following command:
182
-
183
- ``` bash
184
- ~ /voi/bin/get-participation-status < account_address>
185
- ```
186
-
187
- ### Going Online
188
-
189
- Bring an existing account online with the following command:
190
-
191
- ``` bash
192
- ~ /voi/bin/go-online < account_address>
193
- ```
194
-
195
- ### Going Offline
196
-
197
- Take an existing account offline with the following command:
198
-
199
- ``` bash
200
- ~ /voi/bin/go-offline < account_address>
201
- ```
202
-
203
- ### Executing Goal Commands
204
-
205
- Execute goal commands with the following command:
206
-
207
- ``` bash
208
- ~ /voi/bin/goal < goal_command>
209
- ```
210
-
211
- ### Opening a Bash Shell in the AVM Container
212
-
213
- Open a bash shell in the AVM container with the following command:
214
-
215
- ``` bash
216
- ~ /voi/bin/start-shell
217
- ```
218
-
219
- ### Getting Basic Node Health
220
-
221
- To retrieve basic health information about your node, execute the following command:
222
-
223
- ``` bash
224
- ~ /voi/bin/get-node-status
225
- ```
226
-
227
- The ` get-node-status ` command performs checks using:
228
-
229
- - ` goal node status ` to connect to the running daemon and retrieve basic node information
230
- - ` /health ` : This API endpoint checks the reported health of the node. [ REST API /health documentation] ( https://developer.algorand.org/docs/rest-apis/algod/#get-health ) .
231
- - ` /ready ` : This API endpoint checks the reported readiness of the node and if fully caught up. [ REST API /ready documentation] ( https://developer.algorand.org/docs/rest-apis/algod/#get-ready ) .
232
-
233
- ### Testing Notifications
234
-
235
- To test notifications execute the following command:
236
-
237
- ``` bash
238
- ~ /voi/bin/notification-test
239
- ```
240
-
241
- ## Debugging
242
-
243
- ### Startup state for services in stack
244
-
245
- ` docker stack ps --no-trunc voinetwork `
246
-
247
- ### Replication state for services in stack
248
-
249
- ` docker service ls `
250
-
251
- ### Pull log files
252
-
253
- ` docker service logs voinetwork_algod `
254
-
255
- ### Inspect service
256
44
257
- ` docker inspect voinetwork_algod `
0 commit comments