You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -7,6 +7,7 @@ description: Register your node as a validator.
7
7
8
8
importTabsfrom"@theme/Tabs";
9
9
importTabItemfrom"@theme/TabItem";
10
+
importDocCardListfrom"@theme/DocCardList";
10
11
11
12
This guide explains how to register a node as a validator.
12
13
On Flare, any node can be registered as a validator by performing a self-bond on the P-chain against the node's Node-ID, effectively activating the node as a validator.
@@ -37,9 +38,10 @@ Failure to implement these measures significantly increases the risk to your nod
37
38
-**NEVER** expose the node's main API port (default: `9650`) to the public internet. Use a firewall to **only allow** inbound connections on the staking port (default: `9651/TCP`).
38
39
-**NEVER** use the same node instance for both validation and serving public RPC API requests. Public APIs expose your node to potential DoS attacks and exploits that could halt your validator. Run a separate node for RPC needs.
39
40
-**ALWAYS** disable password authentication for SSH. Use strong, key-based authentication exclusively. Consider disabling root login via SSH.
40
-
:::
41
41
42
-
### Recommended Hardening
42
+
:::
43
+
44
+
### Recommended hardening
43
45
44
46
- Configure your node to **enable only** the essential APIs required for validation (often just `["web3"]` within `eth-apis`). Explicitly disable admin APIs (`snowman-api-enabled`, `coreth-admin-api-enabled`).
45
47
-**Firewall Best Practices:**
@@ -52,6 +54,8 @@ Failure to implement these measures significantly increases the risk to your nod
52
54
53
55
## Configure the node
54
56
57
+
### Sample `config.json`
58
+
55
59
As described in [Secure the node](#secure-the-node), a validator node should have minimal APIs enabled.
56
60
Below is a sample `config.json` demonstrating a secure configuration with limited `eth-apis` and disabled admin APIs:
57
61
@@ -92,20 +96,22 @@ Below is a sample `config.json` demonstrating a secure configuration with limite
92
96
}
93
97
```
94
98
95
-
##Staking key and certificate
99
+
### Prepare your staking keys
96
100
97
-
When a node is started, it will generate a `staker.key` and `staker.crt` in the `~/.avalanchego/staking` directory.
98
-
These files define your node's identity (Node-ID) and is the identifier used when staking.
99
-
Before registering your node as a validator, you should backup these files and keep them safe.
100
-
Refer to the [Avalanche documentation](https://build.avax.network/docs/nodes/maintain/backup-restore) for an in-depth breakdown of backup and restoration of staking keys and certificates.
101
+
Your node's identity is defined by two files, `staker.key` and `staker.crt`, which are created in `~/.avalanchego/staking/` the first time you start the node.
102
+
Your `Node-ID` is derived from these files.
101
103
102
-
If you decide to move these files to a secure location, you can add the following parameters in your start command to start the node with the existing key and certificate and thus persist the Node-ID:
Backup the `staker.key` and `staker.crt` and store them in a secure, private location.
107
+
108
+
:::
109
+
110
+
To ensure your node maintains the same `Node-ID` across restarts and machine migrations, you must explicitly tell `go-flare` where to find these files.
107
111
108
-
Confirm your node's Node-ID by running the following command:
112
+
#### Get your Node-ID
113
+
114
+
After starting your node for the first time, retrieve and save your `Node-ID`.
Modify your [`docker run`](/run-node/using-docker#using-docker-cli) command to [mount the directory](/run-node/register-validator#create-a-persistent-staking-directory-recommended-for-docker) containing your keys into the container and set the environment variables to point to the mounted files.
160
+
161
+
```bash
162
+
# Find the latest tag at [https://hub.docker.com/r/flarefoundation/go-flare/tags](https://hub.docker.com/r/flarefoundation/go-flare/tags)
163
+
LATEST_TAG="vX.Y.Z"# e.g., v1.10.0
164
+
165
+
docker run -d --name flare-node \
166
+
-v /mnt/flare-db:/app/db \
167
+
-v /opt/flare/conf:/app/conf \
168
+
-v /opt/flare/staking:/app/staking \ # <-- Mount the staking keys
-e STAKING_TLS_CERT_FILE="/app/staking/staker.crt"\ # <-- Path inside the container
176
+
-e STAKING_TLS_KEY_FILE="/app/staking/staker.key"\ # <-- Path inside the container
177
+
flarefoundation/go-flare:${LATEST_TAG}
178
+
```
179
+
180
+
### Using Docker Compose
181
+
182
+
Modify your [`docker-compose.yaml`](/run-node/using-docker#using-docker-compose) file to include the [staking key volume](/run-node/register-validator#create-a-persistent-staking-directory-recommended-for-docker) and environment variables.
183
+
184
+
```yaml
185
+
services:
186
+
node:
187
+
image: flarefoundation/go-flare:vX.Y.Z # <-- REPLACE with the latest stable tag
188
+
container_name: flare-node
189
+
restart: on-failure
190
+
ports:
191
+
- "127.0.0.1:9650:9650"
192
+
- "0.0.0.0:9651:9651"
193
+
volumes:
194
+
- /mnt/flare-db:/app/db
195
+
- /opt/flare/conf:/app/conf
196
+
- /opt/flare/staking:/app/staking # <-- Mount the staking keys
| **Minimum self-bond amount**| 1M FLR| The minimum stake required to register a validator. |
272
+
| **Minimum delegation amount**| 50K FLR| The minimum amount an FLR holder can delegate to a validator. |
273
+
| **Minimum stake duration**| 2 months | The minimum time a validator's self-bond must be locked. |
274
+
| **Minimum delegation duration** | 2 weeks| The minimum time delegated funds must be locked. |
275
+
| **Stake delay**| Immediate | The time between submitting a stake and it becoming active. |
276
+
| **Delegation factor**| 15x| A multiplier on the self-bond that sets the maximum total stake (including delegations) a validator can accept. |
277
+
| **Maximum total stake**| 200M FLR | The absolute maximum stake a validator can have, including all delegations. |
278
+
| **Max validators per entity** | 4 | The maximum number of validators a single entity can operate. |
188
279
189
-
<details>
190
-
<summary>Understanding the requirements.</summary>
191
-
192
-
-**Minimum self-bond amount:** Minimum stake that an entity must provide to become a validator. This setting reduces staking requests, which frees network resources.
193
-
194
-
-**Minimum delegation amount:** Validators can accept stake delegations from any FLR holder, so their stake and validation rewards are increased.
195
-
The specified value is the minimum stake amount that can be delegated. This setting reduces delegation requests, which frees network resources. Validators can set a staking fee and will earn staking rewards for its own self-bond and a fee on any stake delegated on them.
196
-
This stake delegation is not related to FTSO delegation nor governance delegation.
280
+
See [FIP.05](https://proposals.flare.network/FIP/FIP_5.html) for further details.
197
281
198
-
-**Minimum stake duration:** Minimum amount of time that self-bond funds must remain staked, and therefore locked.
199
-
-**Minimum delegation duration:** Minimum amount of time that delegated funds must remain staked, and therefore locked. This setting does not change. It is included in this list for clarity.
200
-
-**Stake delay:** Duration that passes between the time when funds are staked and the time when they become effective. During this period funds are locked. This delay provided added security when staking was enabled for the first time and stakes were small, since any suspicious stake could be analyzed before it became effective. Now that larger stakes are in place this restriction will be lifted to simplify onboarding of new validators.
201
-
Note that there is no such delay involved when withdrawing staked funds once the staking period expires.
282
+
### Perform the self-bond
202
283
203
-
-**Delegation factor:** The total amount that can be staked to a validator is limited to its self-bond times this factor. For example, with the proposed value of 15, if a validator has a self-bond stake of 1M FLR, the total sum of all stakes, including delegations, cannot exceed 15M FLR. This allows for 14M FLR of delegations.
284
+
To perform the actual staking transaction (the self-bond), you will use the Flare Stake Tool.
285
+
Follow the instructions in the guide below to stake FLR to your `Node-ID` (see how to [get your Node-ID](/run-node/register-validator#get-your-node-id)).
204
286
205
-
-**Maximum total stake:** Maximum stake per validator, including self-bond and delegations.
287
+
<DocCardList
288
+
items={[
289
+
{
290
+
type: "link",
291
+
label: "Using Flare Stake Tool",
292
+
href: "/network/guides/using-flare-stake-tool",
293
+
description: "Stake FLR using the flare-stake-tool CLI.",
294
+
},
295
+
]}
296
+
/>
206
297
207
-
-**Maximum validators per infrastructure entity:** A single infrastructure entity can include up to this amount of validators.
208
-
Infrastructure entities also include FTSO data providers. For example, a single FTSO data provider can create up to 4 validators, each one with its own stake, and claim the validation rewards for all of them.
209
-
This restriction is not enforced by the P-chain staking mechanism but by the mirroring service, and will not take effect until [Staking Phase 3](#staking).
210
-
If an infrastructure entity has more than one validator, each of the validators must fulfill the above requirements.
298
+
### Verify validator status
211
299
212
-
See [FIP.05](https://proposals.flare.network/FIP/FIP_5.html) for further details.
300
+
Once your self-bond transaction is confirmed and the staking period begins, your node will join the active validator set.
301
+
You can monitor its status using an API call or a validator monitoring site.
213
302
214
-
</details>
303
+
- **Via API:**
215
304
216
-
A node becomes a validator when it's owner stakes to their node, referred to as a self-bond.
217
-
The self-bond is performed on the P-chain against the node's Node-ID.
218
-
To understand requirements for the staking process and how to stake, refer to the [Using Flare Stake Tool](/network/guides/using-flare-stake-tool) page.
0 commit comments