Into the Forest 🌲

Into the Forest 🌲

Authored by Lee Raj

Since our last update, we've covered a lot of ground—from a powerful snapshot process, a fully functional Filecoin wallet (beta), and our new Forest CLI functionalities - we have some exciting developments to share!

If you're just catching up, Forest is ChainSafe's Rust implementation of the Filecoin protocol. We've been working on Forest over the last few years to support the decentralization and resilience of the Filecoin network.

So, how does Forest make this happen?

By hosting snapshots for both calibration and mainnet through the Forest node. With the capacity to host its own snapshots, Forest is now an operational consensus node for the Filecoin network. Previously, this was only achievable with Lotus. Below we'll cover our updates in detail, including a simple "how-to" for running Forest. Let's dive in!

Introducing Forest🌲

Built on the principles of memory safety and performance, Forest leverages the power of Rust to provide a diverse alternative to Lotus, the current Go-based reference implementation of Filecoin.

By adopting a modular approach and adhering to the Filecoin Protocol Specification, our team is building a complete Filecoin node in Rust.

Milestones and future developments

Following our contributions to the Filecoin network last fall, we're happy to announce newly reached milestones from the past six months.

Milestones - H1 2023

  • Generate snapshots for both the calibration and mainnet with one line from the CLI.

  • Snapshots import in a few minutes. Snapshot export times are: <1 hour (mainnet) and <1 minute (calibration net).

  • Query the Filecoin blockchain via the Forest CLI with an enhanced JavaScript console.

  • Any computer with at least 10 GB memory can generate snapshots.

  • Fully functional Filecoin wallet (beta): store, send, and receive FIL.

Forest is also up to date with the latest version of the Filecoin network NV20 and supports all the latest FIPs with its developments.

We're particularly proud of the ease with which Forest can generate both Filecoin calibration and mainnet snapshots. This advancement lets users download and generate Forest snapshots using only 10 GB of memory, as opposed to the Lotus requirement of at least 128 GB of memory for the same action. Since most personal computers have a maximum memory of 16 GB, this stands to democratize the Filecoin network beyond what was previously possible.

The reduced snapshot import times (less than one hour for the mainnet and less than one minute for the calibration network) will greatly facilitate developers' workflow, making Forest a more efficient tool for development on the Filecoin network.

Users can also leverage the Forest CLI to make queries within the Filecoin blockchain. The Forest CLI takes the extra work out of generating snapshots (for both the calibration and mainnet) with its one-line automatic snapshot generation feature.

Finally, Forest has its own fully functional Filecoin wallet (beta). Now users can store, send and receive FIL within the application itself.

Next up on the roadmap

  • Adding mining functionality in Forest via Lotus miners

  • Launching Forest's own test network (called Pinecone)

Our team has ambitious plans for Forest in the coming months as we aim to integrate mining capabilities using the Lotus miner. This step will open another door to directly participate in the Filecoin ecosystem and help increase the network's overall security.

For more information on our development plan for the rest of the year, plus our five separate workstreams, explore our extensive Forest Roadmap 2023 and Forest Milestones on GitHub.

How to run Forest

Users can interact with Forest either through the CLI or directly via Docker. Using Docker is the simplest method, eliminating the need to install a Rust toolchain or other dependencies.

Running Forest in Docker is compatible with Linux, Windows, and MacOS.

Step 1

Install Docker to get started.

Step 2

Refer to the screenshot below for Docker's General settings prior to running Forest:

Step 3

Open your machine's Terminal or Command Prompt and run this command:

docker run --init -it --rm --entrypoint forest-cli --help

You should see the Forest commands appear on your screen (see screenshot below).

Step 4

Now we must run the Forest daemon (in-depth instructions can be found in the Forest user guide on Github).

In the same terminal window, you can paste this docker run:

docker run --init -it --rm --name forest --chain calibnet --auto-download-snapshot

This will start a Forest node with the calibration network. This one-line command will download and generate a Forest snapshot in less than one minute.

Step 5

Once the node is running, in another Terminal/Command Prompt tab, you can use the forest-cli binary directly by launching bash in the forest container.

Open another tab and type:

docker exec -it forest /bin/bash


You are in the Forest container where you can run forest-cli! Try checking the version by typing:

forest-cli -V

Advanced Instructions

Head over to our GitHub repository for a complete overview of setting different config options, running multiple tests, or exploring all linter installs.

You can download Forest-generated snapshots from Filecoin's docs here:

Wrapping up

Through our continued improvements to Forest, we aim to solidify its position as a robust Filecoin Rust implementation. Our goal is to empower users with enhanced mining capabilities, heightened wallet security, and a dedicated test network in the upcoming months. Stay tuned! There is a lot more to come.

For those interested in contributing to our stack, we encourage you to submit pull requests through our issues repository.

Have a question? Hop into our Discord #🌲 forest-general

About ChainSafe

ChainSafe is a leading blockchain research and development firm specializing in infrastructure solutions for web3. Alongside its contributions to major ecosystems such as Ethereum, Polkadot, Filecoin, and more, ChainSafe creates solutions for developers and teams across the web3 space utilizing expertise in gaming, interoperability, and decentralized storage.

As part of its mission to build innovative products for users and improved tooling for developers, ChainSafe embodies an open source and community-oriented ethos to advance the future of the internet.

Website | Twitter | Linkedin | GitHub | Discord | YouTube | Newsletter