Skip to content

Commit

Permalink
docs: partially address docs feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs committed Jan 30, 2025
1 parent 56f4e11 commit 97388de
Show file tree
Hide file tree
Showing 13 changed files with 220 additions and 77 deletions.
2 changes: 1 addition & 1 deletion docs/docs/developers/guides/network_upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The steps required to update the Builtin Actors in Forest are as follows:
3. Cut a new release of the `fil-actor-states`.
4. Update the `fil-actor-states` dependency in Forest.
5. Update the CIDs in the [bundle module](https://github.com/ChainSafe/forest/blob/main/src/networks/actors_bundle.rs) to include bundles for any networks that you want to support.
6. Update the manifest with `forest-tool state-migration generate-actors-metadata > build/manifest.json`. This will add necessary entries to the manifest.
6. Update the manifest with `forest-tool state-migration generate-actors-metadata > build/manifest.json`. This will add necessary entries to the manifest.

Note that if there were no Rust interface changes, e.g., a re-tag, steps 1-4 can be skipped.

Expand Down
52 changes: 41 additions & 11 deletions docs/docs/users/getting_started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ To install Forest from pre-compiled binaries, please refer to the
[releases page](https://github.com/ChainSafe/forest/releases), or consider using
Docker.

<h3> Verifying the installation </h3>

Ensure that Forest was correctly installed.

```shell
forest --version
```

Sample output:

```console
forest-filecoin 0.19.0+git.671c30c
```

</TabItem>
<TabItem value="docker" label="Docker">

Expand All @@ -24,29 +38,37 @@ Images are available via Github Container Registry:
ghcr.io/chainsafe/forest
```

:::tip
If you have trouble using the Github Container Registry, make sure you are [authenticated with your Github account](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry).
:::

You will find tagged images following these conventions:

- `latest` - latest stable release
- `vx.x.x` - tagged versions
- `edge` - latest development build of the `main` branch
- `date-digest` (e.g., `2023-02-17-5f27a62`) - all builds that landed on the `main` branch

A list of available images can be found here: https://github.com/ChainSafe/forest/pkgs/container/forest
A list of available images can be found [here](https://github.com/ChainSafe/forest/pkgs/container/forest).

<h3>Basic Usage</h3>

Running the Forest daemon:

```shell
docker run --init -it --rm ghcr.io/chainsafe/forest:latest --help
docker run --init -it --rm ghcr.io/chainsafe/forest:latest --help
```

Using `forest-cli`:

```shell
docker run --init -it --rm --entrypoint forest-cli ghcr.io/chainsafe/forest:latest --help
docker run --init -it --rm --entrypoint forest-cli ghcr.io/chainsafe/forest:latest --help
```

:::note
More information about Docker setup and usage can be found in the [Docker documentation](../knowledge_base/docker_tips.md).
:::

</TabItem>
<TabItem value="build" label="Build From Source">

Expand All @@ -55,6 +77,7 @@ Using `forest-cli`:
- Rust compiler (install via [rustup](https://rustup.rs/))
- OS `Base-Devel`/`Build-Essential`
- Clang compiler
- Go for building F3 sidecar module

For Ubuntu, you can install the dependencies (excluding Rust) with:

Expand All @@ -64,31 +87,38 @@ sudo apt install build-essential clang

<h3>Compilation & installation</h3>

<h4>From crates.io (latest release)</h4>
<h4>Option 1: From crates.io (latest release)</h4>

```shell
cargo install forest-filecoin
```

<h4>From repository (latest development branch)</h4>
<h4>Option 2: From repository (latest development branch)</h4>

```shell
# Clone the Forest repository
git clone --depth 1 https://github.com/ChainSafe/forest.git && cd forest
```

```shell
make install
```

Both approaches will compile and install `forest` and `forest-cli` to
`~/.cargo/bin`. Make sure you have it in your `PATH`.

</TabItem>
</Tabs>

## Verifying the installation
<h3> Verifying the installation </h3>

Ensure that Forest was correctly installed.

```shell
❯ forest --version
forest --version
```

Sample output:

```console
forest-filecoin 0.19.0+git.671c30c
```

</TabItem>
</Tabs>
62 changes: 54 additions & 8 deletions docs/docs/users/guides/interacting_with_wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,36 @@ The rest of this document will assume you're using testnet tokens.
Initially, our wallet contains no addresses:

```shell
❯ forest-wallet list
forest-wallet list
```

Should output:

```console
Address Default Balance
```

Let's create a new address and inspects its balance:

```shell
❯ forest-wallet new
forest-wallet new
```

Sample output:

```console
t1amfhh3hxvsilyhloxwheuxforst5hyzsbletgoy
```

Listing the accounts shows the new account with a balance of `0 FIL`:

```shell
❯ forest-wallet list
forest-wallet list
```

Sample output:

```console
Address Default Balance
t1amfhh3hxvsilyhloxwheuxforst5hyzsbletgoy X 0 FIL
```
Expand All @@ -66,7 +83,12 @@ Since this is a testnet account, we can add FIL to it from the [faucet](https://
After requesting the funds and waiting roughly a minute, we can see the funds arrive in our wallet:

```shell
❯ forest-wallet list
forest-wallet list
```

Sample output:

```console
Address Default Balance
t1amfhh3hxvsilyhloxwheuxforst5hyzsbletgoy X 100 FIL
```
Expand All @@ -76,10 +98,24 @@ t1amfhh3hxvsilyhloxwheuxforst5hyzsbletgoy X 100 FIL
Let's create a new, empty account:

```shell
❯ forest-wallet new
forest-wallet new
```

Sample output:

```console
t1qj55ggurqydu4mgoon7ycvkyyhofc4tvf25tmlq
```

Listing the accounts shows the new account with a balance of `0 FIL`:

```shell
forest-wallet list
```

❯ forest-wallet list
Sample output:

```console
Address Default Balance
t1qj55ggurqydu4mgoon7ycvkyyhofc4tvf25tmlq 0 FIL
t1amfhh3hxvsilyhloxwheuxforst5hyzsbletgoy X 100 FIL
Expand All @@ -88,14 +124,24 @@ t1amfhh3hxvsilyhloxwheuxforst5hyzsbletgoy X 100 FIL
We can transfer FIL to this new account from our default account:

```shell
❯ forest-wallet send t1qj55ggurqydu4mgoon7ycvkyyhofc4tvf25tmlq "1.2 FIL"
forest-wallet send t1qj55ggurqydu4mgoon7ycvkyyhofc4tvf25tmlq "1.2 FIL"
```

Sample output:

```console
bafy2bzaceblzz644szs6s5ggyxlgdnonlq5bavu54cxwujcdtgdaze2bafdle
```

It takes a minute or so for the message to be included in the Filecoin blockchain. Once the message has gone through, we can inspect our balances again:

```shell
❯ forest-wallet list
forest-wallet list
```

Sample output:

```console
Address Default Balance
t1qj55ggurqydu4mgoon7ycvkyyhofc4tvf25tmlq 1200 milliFIL
t1amfhh3hxvsilyhloxwheuxforst5hyzsbletgoy X ~98800 milliFIL
Expand Down
40 changes: 24 additions & 16 deletions docs/docs/users/guides/monitoring/health_checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ we require:
If any of these conditions are not met, the node is **not** healthy. If this
happens for a prolonged period of time, the application should be restarted.

```bash
curl "http://127.0.0.1:2346/livez?verbose"
```

Sample _lively_ response:

```
❯ curl "http://127.0.0.1:2346/livez?verbose"
```console
[+] sync ok
[+] peers connected⏎
```

Sample _not lively_ response:

```
❯ curl "http://127.0.0.1:2346/livez?verbose"
[+] sync ok
[!] no peers connected
```
Expand All @@ -63,24 +65,28 @@ accept traffic. In our case, we require:
If any of these conditions are not met, the node is **not** ready to serve
requests.

```bash
curl "127.0.0.1:2346/readyz?verbose"
```

Sample _ready_ response:

```
❯ curl "http://127.0.0.1:2346/readyz?verbose"
```console
[+] sync complete
[+] epoch up to date
[+] rpc server running
[+] eth mapping up to date⏎
[+] eth mapping up to date
[+] f3 running⏎
```

Sample _not ready_ response:

```
❯ curl "http://127.0.0.1:2346/readyz?verbose"
```console
[!] sync incomplete
[!] epoch outdated
[+] rpc server running
[!] no eth mapping⏎
[+] eth mapping up to date
[+] f3 running⏎
```

</TabItem>
Expand All @@ -92,26 +98,28 @@ This endpoint is a combination of the `/livez` and `/readyz` endpoints, except
that the node doesn't have to be fully synced. Deprecated in the Kubernetes
world, but still used in some setups.

```bash
curl "http://127.0.0.1:2346/healthz?verbose"
```

Sample _healthy_ response:

```
❯ curl "http://127.0.0.1:2346/healthz?verbose"
[+] sync complete
```console
[+] epoch up to date
[+] rpc server running
[+] sync ok
[+] peers connected⏎
[+] peers connected
[+] f3 running⏎
```

Sample _unhealthy_ response:

```
❯ curl "http://127.0.0.1:2346/healthz?verbose"
[!] sync incomplete
[!] epoch outdated
[+] rpc server running
[+] sync ok
[!] no peers connected⏎
[+] peers connected
[+] f3 running⏎
```

</TabItem>
Expand Down
8 changes: 6 additions & 2 deletions docs/docs/users/guides/monitoring/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ title: Logs

Logs are written to standard output by default. They can be written to rolling log files with the `--log-dir <dir>` flag. The log level can be set with the `RUST_LOG` environment variable. The defaults are generally sufficient for most users but can be adjusted to provide more or less information. Different modules can have different log levels, and the log level can be set to `trace`, `debug`, `info`, `warn`, `error`, or `off`.

```console
RUST_LOG=info,forest_filecoin=debug forest --chain calibnet
```bash
RUST_LOG=info,forest_filecoin=debug forest --chain calibnet
```

Sample output:

```console
2024-08-28T12:49:59.830012Z INFO forest::daemon::main: Using default calibnet config
2024-08-28T12:49:59.834109Z INFO forest::daemon: Starting Forest daemon, version 0.19.2+git.74fd562acce
2024-08-28T12:49:59.834123Z DEBUG forest::daemon: Increased file descriptor limit from 1024 to 8192
Expand Down
7 changes: 6 additions & 1 deletion docs/docs/users/guides/monitoring/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ title: Metrics

Prometheus metrics are exposed on localhost's port `6116` by default, under `/metrics`. They are enabled by default and can be disabled with the `--no-metrics` flag. The metrics endpoint can be modified with the `--metrics-address` flag.

```bash
curl localhost:6116/metrics
```

Sample output:

```console
curl localhost:6116/metrics
# HELP lru_cache_miss Stats of lru cache miss.
# TYPE lru_cache_miss counter
lru_cache_miss_total{kind="tipset"} 7199
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/users/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ Forest focuses on four key properties:

With Forest you can:

- Sync with a Filecoin chain (mainnet/calibnet/etc.)
- Synchronize and interact with a Filecoin chain on all supported networks
- Import/export snapshots
- Submit transactions to the network
- Run a JSON-RPC server
- Act as a bootstrap node
- manage and interact with the FIL wallet

## Interacting with Forest

Expand Down
Loading

0 comments on commit 97388de

Please sign in to comment.