What are the upgrade contents of the V12 version of filecoin network?

爱小豪
5 min readJun 17, 2021

--

On April 29, 2021, the filecoin network was upgraded to version 12. This upgrade introduces the fourth version of specs actors, which is a set of built-in actors that specify the filecoin protocol. The new version of specs actor has higher performance and faster verification time.

Upgrade motivation For all blockchain projects, it is important to ensure that the time required for block verification is less than the frequency of block generation. On the filecoin network, blocks are generated every 30 seconds, so it is important that the block verification time must be less than 30 seconds. Of course, block validation depends on many factors: the hardware specification of the node, the size of the chain database, other processes running on the node, and so on.

Before the V12 upgrade, the medium quality nodes run smoothly, and the block verification time is less than 30 seconds. However, the verification time of slower nodes and nodes with full chain history (with very large database) is also longer, which makes them at risk of being out of sync when the speed drops. Although most miners using high-performance hardware and small chain databases will not be affected, other important members of the ecosystem, including exchanges and archive nodes, begin to encounter some slow speed and occasional synchronization problems, which have a negative impact on the health of the whole network.

One of the reasons for the slow synchronization time is that the sector code is inefficient in processing newly created nodes. In the past few months, the Internet has gone through a wave of spam, creating miners on the chain and generating too many empty miners.

In the V12 network upgrade, this improvement can also actively prevent the future createminer spam from turning into an attack medium for slower nodes. Because reducing the time of processing empty ore machine can greatly reduce the block verification time and improve the performance.

Performance improvement To understand the improved performance in version V12, let’s take a look at some details of the system.

Filecoin cron actor, located at address F03, is the system sector of the network running in each period. Running state transition can keep the filecoin network running smoothly and correctly. Cron actor processes miner sectors every 60 block heights (30 minutes) to verify whether the miner has correct storage proof for some sectors to be checked. Through the processing of cron actor, the filecoin protocol can ensure that the whole filecoin network automatically checks the storage every 24 hours, and any miners who lose or damage data will be punished.

Before network version 12, cron actor handled a single sector. Filecoin version 12 changed the cron actor to handle only sectors that need it. If miners are actively proving their storage, cron will need to work.

Specifically, any of the following conditions requires cron work every 60 block heights:

With active precommit;

It has active sectors;

There is a pledge reward.

The miner sector that does not meet any of the above conditions does not need to do unnecessary work during cron work, so it can be safely skipped. In particular, the newly created miner node will not immediately request a cron job, only when it first starts to guarantee storage to the network.

After this optimization measure came into effect, the filecoin network has handled about 375000 miners per 60 block heights to more than 2000 block heights. This makes the block average synchronization time about twice as fast, and the size of daily state snapshot is reduced by more than 20GB, almost doubled! The average and longest block synchronization time is significantly reduced, and the asynchronous situation of large archive nodes is almost completely eliminated.

After upgrading V12, the synchronization time is reduced

After the upgrade of V12, asynchronous instances are reduced

Run V12 Lotus v1.8.0 and Venus v0.9.5 released the network V12 upgrade, this upgrade includes V4 actor. Lotus team released this version in a short period of time, only about 48 hours from release to network upgrade, and all node operators must complete the upgrade within 48 hours. It is very important that the community can complete the upgrade quickly, because it may need to solve key security issues in a very short time. In response to such incidents, the network tested various “war game” scenarios in the space race in September 2020 (shortly before the main network went online).

The community quickly completed the V12 upgrade within 48 hours, proving its ability to upgrade quickly when it needs to in the future. Such rapid upgrades rely on effective communication channels between the filecoin executive team and the node operators (including storage miners, storage clients and exchanges). In order to enable everyone to participate, the filecoin community engineer announced the details of the upgrade in the community forum, including the key points of the upgrade, the height of the upgrade block, and the link to the publish schedule, and updated the filecoin network status page to make the notification subscribable. Then, the development team responds quickly to ensure that everyone can upgrade their nodes timely and smoothly through multiple support channels (including forum, slack channel, etc.).

The correct implementation of such changes in a short period of time also needs to go through a strict testing and release process. The lotus team was able to do this using a list of new initiatives developed over the past few months. In addition, in response to community feedback, the lotus team ensured that no untested optional features were introduced into this mandatory release. On the contrary, this network upgrade is based on Lotus v1.6.0, which is the latest stable version of lotus and has been tested. For users who need the latest features and are willing to take more risks, they can choose to upgrade the candidate version lotus v1.9.0-rc1, which includes the content of this network upgrade and more new features.

--

--

爱小豪
爱小豪

Written by 爱小豪

0 Followers

地表写手创始人

No responses yet