Skip to content

Commit

Permalink
Merge pull request #452 from ethersphere/remove-clef
Browse files Browse the repository at this point in the history
removed clef
  • Loading branch information
NoahMaizels authored Aug 22, 2023
2 parents 248459b + 0ede8ba commit 185fed3
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 137 deletions.
78 changes: 23 additions & 55 deletions docs/bee/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,51 @@ id: docker

Docker containers for Bee are hosted at [Docker Hub](https://hub.docker.com/r/ethersphere/bee) for your convenience.

:::info
Bee Clef is deprecated and is no longer under active development. It is not required for running a Bee node.
:::

If running a Bee _full node_, you may make use of
Ethereum's external signer, [Clef](/docs/bee/installation/bee-clef). Skip
ahead if you are comfortable with `docker` basics for instructions on
how to use [docker-compose](/docs/bee/installation/docker#docker-compose)
to easily set up Bee with persistent storage and integration with the
Bee Clef container.

### Quick Start

Try Bee out by simply running the following command in your Terminal.
Try Bee out by simply running the following command in your terminal.

```bash
docker run\
docker run \
-p 1635:1635 \
-p 1634:1634 \
-p 1633:1633\
--rm -it ethersphere/bee:stable\
-p 1633:1633 \
--rm -it ethersphere/bee:stable \
start \
--welcome-message="Bzzzz bzzz bzz bzz. 🐝" \
--blockchain-rpc-endpoint http://localhost:8545 \
--debug-api-enable
```

:::info
If starting your node for the first time, you will need to deploy a chequebook contract. See [ installation](/docs/bee/installation/install) section for more info.
If starting your node for the first time, you will need to deploy a chequebook contract. See [installation](/docs/bee/installation/install) section for more info.
:::

To persist files, mount a local directory as follows and enter the
password used to encrypt your keyfiles. Note, `docker` insists on
absolute paths when mounting volumes, so you must replace
`/path/to/.bee-docker` with a valid path from your local filesystem.
To persist files, mount a local directory as follows and enter the password used to encrypt your keyfiles. Note, `docker` insists on absolute paths when mounting volumes, so you must replace `/path/to/.bee-docker` with a valid path from your local filesystem.

```bash
docker run\
-v /path/to/.bee-docker:/home/bee/.bee\
docker run \
-v /path/to/.bee-docker:/home/bee/.bee \
-p 1635:1635 \
-p 1634:1634 \
-p 1633:1633\
--rm -it ethersphere/bee:stable\
-p 1633:1633 \
--rm -it ethersphere/bee:stable \
start \
--welcome-message="Bzzzz bzzz bzz bzz. 🐝" \
--blockchain-rpc-endpoint https://gno.getblock.io/<<your-api-key>>/mainnet/ \
--debug-api-enable
```
Once you have generated your keys, leave Bee to run in the background...
Once you have generated your keys, use the `-d` flag to run in detached mode and leave Bee running in the background:
```bash
docker run\
docker run \
-d
-v /path/to/.bee-docker:/home/bee/.bee\
-p 1635:1635 \
-p 1634:1634 \
-p 1633:1633\
--rm -it ethersphere/bee:stable\
-p 1633:1633 \
--rm -it ethersphere/bee:stable \
start \
--welcome-message="Bzzzz bzzz bzz bzz. 🐝" \
--blockchain-rpc-endpoint https://gno.getblock.io/<<your-api-key>>/mainnet/ \
Expand All @@ -72,10 +58,7 @@ docker run\
### Versions
In order to avoid accidentally upgrading your Bee containers, or
deadlocks resulting from Docker caching solutions, it is recommended
to use best practices and pin the specific version of Bee that you
want to run.
In order to avoid accidentally upgrading your Bee containers, or deadlocks resulting from Docker caching solutions, it is recommended to use best practices and pin the specific version of Bee that you want to run.
#### Specific Versions
Expand All @@ -94,10 +77,9 @@ at the [Docker Hub repository](https://hub.docker.com/r/ethersphere/bee).
### Docker Compose
Configuration files for Bee and Bee Clef are provided to enable quick
and easy installation of both programs with persistent storage and
secure secret management. To install Bee without Clef, simply omit the
relevant steps.
Configuration files for Bee are provided to enable quick
and easy installation with persistent storage and
secure secret management.
#### Setup
Expand All @@ -107,7 +89,7 @@ First, retrieve the current `docker-compose.yaml` file.
wget -q https://raw.githubusercontent.com/ethersphere/bee/v1.4.1/packaging/docker/docker-compose.yml
```
Next, create a `.env` file using the example file provided. This file will be responsible for storing configuration and secrets for our Bee and Bee Clef applications.
Next, create a `.env` file using the example file provided. This file will be responsible for storing configuration and secrets for our Bee node(s).
```bash
wget -q https://raw.githubusercontent.com/ethersphere/bee/v1.4.1/packaging/docker/env -O .env
Expand All @@ -121,33 +103,20 @@ For Bee, amend the following parameters:
BEE_BLOCKCHAIN_RPC_ENDPOINT=https://gno.getblock.io/<<your-api-key>>/mainnet/
BEE_PASSWORD=my-password
```
To enable Clef support on mainnet, we must also change the following params:
```
CLEF_CHAINID=100
```
For testnet, use chain id `5`.
```
BEE_CLEF_SIGNER_ENABLE=true
BEE_CLEF_SIGNER_ENDPOINT=http://clef-1:8550
```
With the configuration settings complete, you can start your Bee and
Clef nodes by running:
With the configuration settings complete, you can start your Bee node(s) by running:
```bash
docker-compose up -d
```
:::tip
By specifying the `-d` flag to `docker-compose` we run Bee and Bee Clef as a daemon.
By specifying the `-d` flag to `docker-compose` we run Bee in detached mode so that it continues running in the background.
:::
:::warning
Docker Compose will create a Docker Volume called `bee` containing important key material. Make sure to [backup](/docs/bee/working-with-bee/backups) the contents of your Docker volume!
Docker Compose will create a Docker volume called `bee` containing important key material. Make sure to [backup](/docs/bee/working-with-bee/backups) the contents of your Docker volume!
:::
To determine the Bee node's address to fund, we can check the logs for our Bee _container_:
Expand Down Expand Up @@ -203,5 +172,4 @@ curl localhost:1635/peers
}
```
If you see peers listed here - congratulations! You have joined the
swarm! Welcome! 🐝
If you see peers listed here - congratulations! You have joined the swarm! Welcome! 🐝
7 changes: 3 additions & 4 deletions docs/bee/installation/hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Swarm provides tooling to help you install many Bees at once.

### Docker

Up to date [Docker images for Bee and Bee Clef](/docs/bee/installation/docker) are provided.
Up to date [Docker images for Bee](/docs/bee/installation/docker) are provided.

### Docker-Compose

Expand All @@ -33,13 +33,12 @@ If you just want to run a handful of bee nodes, you can run multiple bee nodes b
Create your first configuration file by running

```console
bee printconfig \
&> bee-config-1.yaml
bee printconfig &> bee-config-1.yaml
```

Make as many copies of bee-config-1.yaml as you want to run bee nodes. Increment the number in the name (`bee-config-1` to `bee-config-2`) for each new configuration file.

Configure your nodes as desired, but ensure that the values `api-addr`, `data-dir`, `debug-api-addr`, `p2p-addr` and `clef-signer-endpoint` are unique for each configuration.
Configure your nodes as desired, but ensure that the values `api-addr`, `data-dir`, `debug-api-addr`, and `p2p-addr` are unique for each configuration.

### Monitoring

Expand Down
38 changes: 3 additions & 35 deletions docs/bee/working-with-bee/backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@ If you installed Bee using the [automated shell script](/docs/bee/installation/i

### Docker Compose

When using [Docker Compose](/docs/bee/installation/docker) configuration files to run a node, Docker will create a volume for Bee and a volume for Bee Clef.
When using [Docker Compose](/docs/bee/installation/docker) configuration files to run a node, Docker will create a volume for Bee.

Use `docker cp` to retrieve the contents of these folders:

```bash
docker cp bee_bee_1:/home/bee/.bee/ bee
docker cp bee_clef_1:/app clef
```

## Data Types
Expand Down Expand Up @@ -88,11 +87,8 @@ The `keys` directory contains three key files: `libp2p_v2.key`, `pss.key`, and `
The `swarm.key` file allows access to Bee node's Gnosis account. If the key is lost or stolen it could lead to the loss of all assets secured by that key. Multiple backups should be kept in secure locations to prevent loss of assets or unauthorized access.
:::

If using **bee-clef**, see below for information on how to back up the node.

:::info
To use `swarm.key` to manage the Gnosis account for a node through Metamask or other wallets,[exportSwarmKeys](https://github.com/ethersphere/exportSwarmKey) can be used to
convert `swarm.key` to a compatible format.
To use `swarm.key` to manage the Gnosis account for a node through Metamask or other wallets, [exportSwarmKeys](https://github.com/ethersphere/exportSwarmKey) can be used to convert `swarm.key` to a compatible format.
:::

### Statestore
Expand All @@ -106,35 +102,7 @@ As the data in `statestore` and `localstore` continually changes during normal o

### Localstore

The `localstore` directory contains chunks locally which are frequently requested,
pinned in the node, or are in the node's neighbourhood of responsibility.

## Bee Clef

If Clef is used for key management and transaction signing then Clef data must be backed up and secured in a safe location to prevent loss of access to the node and its assets.

### Ubuntu / Debian / Raspbian / CentOS Package Managers


For Linux installations by the package managers _yum_ or _apt_, the `bee-clef` data directory is located at:

```bash
/var/lib/bee-clef/
```

Configuration files are stored in:

```bash
/etc/bee-clef/
```

### Manual

For a manual installation of Clef the default data directory is:

```bash
~/.clef
```
The `localstore` directory contains chunks locally which are frequently requested, pinned in the node, or are in the node's neighbourhood of responsibility.

## Restore from Backup

Expand Down
13 changes: 5 additions & 8 deletions docs/bee/working-with-bee/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,22 +369,19 @@ _default_ `true`

Enable chequebook.

#### --clef-signer-enable
#### --clef-signer-enable (Deprecated)

_default_ `false`

Set this to true to enable signing using Ethereum's Clef external
signer. Clef is a new feature which requires a corresponding rules
files or running in advanced mode to allow for auto-signing of
handshakes and cheques.

#### --clef-signer-endpoint
Set this to true to enable signing using Ethereum's Clef external signer.

#### --clef-signer-endpoint (Deprecated)

_default_ **default path for clef for each host operating system**

You may also specify a custom IPC file path for your Clef signer.

#### --clef-signer-ethereum-address
#### --clef-signer-ethereum-address (Deprecated)

_default_ **selects the clef address at index 0**

Expand Down
10 changes: 1 addition & 9 deletions docs/bee/working-with-bee/logs-and-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ tail -f /usr/local/var/log/swarm-bee/bee.log

## Data Locations

### Bee Clef

Configuration files are stored in `/etc/bee-clef/`

Key material and other data are stored in `/var/lib/bee-clef/`

### Bee

Configuration files are stored in `/etc/bee/`

State, chunks and other data is stored in `/var/lib/bee/`
Configuration files are stored in `/etc/bee/`. State, chunks and other data are stored in `/var/lib/bee/`
2 changes: 2 additions & 0 deletions docs/bee/working-with-bee/uninstalling-bee.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ sudo apt-get remove bee
```

If Clef (deprecated) was used, remove Clef.

:::danger
This will delete your keys, [make backups](/docs/bee/working-with-bee/backups).
:::
Expand All @@ -35,6 +36,7 @@ If Clef (deprecated) was used, remove Clef.
:::danger
This will delete your keys, [make backups](/docs/bee/working-with-bee/backups) .
:::

Remove Clef:
```bash
sudo yum remove bee-clef
Expand Down
9 changes: 3 additions & 6 deletions docs/bee/working-with-bee/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ properly interact with the swarm.
## Upgrade Procedure

:::warning
Bee sure to [back up](/docs/bee/working-with-bee/backups) your clef key material and [cash out your cheques](/docs/bee/working-with-bee/cashing-out) to make sure your xBZZ is safe before applying updates.
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 make sure your xBZZ is safe before applying updates.
:::

### Ubuntu / Debian / Raspbian

To upgrade Bee, simply stop the Bee and Bee Clef services.
To upgrade Bee, simply stop the Bee service.

```sh
sudo systemctl stop bee
sudo systemctl stop bee-clef
```

Now follow the [installation instructions](/docs/bee/installation/install) to download the new package and install the new version, as you would during a new installation.
Expand All @@ -44,11 +43,9 @@ Configuration file '/etc/bee/bee.yaml'

Select `N` to keep your current data and keys.

You may now start your node again, waiting for bee-clef to initialise before starting Bee.
You may now start your node again:

```sh
sudo systemctl start bee-clef
sleep 30
sudo systemctl start bee
```

Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions docs/learn/ecosystem/awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Some software on this list is community created and has not been reviewed for fu

[Bee](https://github.com/ethersphere/bee) - Also referred to as the _node_ or the _client_, this service allows you to join the Swarm network

[Bee-Clef](https://github.com/ethersphere/bee-clef) - External signer service for transactions, suitable for Bee

### Libraries

[Bee-JS](https://github.com/ethersphere/bee-js) - A high-level Javascript library to interact with Bee through its REST API
Expand Down
19 changes: 1 addition & 18 deletions docs/learn/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,24 +228,7 @@ We recommend you run your own [Gnosis Node using Nethermind](https://docs.gnosis
- and set it to `http://localhost:8545`
- after that sudo systemctl restart bee

### 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.

### I have Bee Clef installed but I can't export private keys.

It happens quite a lot that Bee Clef is installed, but getting the address from bee-clef-keys does not yield the same output as `:1635/addresses`

In this case, the user most likely does not have Bee Clef enabled in the configuration of the bee node.

This doesn't work for you? You get erorr -> `xclip: not found” or “Error: Can’t open display: (null)`

Try running the command below:
`sudo cat /var/lib/bee-clef/password`

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)?
### How can I export my private keys?

You can find the instructions here in README section:
https://github.com/ethersphere/exportSwarmKey
Expand Down

0 comments on commit 185fed3

Please sign in to comment.