Forest

Forest is an experimental Filecoin node implementation written in Rust by ChainSafe. It aims to offer a faster and more user-friendly alternative to the canonical Filecoin node, Lotus. With Forest, you can:

  • Send and receive FIL
  • Validate the Filecoin blockchain
  • Generate blockchain snapshots

Documentation

The most comprehensive guide to using Forest can be found in the Forest Book. This includes:

Quickstart

Installation

Forest requires the latest Rust toolchain. To install Forest, run the following commands:

# Clone the repository
git clone --recursive https://github.com/chainsafe/forest
cd forest
 
# Install the binary to $HOME/.cargo/bin
make install
 
# Run the node on mainnet
forest

Using Docker

Forest can also be run using Docker, eliminating the need to install the Rust toolchain or other dependencies. This works on Linux, macOS, and Windows.

# Run daemon
docker run --init -it --rm ghcr.io/chainsafe/forest:latest --help
 
# Run CLI
docker run --init -it --rm --entrypoint forest-cli ghcr.io/chainsafe/forest:latest --help

For more detailed usage, refer to the Forest Docker documentation.

Features

Forest includes a variety of features to facilitate Filecoin node operations:

  • Blockchain Validation: Ensures the integrity of the Filecoin blockchain.
  • Snapshot Generation: Allows creating snapshots of the blockchain state.
  • Docker Support: Simplifies deployment with Docker containers.
  • CLI Tools: Provides command-line tools for interacting with the node.
  • Custom Configurations: Supports custom configurations and bootnodes.

Dependencies

Forest relies on several dependencies for optimal performance. For example, on Ubuntu 20.04:

sudo apt install build-essential clang

On other systems like Archlinux or Fedora, similar packages are required. Refer to the specific installation instructions for each OS in the documentation.

Configuration

Forest supports various configuration options, including keystore encryption and network settings. These configurations can be set via environment variables or configuration files.

Example configuration file:

data_dir = "\<directory for all chain and networking data\>"
genesis_file = "\<relative file path of genesis car file\>"
 
[network]
listening_multiaddr = "\<multiaddress\>"
bootstrap_peers = ["\<multiaddress\>"]

Logging

Forest uses Rust's log filtering options, which can be set using the RUST_LOG environment variable. For example:

RUST_LOG="debug,forest_libp2p::service=info" forest

This command sets the logging level to debug for all modules except forest_libp2p::service, which is set to info.

Security

Security is a priority for the Forest project. If you find a security issue, please report it immediately to security@chainsafe.io.

Similar Projects

Rustfinity.com

Links

  1. Home
  2. Learn Rust
  3. Get Started
  4. Practice Rust
  5. Challenges
  6. Tutorials
  7. Blog
  8. Open source
  9. Learn Gleam

Socials

  1. GitHub
  2. X

Legal

  1. Privacy Policy
  2. Terms of Service