Skip to content

Commit d915f4e

Browse files
committed
2.7 update
1 parent 19171e5 commit d915f4e

5 files changed

Lines changed: 92 additions & 25 deletions

File tree

docs.zip

274 KB
Binary file not shown.

docs/bee/installation/connectivity.md

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ you still have problems, please join us in our [Discord
1919
server](https://discord.gg/wdghaQsGq5) and we'll help you find the
2020
way! 🐝 🐝 🐝 🐝 🐝
2121

22-
:::info
22+
:::warning
2323
To ensure your Bee has the best chance of participating in the swarm,
2424
you must ensure your Bee is able to handle **both incoming and
2525
outgoing connections from the global Internet to its p2p port
@@ -31,6 +31,8 @@ Internet! You may need to alter your Bee node's `nat-addr`
3131
configuration. 🤓
3232
:::
3333

34+
35+
3436
## Networking Basics
3537

3638
In a network, each computer is assigned an IP address. Each IP address
@@ -298,7 +300,58 @@ to your computer's MAC address. This will ensure that your Bee
298300
seamlessly connects when you rejoin the network!
299301
:::
300302

301-
### Debugging Connectivity
303+
### Using multiple P2P transports (TCP, WS, WSS)
304+
305+
A Bee node can expose more than one transport for peer-to-peer communication. By default, nodes use the TCP-based libp2p transport, but Secure WebSocket (`WSS`) transport can also be enabled.
306+
307+
To enable WSS support, set:
308+
309+
```yaml
310+
p2p-wss-enable: true
311+
````
312+
313+
When enabled, Bee listens for Secure WebSocket connections on `p2p-wss-addr` (default `:1635`). In most cases the remaining WSS and AutoTLS options can be left at their default values:
314+
315+
```yaml
316+
p2p-wss-addr: ":1635"
317+
nat-wss-addr: ""
318+
319+
autotls-domain: libp2p.direct
320+
autotls-registration-endpoint: https://registration.libp2p.direct
321+
autotls-ca-endpoint: https://acme-v02.api.letsencrypt.org/directory
322+
```
323+
324+
A configuration using both TCP and WSS transports may look like:
325+
326+
```yaml
327+
p2p-addr: :1634
328+
p2p-wss-enable: true
329+
p2p-wss-addr: :1635
330+
331+
nat-addr: 1.2.3.4:1634
332+
nat-wss-addr: node.example.com:443
333+
```
334+
335+
In this example:
336+
337+
* `p2p-addr` defines the local TCP listening address.
338+
* `p2p-wss-addr` defines the local Secure WebSocket listening address.
339+
* `nat-addr` is the public address advertised to peers for TCP connections.
340+
* `nat-wss-addr` is the public address advertised to peers for WSS connections.
341+
342+
If WSS is enabled, the WSS port must be reachable by peers. This means the port should be open in your firewall, exposed by your container or host configuration, and permitted by your network if outbound connections are restricted.
343+
344+
When specifying `nat-addr` or `nat-wss-addr`, the value must be a valid `host:port` pair. For example:
345+
346+
```yaml
347+
nat-addr: 1.2.3.4:1634
348+
nat-wss-addr: node.example.com:443
349+
```
350+
351+
Values missing either the host or port or otherwise misformed addresses are considered invalid and will prevent the node from starting.
352+
353+
354+
### Troubleshooting Connectivity
302355

303356
The above guide navigates your NAT, but there are still a few hurdles to overcome. To make sure there is a clear path from your computer to the outside world, let's follow our Bee's journey from the inside out.
304357

@@ -379,7 +432,7 @@ the open Internet. Ensure that both TCP and UDP traffic are allowed.
379432

380433
Similarly, if you are connecting from within a private network, you
381434
may find that the port is blocked by the router. Each router is
382-
different, so consult your router's firware documentation to make
435+
different, so consult your router's firmware documentation to make
383436
sure there are no firewalls in place blocking traffic on your Bee's
384437
designated p2p port.
385438

docs/bee/working-with-bee/bee-api.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,15 +333,16 @@ From the results we can see that our node's neighborhood size and batch commitme
333333
{
334334
"radius": 15,
335335
"storageRadius": 10,
336-
"commitment": 134121783296
336+
"commitment": 134121783296,
337+
"reserveCapacityDoubling": 0
337338
}
338339
```
339340

340341
Let's take a look at each of these values:
341342
* `"radius"` - Represents the maximum storage radius assuming all postage stamp batches are fully utilized.
342343
* `"storageRadius"` - The radius of responsibility - the proximity order of chunks for which your node is responsible for storing. It should generally match the radius shown on [Swarmscan](https://swarmscan.io/neighborhoods).
343344
* `"commitment"` - The total number of chunks which would be stored on the Swarm network if 100% of all postage batches were fully utilised.
344-
345+
* `"reserveCapacityDoubling"` - Indicates whether your node is currently using the reserve doubling mechanism. See [Reserve Doubling](/docs/bee/working-with-bee/staking#reserve-doubling) for details.
345346
### _/chainstate_
346347

347348
This endpoint relates to your node's interactions with the Swarm Smart contracts on the Gnosis Chain.

docs/bee/working-with-bee/configuration.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ However when Bee is started as a service with tools like `systemctl` or `brew se
2424

2525
### Command Line Arguments
2626

27-
Run `bee start --help` in your terminal to list the available command-line arguments:
27+
Run `bee help printconfig` in your terminal to list the available command-line arguments and config option flags:
2828

2929
```bash
3030
Ethereum Swarm Bee
@@ -34,7 +34,7 @@ Usage:
3434

3535
Available Commands:
3636
start Start a Swarm node
37-
dev Start a Swarm node in development mode
37+
dev Start in dev mode. WARNING: This command will be deprecated soon.
3838
init Initialise a Swarm node
3939
deploy Deploy and fund the chequebook contract
4040
version Print version number
@@ -49,15 +49,18 @@ Flags:
4949
-h, --help help for bee
5050

5151
Use "bee [command] --help" for more information about a command.
52-
root@noah-bee:~# docker exec bee-1 bee start --help
53-
Start a Swarm node
52+
root@noah-bee:~# docker exec -it bee-1 bee help printconfig
53+
Print default or provided configuration in yaml format
5454

5555
Usage:
56-
bee start [flags]
56+
bee printconfig [flags]
5757

5858
Flags:
5959
--allow-private-cidrs allow to advertise private CIDRs to the public network
6060
--api-addr string HTTP API listen address (default "127.0.0.1:1633")
61+
--autotls-ca-endpoint string autotls certificate authority endpoint (default "https://acme-v02.api.letsencrypt.org/directory")
62+
--autotls-domain string autotls domain (default "libp2p.direct")
63+
--autotls-registration-endpoint string autotls registration endpoint (default "https://registration.libp2p.direct")
6164
--block-time uint chain block time (default 5)
6265
--blockchain-rpc-endpoint string rpc blockchain endpoint
6366
--bootnode strings initial nodes to connect to (default [/dnsaddr/mainnet.ethswarm.org])
@@ -72,14 +75,18 @@ Flags:
7275
--db-open-files-limit uint number of open files allowed by database (default 200)
7376
--db-write-buffer-size uint size of the database write buffer in bytes (default 33554432)
7477
--full-node cause the node to start in full mode
75-
-h, --help help for start
78+
-h, --help help for printconfig
7679
--mainnet triggers connect to main net bootnodes. (default true)
80+
--minimum-gas-tip-cap uint minimum gas tip cap in wei for transactions, 0 means use suggested gas tip cap
7781
--minimum-storage-radius uint minimum radius storage threshold
7882
--nat-addr string NAT exposed address
83+
--nat-wss-addr string WSS NAT exposed address
7984
--neighborhood-suggester string suggester for target neighborhood (default "https://api.swarmscan.io/v1/network/neighborhoods/suggestion")
8085
--network-id uint ID of the Swarm network (default 1)
8186
--p2p-addr string P2P listen address (default ":1634")
8287
--p2p-ws-enable enable P2P WebSocket transport
88+
--p2p-wss-addr string p2p wss address (default ":1635")
89+
--p2p-wss-enable Enable Secure WebSocket P2P connections
8390
--password string password for decrypting keys
8491
--password-file string path to a file that contains password for decrypting keys
8592
--payment-early-percent int percentage below the peers payment threshold when we initiate settlement (default 50)
@@ -148,11 +155,17 @@ bee printconfig
148155
# allow to advertise private CIDRs to the public network
149156
allow-private-cidrs: false
150157
# HTTP API listen address
151-
api-addr: :1633
158+
api-addr: 0.0.0.0:1633
159+
# autotls certificate authority endpoint
160+
autotls-ca-endpoint: https://acme-v02.api.letsencrypt.org/directory
161+
# autotls domain
162+
autotls-domain: libp2p.direct
163+
# autotls registration endpoint
164+
autotls-registration-endpoint: https://registration.libp2p.direct
152165
# chain block time
153166
block-time: "5"
154167
# rpc blockchain endpoint
155-
blockchain-rpc-endpoint: https://xdai.fairdatasociety.org
168+
blockchain-rpc-endpoint: https://rpc.gnosischain.com
156169
# initial nodes to connect to
157170
bootnode:
158171
- /dnsaddr/mainnet.ethswarm.org
@@ -184,10 +197,14 @@ full-node: "true"
184197
help: false
185198
# triggers connect to main net bootnodes.
186199
mainnet: "true"
200+
# minimum gas tip cap in wei for transactions, 0 means use suggested gas tip cap
201+
minimum-gas-tip-cap: "0"
187202
# minimum radius storage threshold
188203
minimum-storage-radius: "0"
189204
# NAT exposed address
190205
nat-addr: ""
206+
# WSS NAT exposed address
207+
nat-wss-addr: ""
191208
# suggester for target neighborhood
192209
neighborhood-suggester: https://api.swarmscan.io/v1/network/neighborhoods/suggestion
193210
# ID of the Swarm network
@@ -196,6 +213,10 @@ network-id: "1"
196213
p2p-addr: :1634
197214
# enable P2P WebSocket transport
198215
p2p-ws-enable: false
216+
# p2p wss address
217+
p2p-wss-addr: :1635
218+
# Enable Secure WebSocket P2P connections
219+
p2p-wss-enable: false
199220
# password for decrypting keys
200221
password: 427067e9514e93613b861fef5561c6
201222
# path to a file that contains password for decrypting keys
@@ -219,7 +240,7 @@ price-oracle-address: ""
219240
# redistribution contract address
220241
redistribution-address: ""
221242
# reserve capacity doubling
222-
reserve-capacity-doubling: "1"
243+
reserve-capacity-doubling: "0"
223244
# ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url
224245
resolver-options: []
225246
# forces the node to resync postage contract data
@@ -583,6 +604,9 @@ Then configure your node, including your p2p port (default 1634).
583604
nat-addr: "123.123.123.123:1634"
584605
```
585606
607+
Ensure `nat-addr` and `nat-wss-addr` if used are set to valid `host:port` values — invalid values prevent the node from starting.
608+
609+
586610
## ENS Resolution (Optional)
587611
588612
The [ENS](https://ens.domains/) domain resolution system is used to host websites on Bee, and in order to use this your Bee must be connected to a mainnet Ethereum blockchain node. We recommend you run your own ethereum node. An option for resource restricted devices is geth+nimbus and a guide can be found [here](https://ethereum-on-arm-documentation.readthedocs.io/en/latest/). Other options include [dappnode](https://dappnode.io/), [nicenode](https://www.nicenode.xyz/), [stereum](https://stereum.net/) and [avado](https://ava.do/).

package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)