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
Copy file name to clipboardExpand all lines: docs/bee/working-with-bee/cashing-out.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The token you desire to withdraw is specified in the path directly:
28
28
```bash
29
29
http://localhost:1633/wallet/withdraw/{coin}
30
30
```
31
-
For `coin`, you can use the value `NativeToken` for xDAI or `BZZ` for xBZZ.
31
+
For `coin`, you can use the value `NativeToken` for xDAI or `BZZ` for xBZZ.
32
32
33
33
The `amount` query parameter is used to specify how much of the token you wish to withdraw. The value should be specified in the lowest denomination for each token (wei for xDAI and PLUR for xBZZ).
@@ -11,36 +11,93 @@ This guide will walk you through **staking xBZZ** and participating in the **red
11
11
Staking requires a fully synced full node and a minimum of 10 xBZZ. See detailed [staking requirements](/docs/bee/working-with-bee/staking#requirements) below.
12
12
:::
13
13
14
-
### Step 1: Fund Your Node with xDAI
14
+
### Prerequisites
15
15
16
-
Your node needs **xDAI** to pay for transaction fees on Gnosis Chain.
16
+
- A small amount of xDAI to pay transaction fees - ~0.01 xDAI is enough to start
17
+
- At least 10 xBZZ to deposit as non-refundable stake
18
+
- A fully synced full Bee node
17
19
18
-
Run this command to check how much is required:
20
+
:::tip
21
+
If you don't already have xDAI or xBZZ, you will need to [get some](/docs/bee/installation/fund-your-node#getting-tokens).
22
+
:::
23
+
24
+
### Step 1: Fund Your Node with xDAI and xBZZ
25
+
26
+
Your node needs **xDAI** to pay for transaction fees on Gnosis Chain, and also needs **xBZZ** to deposit as stake.
27
+
28
+
First, find your node's address using:
19
29
20
30
```bash
21
-
curl localhost:1633/redistributionstate | jq
31
+
swarm-cli addresses
22
32
```
23
-
Check the `"minimumGasFunds"` field in the response.
33
+
34
+
This will print your node's various addresses. The one you need to fund is `Ethereum`
24
35
25
36
:::tip
26
-
**Recommended:** Deposit at least **0.5 xDAI** to cover fees for the next few weeks/months of active staking.
37
+
The `Ethereum` term here refers to an Ethereum style address on Gnosis Chain. Do not send funds to the address on the Ethereum chain itself.
Then, use the following command to check how much is required:
48
+
49
+
```bash
50
+
swarm-cli status
51
+
```
52
+
53
+
At the bottom of the results printed to the terminal you will find the `Redistribution` section. From there you will see the `Minimum gas funds` item. That value is the minimum amount required to participate in a *single redistribution round*.
54
+
55
+
:::tip
56
+
If you plan on operating your node for an extended period, you will want to deposit quite a bit more than the minimum. You can start with **0.01 xDAI** to cover fees for the next few weeks/months of active staking, and then monitor actual usage and top-up when needed.
57
+
:::
58
+
59
+
```
60
+
Redistribution
61
+
Reward: 0.0000000000000000
62
+
Has sufficient funds: true
63
+
Fully synced: true
64
+
Frozen: false
65
+
Last selected round: 263526
66
+
Last played round: 0
67
+
Last won round: 0
68
+
Minimum gas funds: 0.000000000326250000
69
+
```
70
+
71
+
Finally, send the required xDAI and xBZZ to the address you got from `swarm-cli addresses`.
72
+
73
+
You will need to send at least 10 xBZZ to get started staking.
74
+
75
+
:::tip
76
+
Send **20 xBZZ** if using the [reserve doubling](#reserve-doubling) feature.
77
+
:::
78
+
79
+
### Step 2: Stake xBZZ
30
80
31
81
Once your node has xDAI, stake **at least 10 xBZZ** (this is non-refundable).
32
82
83
+
You can use the following `swarm-cli` command to stake 10 xBZZ:
84
+
85
+
:::info
86
+
The deposit amount is specified in [PLUR](/docs/references/glossary/#plur)
87
+
:::
88
+
33
89
```bash
34
-
curl -X POST localhost:1633/stake/100000000000000000
90
+
swarm-cli stake --deposit 100000000000000000
35
91
```
36
92
37
-
Confirm the staking transaction was successful using `GET /stake`:
93
+
After a moment, the staking transaction will complete. Then you can check that the transaction was successful:
38
94
39
95
```bash
40
-
curl localhost:1633/stake
96
+
swarm-cli stake
41
97
```
98
+
42
99
```bash
43
-
{"stakedAmount":"100000000000000000"}
100
+
Staked xBZZ: 10
44
101
```
45
102
46
103
:::tip
@@ -53,18 +110,10 @@ After staking you should [check your node's status](/docs/bee/working-with-bee/s
53
110
54
111
### Step 4: Monitor & Maximize Rewards
55
112
56
-
✅ Use a stable Gnosis Chain [RPC endpoint](/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint)
57
-
✅ [Check `/redistributionstate`](/docs/bee/working-with-bee/staking#check-redistribution-status) to ensure `isFullySynced` and `hasSufficientFunds` are consistently `true`, and `isFrozen` is `false`.
58
-
✅ [Check `/rchash`](/docs/bee/working-with-bee/bee-api#rchash) to ensure your node's performance is sufficient
59
-
60
-
61
-
### Next Steps
62
-
63
-
***🛠 Troubleshooting?** See the [Troubleshooting Guide](#troubleshooting).
64
-
65
-
***💰 Want to maximize earnings?** Read [Maximizing Rewards](#maximize-rewards).
113
+
✅ Make sure you are using a stable Gnosis Chain [RPC endpoint](/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint).
114
+
✅ [Check your node's status](/docs/bee/working-with-bee/staking#check-redistribution-status) to ensure it's operating properly.
115
+
✅ [Check `/rchash`](/docs/bee/working-with-bee/bee-api#rchash) to ensure your node's performance is sufficient.
66
116
67
-
***📖 Want to learn more?** Just continue reading through the rest of this page for an in-depth exploration of staking on Swarm.
68
117
69
118
70
119
## Staking Overview
@@ -81,66 +130,7 @@ Only stake your xBZZ if you intend to participate as a full node, as withdrawals
81
130
- A [high-performance RPC endpoint](/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint) connection to Gnosis Chain.
82
131
- A minimum of 10 xBZZ to be used as ***non-refundable*** stake (the requirement is increased if [reserve doubling](/docs/bee/working-with-bee/staking#reserve-doubling) is used).
83
132
84
-
### Add xDAI
85
-
86
-
Before staking, a node must first be funded with a small amount of xDAI to pay for Gnosis Chain transaction fees.
87
-
88
-
You can check exactly how much xDAI is required to get started with staking from the `/redistributionstate` endpoint:
The `"3750000030000000"` value listed for `"minimumGasFunds"` is the minimum required amount of xDAI denominated in Wei ($1 \text{xDAI} = 10^{18} \text{ Wei}$) required for staking. That is equivalent to 0.00375 xDAI. However, it's recommended to add more than just the minimum amount, since it will quickly be used up by storage incentives related transaction fees. As little as 0.5 xDAI should last for weeks or even months, as the average incentive-related transaction fee can be as low as 0.001 xDAI or less.
118
-
119
-
### Add xBZZ
120
-
121
-
Your node must be funded with a minimum of 10 xBZZ before performing the staking transaction. An additional 10 xBZZ is required if the [reserve doubling](/docs/bee/working-with-bee/staking#reserve-doubling) feature is used. If you don't already have xBZZ, you will need [get some](/docs/bee/installation/fund-your-node#how-to-get-xbzz) and transfer it to your [node's wallet](/docs/bee/installation/fund-your-node#funding-your-wallet).
122
-
123
-
### Deposit stake
124
-
125
-
Once your node has xDAI to pay for transaction fees, you can use the `POST /stake` endpoint to add the initial required minimum 10 xBZZ stake. The amount is denominated in [PLUR](/docs/references/glossary#plur), the smallest denomination of xBZZ:
126
-
127
-
```bash
128
-
curl -X POST localhost:1633/stake/100000000000000000
129
-
```
130
-
131
-
If the command executed successfully it returns a transaction hash that you can use to verify on a block explorer such as [GnosisScan](https://gnosisscan.io).
132
-
133
-
It is possible to deposit more by repeatedly using the command above.
134
-
135
-
You can also check the amount staked with a `GET /stake` request:
136
-
137
-
```bash
138
-
curl localhost:1633/stake
139
-
```
140
-
141
-
```bash
142
-
{"stakedAmount":"100000000000000000"}
143
-
```
133
+
144
134
145
135
### Check Status
146
136
@@ -438,7 +428,117 @@ Use the binary number you just copied and set it as a string value for the `targ
438
428
## bee.yaml
439
429
target-neighborhood: "01100011110"
440
430
```
441
-
431
+
432
+
## Stake Migration
433
+
434
+
If a new Bee release includes an updated staking contract, then you will be required to migrate your node's stake in order to continue normal operation. The stake migration process consists of the following steps:
435
+
436
+
1. Withdraw xBZZ
437
+
2. Stop node
438
+
3. Update and restart
439
+
4. Re-stake to the new contract
440
+
441
+
442
+
### Step 1: Withdraw xBZZ
443
+
444
+
When a new version of Bee is released with an updated staking contract, the previous staking contract will be disabled, and stake withdrawals will be enabled.
445
+
446
+
Once the contract is disabled, stake can be withdrawn by calling the `/stake` endpoint with the `DELETE` method:
447
+
448
+
```bash
449
+
curl -X DELETE http://localhost:1633/stake
450
+
```
451
+
452
+
This command will withdraw all stake from the node to the node’s Gnosis Chain address.
453
+
454
+
Confirm that the stake was withdrawn:
455
+
456
+
```bash
457
+
curl -s http://localhost:1633/stake | jq
458
+
```
459
+
The value for`stakedAmount` should now be zero:
460
+
```
461
+
{
462
+
"stakedAmount": "0"
463
+
}
464
+
```
465
+
### Step 2: Stop node
466
+
467
+
This step will vary depending on how the node was set up:
468
+
469
+
```bash
470
+
sudo systemctl stop bee
471
+
```
472
+
473
+
or
474
+
475
+
```
476
+
docker compose down
477
+
```
478
+
479
+
or
480
+
481
+
```
482
+
docker stop <container_name_or_id>
483
+
```
484
+
485
+
etc.
486
+
487
+
### Step 3: Update and restart
488
+
489
+
:::danger
490
+
Before every Bee client upgrade, it is best practice to ALWAYS take a full [backup](/docs/bee/working-with-bee/backups) of your node.
491
+
:::
492
+
493
+
After withdrawing stake and stopping the node, update to the newest version of Bee. After updating, restart the node.
494
+
495
+
You can use the `/health` endpoint to confirm your current Bee version:
496
+
497
+
```bash
498
+
curl -s http://localhost:1633/health | jq
499
+
```
500
+
501
+
To confirm a successful update, check that the `version` number in the results corresponds to the [latest](https://github.com/ethersphere/bee/releases/tag/v2.5.0) Bee release:
502
+
503
+
```bash
504
+
{
505
+
"status": "ok",
506
+
"version": "2.5.0-5ec231ba",
507
+
"apiVersion": "7.3.0"
508
+
}
509
+
```
510
+
511
+
512
+
### Step 4: Re-stake xBZZ
513
+
514
+
515
+
After upgrading to the latest version and restarting, xBZZ should be re-staked into the new staking contract so that the node can continue to participate in the redistribution game.
516
+
517
+
To stake the minimum required 10 xBZZ:
518
+
519
+
:::tip
520
+
Make sure to modify to the correct staking amount incase your node is using [reserve doubling](/docs/bee/working-with-bee/staking#reserve-doubling).
521
+
:::
522
+
523
+
```bash
524
+
curl -X POST localhost:1633/stake/100000000000000000
525
+
```
526
+
527
+
Confirm that the staking transaction was successful:
528
+
529
+
```bash
530
+
curl -s http://localhost:1633/stake | jq
531
+
```
532
+
The expected output after staking the minimum of 10 xBZZ:
533
+
534
+
```bash
535
+
{
536
+
"stakedAmount": "100000000000000000"
537
+
}
538
+
```
539
+
540
+
Congratulations! You have performed a successful stake migration and your node will now continue to operate as normal.
541
+
442
542
## Troubleshooting
443
543
444
544
In this section we cover several commonly seen issues encountered forstaking nodes participatingin the redistribution game. If you don't see your issue covered here or require additional guidance, check out the `#node-operators` [Discord channel](https://discord.com/channels/799027393297514537/811553590170353685) where you will find support from other node operators and community members.
Copy file name to clipboardExpand all lines: docs/bee/working-with-bee/upgrade.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,7 @@ title: Upgrading Bee
3
3
id: upgrading-bee
4
4
---
5
5
6
-
Keep a close eye on the[#bee-node-updates](https://discord.gg/vQcngMzZ9c) channel in our [Discord Server](https://discord.gg/wdghaQsGq5) for information on the latest software updates for Bee. It's very important to keep Bee up to date to benefit from security updates and ensure you are able to properly interact with the Swarm network. The [#node-operators](https://discord.com/channels/799027393297514537/811553590170353685) channel is another excellent resource for any of your questions regarding node operation.
7
-
8
-
## Upgrade Procedure Warnings
6
+
It's very important to keep Bee up to date to benefit from security updates and ensure you are able to properly interact with the Swarm network. The [#node-operators](https://discord.com/channels/799027393297514537/811553590170353685) channel is an excellent resource for any of your questions regarding node operation.
9
7
10
8
:::warning
11
9
Bee sure to [back up](/docs/bee/working-with-bee/backups) your keys and [cash out your cheques](/docs/bee/working-with-bee/cashing-out) to ensure your xBZZ is safe before applying updates.
@@ -58,11 +56,11 @@ You may now start your node again:
58
56
sudo systemctl start bee
59
57
```
60
58
61
-
####Manual Installations
59
+
### Manual Installations
62
60
63
61
To upgrade your manual installation, simply stop Bee, replace the Bee binary and restart.
64
62
65
-
####Docker
63
+
### Docker
66
64
67
65
To upgrade your Docker installation, simply increment the version number in your configuration and restart.
0 commit comments