Glow of the Canopy #3: Sprucing Up

Glow of the Canopy #3: Sprucing Up

Authored by Timothy Hao Chi Ho

An update from the Forest team on our progress from Q3 2022

Forest is ChainSafe's Rust implementation of the Filecoin protocol, an open-source blockchain-based decentralized storage network. Rust provides a foundation for building blockchains with memory safety and performance as a priority. As such, a Rust client for Filecoin will bring diversity and resilience to a network currently largely run on Lotus - Filecoin's reference implementation in Go. Check out this primer to learn the latest about Forest. Finally, dig into the code here and jump into our Discord to get in touch.

Network v17 (NV17) Upgrade and more on the FVM

In our last update, we detailed the Filecoin network's preparation for one of its biggest upgrades ever - the Network v16 "Skyr" update. That upgrade has since been completed by protocol participants. With Skyr, the non-programmable version of the Filecoin Virtual Machine (FVM) was introduced and the first steps towards enabling on-chain smart contracts has been completed.

In the upcoming NV17 upgrade, no new core functionalities are planned for the FVM, but it will receive some "maintenance" refurbishments. The plan is to eventually introduce full programmability to Filecoin by 2023, and to that end, the kinks and details with respect to how the rust code runs inside the FVM or the compilation of actors code into wasm bytecode must be optimized.

And while for now Forest has already made one of its biggest contribution (rust code for actors) that it can, the rest is up to the great folks over at Protocol Labs and the Filecoin Foundation for the next few milestones! Forest continues to be a core contributor/supporter on this effort by supporting issues opened in the built-in actors repo (which powers the FVM) as well as sending PRs related to usability and maintenance.

A major boon to Forest has been the migration of code into the FVM, which has made the codebase for our client quite a bit smaller. This has made writing tests, modularizing, and debugging a much easier feat. Having said that, we still have roughly 53k (!) lines of rust code! With so much code, it's trivial for typos to slip in unnoticed. Forest Team Lead David Himmelstrup remarks,

"So far, we've fixed around two dozen typos. Not hugely important, but it enforces a minimum level of quality that we want to see in Forest."

With such commitment to documentation efficacy, we're all extremely excited to have comprehensive literature to aid those interested in running Forest in the future!

The included Filecoin Improvement Proposals (FIPs) for NV17

According to this discussion, NV17 is expected to bring code freezes in the beginning of October, with the Calibration testnet upgrading mid-October, before the full mainnet upgrade in the second week of November (ETA Nov 9th). Within scope are a couple of Filecoin Improvement Proposals (FIPs) that Forest will be accommodating:

FIP0029 Beneficiary Address for Storage Providers

  • To provide more flexibility for Filecoin's finance market, a new role beneficiary is proposed for a storage provider, which takes over the financial control from the owner. In effect, this supports off-chain and on-chain (FVM) lending markets.

FIP0034 Fix PreCommit Deposit Independent of Sector Content

  • Set the pre-commit deposit (i.e. a storage pledge by a storage provider) to a fixed value regardless of sector content. This FIP is a prerequisite for re-architecting support for alternative deal markets on the FVM. It can also reduce deal-related gas costs.

FIP0036 Introducing a Sector Duration Multiple for Longer Term Sector Commitment

  • A Sector Duration Multiplier is introduced where additional compensation or incentive is provided to storage providers for committing longer term sectors.

FIP0041 Forward Compatibility for PreCommit

  • A small change introducing new versions of PreCommitBatch and ProveReplicaUpdates methods such that future updates are easier to perform.

FIP0044 Standard Message Authentication

  • Standardize an AuthenticateMessage method across actors that gets invoked in place of ValidateSignature calls to the runtime. This allows entities besides externally-owned accounts (EOAs) to authenticate messages. In completion of this FIP, entities like multisig actors can become a storage client.

FIP0045 Decoupling Fil+ from Marketplace

  • Filecoin Plus (Fil+) is the rebranding of the Verified Clients program, representing an additional layer of social trust. Decoupling Fil+ from the marketplace is a critical prerequisite for user-programmed storage markets and Fil+ deal extensions. It also supports long term Fil+ commitments that are independent of markets.

See this technical scope proposal for more information.

More Forest developments

The Forest team is now also hosting daily snapshots of the Calibration testnet. Hosting snapshots make the Forest boot-up process smoother by allowing the client to automatically download them as it starts. The goal is to make it as easy as possible to install Forest, connect to the testnet, get some FIL from the faucet, and allow developers to immediately begin playing around with the network.

Developers interested in Forest will also be pleased to learn that the Forest team is aiming to increase the quality of our user guides, complete with pre-written automated tests! And as mentioned earlier, the Forest team is committed to writing high quality code. As such, we've even been focusing our efforts on maintenance tasks such as enforcing the use of a spell checker in our API documentation.

Roadmap and milestones go public!

Finally, in keeping with the core ethos of the open source community, alongside our open source codebase, the Forest team has officially made public our roadmap and milestones! You can view them on our Github under Forest Roadmap 2022 and Forest Milestones.

Of note, anyone interested in the progress of Forest can see that the team shifts focus between three major workstreams at any given moment:

  • Forest node development

  • Built-in actors maintenance

  • Supporting Filecoin governance (FIP) and network upgrades

All three workstreams service the following milestones:

  • Bringing Forest to a beta release by end of Q1, 2023, which will include automated tests for all features, wallet compatibilities, and storage and retrieval market integrations [over 50% completed]

  • Maintaining up-to-date Calibration testnet snapshots for the Filecoin network [over 60% completed]

  • Measuring network share for Forest by building comprehensive Filecoin network statistics & metrics [Not started], and

  • Researching & developing for a Forest light client that will use as little storage and memory as possible [Not started]

Contribute today

We are now on v0.4.0 of our software. Remember to upgrade! If you are looking to contribute, please make PRs over in our issues repo. You can filter issues by "help wanted" or "bounty".

Forest around the ecosystem

We were also super stoked to participate in the FIL-Toronto Summit from July 4–6, 2022 alongside FIL-Swan & many others! Check out some of our talks here:

Filecoin Implementation Teams Panel with Forest PM Lee Raj, Privacy Engineering Lead lil eth, Protocol Labs/Filecoin founder Juan Benet, Lotus Engineer Aayush Rajasekaran, and Lotus Technical PM Jennifer Wang:

Into The Forest, The Rust Client Of The Filecoin Network with Forest PM Lee Raj:

Using Forest, The Rust Filecoin Client with Privacy Engineering Lead lil eth:

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, Mina, and more, ChainSafe creates solutions for developers and teams across the web3 space utilizing our expertise in gaming, bridging, NFTs, 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. To learn more, click here.

Website | Twitter | Linkedin | GitHub | Discord | YouTube


Thank you to Lee Raj, David Himmelstrup for their contributions in the writing of this article.