diff --git a/docs/faq.md b/docs/faq.md index 28b55b00b..940df031e 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -3,27 +3,36 @@ title: FAQ id: FAQ --- + +## Connectivity + ### Which p2p port does Bee use and which should I open in my router? The default p2p port for Bee in 1634, please forward this using your router and allow traffic over your firewall as necessary. Bee also supports UPNP but it is recommended you do not use this protocol as it lacks security. For more detailed information see the connectivity section in the docs. https://docs.ethswarm.org/docs/installation/connectivity + ### How do I know if I am connected to other peers? You may communicate with your Bee using it’s HTTP api. Type `curl http://localhost:1635/peers` at your command line to see a list of your peers. + ### What does "Failed to connect to local host port 1635: Connection refused" mean? Your node is not listening on port 1635, either the debug-api is not enabled, or it is not executing on localhost. Make sure your bee.yaml file has `debug-api-enable: true` + + ## Errors ### What does "could not connect to peer" mean? “Could connect to peer can happen for various reasons.” One of the most common is that you have the identifier of a peer in your address book from a previous session. When trying to connect to this node again, the peer may no longer be online. + ### What does "context deadline exceeded" error mean? The "context deadline exceeded" is a non critical warning. It means that a node took unexpectedly long to respond a request from your node. Your node will automatically try again via another node. + ### How do I set up a blockchain endpoint? - If you use "bee start" @@ -39,8 +48,8 @@ The "context deadline exceeded" is a non critical warning. It means that a node - and set it to `wss://goerli.infura.io/ws/v3/your-api-key` - after that sudo systemctl restart bee -### How to export private keys from the node with bee-clef installed +### How to export private keys from the node with bee-clef installed If you are running Bee together with the Bee-Clef, you can type in the command line `bee-clef-keys` and that will store the .JSON file into your home folder and copy the password in your clipboard. @@ -57,6 +66,7 @@ Try running the command below: You can then use that to import to Metamask or any other web3 wallet provider. + ### How to export private keys from the node (without bee-clef)? You can find insturction here in README section: @@ -65,6 +75,7 @@ https://github.com/ethersphere/exportSwarmKey You can also follow to the mini-guide on the link below: https://pastebee.com/?3b2a4cecafa21a7afcdd4d4f3d74fef1d5551acd91eb2d3a5b750dc9a161fbcf + ### How to import bee node address to Metamask? 1. [export your bee node private keys](https://hackmd.io/tfKVeHaIQGewlGTC4ooESg#How-to-export-private-keys-from-the-node-with-bee-claf-installed) @@ -74,6 +85,7 @@ https://pastebee.com/?3b2a4cecafa21a7afcdd4d4f3d74fef1d5551acd91eb2d3a5b750dc9a1 5. paste the password 6. click Import + ### What are the restart commands of bee? If you use bee.service: @@ -87,6 +99,7 @@ If you use "bee start" - Start: `bee start` - Stop: `ctrl + c` or `cmd + c` or close terminal to stop process + ### Relevant endpoints and explanations Balances: https://docs.ethswarm.org/debug-api/#tag/Balance @@ -103,16 +116,17 @@ Most common use cases: - `curl http://localhost:1635/settlements` - When the balance with a given peer exceeds a threshold, a settlement will be issued, if the settlement is received, then your node should have a check from that peer. - `curl http://localhost:1635/chequebook/address` your checkbook contract to see the gBZZ. + ### How can I check how many cashed out cheques do I have? You can look at your checkbook contract at etherscan. Get your checkbook contract address with: `curl http://localhost:1635/chequebook/address` - ### I have compared transactions between my ethereum address and my chequebook address, the number are different, which is quite weird. Your checkbook will show OUT gBZZ transactions when your peers cash checks issued by you, but you don't pay any gas for those so they won't show up in your Ethereum address transaction list. + ### How to set infura.io endpoint: You need to sign up for a free account at infura.io, set up an Ethereum project, and get the goerli test net URL which will include your personal API key. Put that URL in your swap-endpoint and restart your node. @@ -120,6 +134,7 @@ You need to sign up for a free account at infura.io, set up an Ethereum project, Be sure that you choose the right network: ![](https://i.imgur.com/ev5Fwsm.png) + ### Can I connect several nodes to infura endpoint? Yes, but their free plan has limit 100k requests per day. @@ -135,10 +150,12 @@ https://docs.ethswarm.org/docs/working-with-bee/cashout `totalBalance` is the balance on the blockchain, `availableBalance` is that balance minus the outstanding (non-cashed) checks that you have issued to your peers. These latter checks do not show up on the blockchain. It's like what the bank thinks your balance is vs what your checkbook knows is actually available because of the checks you've written that are still "in the mail" and not yet cashed. + ### What determines the number of peers and how to influence their number? Why are there sometimes 300+ peers and sometimes 30? The number of connected peers is determined by your node as it attempts to keep the distributed Kademlia well connected. As nodes come and go in the network your peer count will go up and down. If you watch bee's output logs for "successfully connected", there should be a mix of (inbound) and (outbound) at the end of those messages. If you only get (outbound) then you my need to get your p2p port opened through your firewall and/or forwarded by your router. Check out the connectivity section in the docs https://docs.ethswarm.org/docs/installation/connectivity. + ### What is the difference between "systemctl" and "bee start"? *bee start* and *systemctl start bee* actually run 2 different instances with 2 different *bee.yaml* files and two different data directories. @@ -148,10 +165,30 @@ The number of connected peers is determined by your node as it attempts to keep ### How can I find a transaction hash for the --transaction configuration parameter? + Use this cunning one liner - thanks [filoozom](https://github.com/beejeez/beejeez/commits?author=filoozom) Get your API key from [etherscan](https://etherscan.io) ``` curl "https://api-goerli.etherscan.io/api?module=account&action=txlist&address=$ADDRESS&startblock=0&endblock=99999999&sort=asc&apikey=$API_KEY" | jq -c 'first(.result[] | select(.to == "'$ADDRESS'")).hash' -``` \ No newline at end of file +``` + + +## Swarm Protocol + + +### Can I use one Ethereum Address/Wallet for many nodes? + +No, this violates the requirements of the Swarm Protocol. The Swarm +Protocol relies upon the `Swarm Address`, also known as the `peer +address`. This address is a **hash of the node's Ethereum address**, +therefore it is deterministic. As all nodes must have a unique address, +if you were to use the same wallet, it would violate the uniqueness +constraint and result in malfunctioning nodes. + +Therefore, the rule is, each node must have: + +* 1 Ethereum Address +* 1 Chequebook +* 3 unique ports for API / p2p / Debug API. \ No newline at end of file