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/bee-api.md
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -458,10 +458,26 @@ From the results we can see that we have a healthy neighborhood size when compar
458
458
459
459
### */rchash*
460
460
461
-
Calling the /rchash endpoint triggers the generation of a reserve commitment hash, which is used in the [redistribution game](/docs/concepts/incentives/redistribution-game), and will report the amount of time it took to generate the hash. This is useful for getting a performance benchmark to ensure that your node's hardware is sufficient.
461
+
Calling the `/rchash` endpoint triggers the generation of a reserve commitment hash, which is used in the [redistribution game](/docs/concepts/incentives/redistribution-game), and will report the amount of time it took to generate the hash. This is useful for getting a performance benchmark to ensure that your node's hardware is sufficient.
462
+
463
+
464
+
465
+
466
+
The `/rchash` endpoint has 3 parameters: `depth` and `anchor_01` and `anchor_02`. For both of the anchor parameters, you should use the first 4 digits from your node's overlay address:
467
+
468
+
```
469
+
/rchash/{depth}/{anchor_01}/{anchor_02}
470
+
```
471
+
472
+
:::info anchor parameter details
473
+
- The anchor parameters must match the prefix bits of the node's overlay address up to at least the current storage depth (with each hex digit equal to 4 bits).
474
+
- The anchor parameters also must have an even number of digits.
475
+
476
+
Therefore you can use the first four digits of your node's overlay address since it will work for depths up to depth 16, which will not be approached unless the depth increases up to depth 17, which is not likely to happen in the near future. If it does increase to depth 17, then the first 6 overlay digits should be used.
477
+
:::
462
478
463
479
```bash
464
-
sudo curl -sX GET http://localhost:1633/rchash/10/aaaa/aaaa| jq
480
+
sudo curl -sX GET http://localhost:1633/rchash/10/1e20/1e20| jq
465
481
```
466
482
It should not take much longer than 6 minutes at most for results to be returned:
467
483
```bash
@@ -485,6 +501,15 @@ It should not take much longer than 6 minutes at most for results to be returned
485
501
486
502
If the `Time` value is much longer than 6 minutes then it likely means that the node's hardware performance is not sufficient. Consider upgrading to use faster memory or processor.
487
503
504
+
If while running the `/rchash` command there is an evictions related error such as the one below, try running the call to the `/rchash` endpoint again.
505
+
506
+
```
507
+
error: "level"="error" "logger"="node/storageincentives" "msg"="make sample" "error"="sampler: failed creating sample: sampler stopped due to ongoing evictions"
508
+
```
509
+
510
+
While evictions are a normal part of Bee's standard operation, the event of an eviction will interrupt the sampler process.
511
+
512
+
488
513
### */health*
489
514
490
515
The `/health` endpoint provides a quick status check for your Bee node which simply indicates whether the node is operating or not. It is often used in tools like Docker and Kubernetes.
Copy file name to clipboardExpand all lines: docs/bee/working-with-bee/staking.md
+1-54Lines changed: 1 addition & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -765,61 +765,8 @@ Confirm that `hasSufficientFunds` is `true`, and `isFullySynced` is `true` befor
765
765
766
766
#### Run sampler process to benchmark performance
767
767
768
-
One of the most common issues affecting staking is the `sampler` process failing. The sampler is a resource intensive process which is run by nodes which are selected to take part in redistribution. The process may fail or time out if the node's hardware specifications aren't high enough. To check a node's performance the `/rchash/{depth}/{anchor_01}/{anchor_02}` endpoint of the API may be used. The `anchor_01` and `anchor_02` must be a hex string with an even number of digits. For simplicity, you can just use `aaaa`forboth anchors as we doin the example further down.
768
+
One of the most common issues affecting staking is the `sampler` process failing. The sampler is a resource intensive process which is run by nodes which are selected to take part in redistribution. The process may fail or time out if the node's hardware specifications aren't high enough. To check a node's performance the `/rchash` endpoint of the API may be used. See the `/rchash` section of the [Bee API page forusage details](/docs/bee/working-with-bee/bee-api/).
769
769
770
-
The `{anchor}` value can be set to any random hexadecimal string, while`{depth}` should be set to the current depth.
771
-
772
-
To get the current depth, call the `/reservestate` endpoint
773
-
774
-
```bash
775
-
sudo curl -sX GET http://localhost:1633/reservestate | jq
776
-
```
777
-
Copy the `storageRadius` value from the output (this represents the ACTUAL depth foryour node,in other words, the depth to which your node is responsible for storing files. The `radius` value is the hypothetical depth your node would be at if every postage batch was fully utilised.)
778
-
779
-
```bash
780
-
{
781
-
"radius": 15,
782
-
"storageRadius": 10,
783
-
"commitment": 128332464128
784
-
}
785
-
```
786
-
787
-
Call the endpoint like so:
788
-
789
-
```bash
790
-
sudo curl -sX GET http://localhost:1633/rchash/10/aaaa/aaaa | jq
791
-
```
792
-
793
-
If the sampler runs successfully, you should see output like this:
If the `Time` value is higher than 6 minutes, then the hardware specifications for the node may need to be upgraded.
815
-
816
-
If there is an evictions related error such as the one below, try running the call to the `/rchash/` endpoint again.
817
-
818
-
```
819
-
error: "level"="error""logger"="node/storageincentives""msg"="make sample""error"="sampler: failed creating sample: sampler stopped due to ongoing evictions"
820
-
```
821
-
822
-
While evictions are a normal part of Bee's standard operation, the event of an eviction will interrupt the sampler process.
823
770
824
771
If you are still experiencing problems, you can find more helpin the [node-operators](https://discord.gg/kHRyMNpw7t) Discord channel (for your safety, do not accept advice from anyone sending a private message on Discord).
0 commit comments