{"id":20388313,"url":"https://github.com/chainsafe/forest","last_synced_at":"2026-02-09T16:12:13.298Z","repository":{"id":37207110,"uuid":"221071442","full_name":"ChainSafe/forest","owner":"ChainSafe","description":"🌲 Rust Filecoin Node Implementation","archived":false,"fork":false,"pushed_at":"2025-04-08T00:42:08.000Z","size":30842,"stargazers_count":651,"open_issues_count":161,"forks_count":163,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-04-08T02:01:34.420Z","etag":null,"topics":["blockchain","filecoin","p2p","rust"],"latest_commit_sha":null,"homepage":"https://forest.chainsafe.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChainSafe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-11T21:15:40.000Z","updated_at":"2025-04-07T23:13:18.000Z","dependencies_parsed_at":"2024-01-02T01:12:12.797Z","dependency_job_id":"68a62327-cf37-4177-8cbc-de04736d7fc4","html_url":"https://github.com/ChainSafe/forest","commit_stats":{"total_commits":2884,"total_committers":58,"mean_commits":"49.724137931034484","dds":0.8099861303744799,"last_synced_commit":"404b835328602e5e77bda85e42a402e290c457d7"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fforest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fforest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fforest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fforest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChainSafe","download_url":"https://codeload.github.com/ChainSafe/forest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248615898,"owners_count":21133972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","filecoin","p2p","rust"],"created_at":"2024-11-15T03:08:42.977Z","updated_at":"2026-02-09T16:12:13.292Z","avatar_url":"https://github.com/ChainSafe.png","language":"Rust","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg height=\"243\" src=\"docs/static/img/forest_logo.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/ChainSafe/forest/releases/latest\"\u003e\u003cimg alt=\"Latest release\" src=\"https://img.shields.io/github/v/release/ChainSafe/forest?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.forest.chainsafe.io\"\u003e\u003cimg alt=\"Docs\" src=\"https://img.shields.io/badge/doc-user_guide-green?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/github/ChainSafe/forest\"\u003e\u003cimg alt=\"Codecov\" src=\"https://codecov.io/github/ChainSafe/forest/graph/badge.svg?token=1OHO2CSD17\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/ChainSafe/forest/blob/main/LICENSE-APACHE\"\u003e\u003cimg alt=\"License Apache 2.0\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ChainSafe/forest/blob/main/LICENSE-MIT\"\u003e\u003cimg alt=\"License MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://twitter.com/ChainSafeth\"\u003e\u003cimg alt=\"Twitter\" src=\"https://img.shields.io/twitter/follow/chainsafeth?style=for-the-badge\u0026color=1DA1F2\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nForest is a [Filecoin] node written in [Rust]. With Forest, you can:\n\n- Transfer FIL,\n- host a high-performance RPC API,\n- validate the Filecoin blockchain,\n- generate blockchain snapshots.\n\nWhile less feature-complete than the canonical Filecoin node, [Lotus], Forest\naims to be the faster and easier-to-use alternative.\n\n## Questions\n\nHave questions? Feel free to post them in [Forest Q\u0026A]!\n\n## Run with Docker\n\nNo need to install Rust toolchain or other dependencies, you will need only\nDocker - works on Linux, macOS and Windows.\n\n```\n# daemon\n❯ docker run --init -it --rm ghcr.io/chainsafe/forest:latest --help\n# cli\n❯ docker run --init -it --rm --entrypoint forest-cli ghcr.io/chainsafe/forest:latest --help\n```\n\nNext, run a Forest node in a CLI window. E.g.\n[Run calibration network](https://docs.forest.chainsafe.io/getting_started/syncing/#calibnet)\n\nThereafter, in another terminal, you will be able to use the `forest-cli` binary\ndirectly by launching `bash` in the `forest` container:\n\n```\ndocker exec -it forest /bin/bash\n```\n\nFor more in-depth usage and sample use cases, please refer to the Forest Docker\ndocumentation in the [Forest Book]. Keep in mind that the `latest` tag is the latest\nstable release. If you want to use the current development build, use the `edge`\ntag.\n\n## Dependencies\n\n- Rust (toolchain version is specified in `rust-toolchain.toml`)\n- Go for building F3 sidecar module. (toolchain version is specified in\n  `go.work`)\n\nInstall [rustup](https://rustup.rs/)\n\nInstall [Go](https://go.dev/doc/install)\n\n- OS Base-Devel/Build-Essential\n- Clang compiler\n\nThe project also uses [mise-en-place](https://mise.jdx.dev/) to handle builds and\ninstallations.\n\n### Ubuntu (20.04)\n\n```\nsudo apt install build-essential clang\n```\n\n### Fedora (36)\n\n```\nsudo dnf install -y clang-devel\n```\n\n## Installation\n\n```shell\n# Clone repository\ngit clone --recursive https://github.com/chainsafe/forest\ncd forest\n\n# Install binary to $HOME/.cargo/bin\nmise run install\n\n# Run the node on mainnet\nforest\n```\n\n### Config\n\n#### Keystore\n\nTo encrypt the keystore while in headless mode, set the `FOREST_KEYSTORE_PHRASE`\nenvironmental variable. Otherwise, skip the encryption (not recommended in\nproduction environments) with `--encrypt-keystore false`.\n\n#### Network\n\nRun the node with custom config and bootnodes\n\n```bash\nforest --config /path/to/your_config.toml\n```\n\nExample of config options available:\n\n```toml\n[client]\ndata_dir = \"\u003cdirectory for all chain and networking data\u003e\"\ngenesis_file = \"\u003crelative file path of genesis car file\u003e\"\n\n[network]\nlistening_multiaddrs = [\"\u003cmultiaddress\u003e\"]\nbootstrap_peers = [\"\u003cmultiaddress\u003e\"]\n```\n\nExample of a [multiaddress](https://github.com/multiformats/multiaddr):\n`\"/ip4/54.186.82.90/tcp/1347/p2p/12D3K1oWKNF7vNFEhnvB45E9mw2B5z6t419W3ziZPLdUDVnLLKGs\"`\n\n#### Configuration sources\n\nForest will look for config files in the following order and priority:\n\n- Paths passed to the command line via the `--config` flag.\n- The environment variable `FOREST_CONFIG_PATH`, if no config was passed through\n  command line arguments.\n- If none of the above are found, Forest will look in the systems default\n  configuration directory (`$XDG_CONFIG_HOME` on Linux systems).\n- After all locations are exhausted and a config file is not found, a default\n  configuration is assumed and used.\n\n### Logging\n\nThe Forest logger uses\n[Rust's log filtering options](https://doc.rust-lang.org/1.1.0/log/index.html#filtering-results)\nwith the `RUST_LOG` environment variable. For example:\n\n```bash\nRUST_LOG=\"debug,forest_libp2p::service=info\" forest\n```\n\nWill show all debug logs by default, but the `forest_libp2p::service` logs will\nbe limited to `info`\n\nForest can also send telemetry to the endpoint of a Loki instance or a Loki\nagent (see [Grafana Cloud](https://grafana.com/oss/loki/)). Use `--loki` to\nenable it and `--loki-endpoint` to specify the interface and the port.\n\n### Testing\n\nFirst, install the [`nextest`](https://nexte.st/) test runner.\n\n```bash\ncargo install cargo-nextest --locked\n```\n\n```bash\n# To run all tests\nmise test\n# Or, with a different profile\nmise test release\n```\n\nChain synchronization checks are run after every merge to `main`. This code is\nmaintained in a separate repository - [Forest IaC].\n\n### Linters\n\nThe project uses exhaustively a set of linters to keep the codebase clean and\nsecure in an automated fashion. While the CI will have them installed, if you\nwant to run them yourself before submitting a PR (recommended), you should\ninstall a few of them.\n\nYou can install required linters with `mise install-lint-tools`.\nAfter everything is installed, you can run `mise lint`.\n\n### Joining the testnet\n\nSelect the builtin calibnet configuration with the `--chain` option. The\n`--auto-download-snapshot` will ensure that a snapshot is downloaded if needed\nwithout any prompts.\n\n```bash\n./target/release/forest --chain calibnet --auto-download-snapshot\n```\n\n### Interacting with Forest via CLI\n\nWhen the Forest daemon is started, an admin token will be displayed and saved to\ndata directory by default. (alternatively, use `--save-token \u003ctoken\u003e` flag to save it on disk).\nYou will need this for commands that require a higher level of authorization (like a\npassword). Forest, as mentioned above, uses multiaddresses for networking. This\nis no different in the CLI. To set the host and the port to use, if not using\nthe default port or using a remote host, set the `FULLNODE_API_INFO` environment\nvariable. This is also where you can set a token for authentication. Note that the token is\nautomatically set for CLI if it is invoked on the same host of the daemon.\n\n```\nFULLNODE_API_INFO=\"\u003ctoken goes here\u003e:/ip4/\u003chost\u003e/tcp/\u003cport\u003e/http\n```\n\nNote that if a token is not present in the FULLNODE_API_INFO env variable, the\ncolon is removed.\n\nForest developers will prepend this variable to CLI commands over using `export`\non Linux or its equivalent on Windows. This will look like the following:\n\n```\nFULLNODE_API_INFO=\"...\" forest-cli auth api-info -p admin\n```\n\nThe admin token can also be set using `--token` flag.\n\n```\nforest-cli --token \u003cADMIN_TOKEN\u003e\n```\n\n### Forest executable organization\n\nThe binaries in the Forest repository are organized into the following\ncategories:\n\n| Binary                                                                          | Role                                                     | Command example                                    |\n| ------------------------------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------- |\n| [`forest`](https://docs.forest.chainsafe.io/reference/cli#forest)               | Forest daemon, used to connect to the Filecoin network   | `forest --chain calibnet --auto-download-snapshot` |\n| [`forest-wallet`](https://docs.forest.chainsafe.io/reference/cli#forest-wallet) | Manage Filecoin wallets and interact with accounts       | `forest-wallet new secp256k1`                      |\n| [`forest-cli`](https://docs.forest.chainsafe.io/reference/cli#forest-cli)       | Human-friendly wrappers around the Filecoin JSON-RPC API | `forest-cli info show`                             |\n| [`forest-tool`](https://docs.forest.chainsafe.io/reference/cli#forest-tool)     | Handle tasks not involving the Forest daemon             | `forest-tool snapshot fetch`                       |\n\n### Detaching Forest process\n\nYou can detach Forest process with `nohup` or `disown` from the terminal so that it runs in the\nbackground after the terminal is closed:\n\n```bash\nnohup ./target/release/forest \u0026\n```\n\n```bash\n./target/release/forest \u0026\ndisown\n```\n\nThe command will block until the detached Forest process has started its RPC\nserver, allowing you to chain some RPC command immediately after.\n\n### Forest snapshot links\n\n- [calibration network](https://forest-archive.chainsafe.dev/latest/calibnet/)\n- [main network](https://forest-archive.chainsafe.dev/latest/mainnet/)\n\n### Documentation\n\n- [Forest Book](https://docs.forest.chainsafe.io/)\n\n## Contributing\n\n- Check out our contribution guidelines: [CONTRIBUTING.md]\n\n## ChainSafe Security Policy\n\n### Reporting a Security Bug\n\nWe take all security issues seriously, if you believe you have found a security\nissue within a ChainSafe project please notify us immediately. If an issue is\nconfirmed, we will take all necessary precautions to ensure a statement and\npatch release is made in a timely manner.\n\nPlease email a description of the flaw and any related information (e.g.\nreproduction steps, version) to [security at chainsafe dot io].\n\n## License\n\nForest is dual licensed under [MIT] + [Apache 2.0].\n\n[Filecoin]: https://filecoin.io/\n[Rust]: https://www.rust-lang.org/\n[Lotus]: https://lotus.filecoin.io/\n[Forest Book]: https://docs.forest.chainsafe.io/\n[Forest Q\u0026A]: https://github.com/ChainSafe/forest/discussions/categories/forest-q-a\n[CONTRIBUTING.md]: CONTRIBUTING.md\n[Forest IaC]: https://github.com/ChainSafe/forest-iac\n[security at chainsafe dot io]: mailto:security@chainsafe.io\n[MIT]: https://github.com/ChainSafe/forest/blob/main/LICENSE-MIT\n[Apache 2.0]: https://github.com/ChainSafe/forest/blob/main/LICENSE-APACHE\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsafe%2Fforest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainsafe%2Fforest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsafe%2Fforest/lists"}