Home

Awesome

[ARCHIVED] Filecoin Virtual Machine spec notebook


This is a deprecated repo with historical relevance

This repo is where the original design of the Filecoin Virtual Machine was originally incubated.

The FVM shipped to Filecoin's mainnet in Network Version 16 (Skyr upgrade).

The final design of the FVM was formalized in FIP-0030, its activation was proposed in FIP-0031, and the new gas model was introduced in FIP-0032.

Today, most discussions and spec work take place in these venues:


This is the home of the FVM project in Filecoin.

Contents

<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->

Context and goals

See discussion in FIPs repo: https://github.com/filecoin-project/FIPs/issues/113

Filecoin today lacks general programmability. As a result, it is not possible to deploy user-defined behaviour, or "smart contracts", to the blockchain.

The closest thing that Filecoin has is a discrete set of embedded smart contracts, denominated system "actors". They provide the logic for elements like storage power accounting, deal-making, payment channels, scheduled execution, and more. But their functionality is hardcoded as per the specs.

The goal of this project is to add general programmability to the Filecoin blockchain. We predict this will unleash a profileration of new services and tools that can be built and deployed to the Filecoin network, without requiring network upgrades, involvement from core implementation maintainers, changes in the embedded actors, or spec alterations.

Smart contracts on Filecoin can bring huge benefits to both clients and providers — from unlocking "repair providers" that automate the process of repeat storage deals for programmatic “fire and forget” storage, to on-chain storage onboarding contracts (a la programmatic Slingshot), to collective DataDAOs that fund/monetize data on Filecoin.

Furthermore, we aim for full EVM compatibility, allowing Filecoin to leverage the vast pool of assets, talent and tools that already exist in that ecosystem.

FVM (Filecoin Virtual Machine) is the name of this project, as well as the name of the execution environment for smart contracts on the Filecoin blockchain.

About this effort

<details><summary>Click to expand</summary> FVM unlocks major new network capabilities without requiring network upgrades, core dev implementation work, or any cross-team coordination - helping increase the network’s iteration speed. However it will also *add* complexity to the protocol and needs a lot of design work to get it right.

We acknowledge that significant exploration/prototyping is necessary before ready to land. While this work is initiated by Protocol Labs, we rely on the vibrant Filecoin community to engage continuously, collaborate around ideas and designs, implement prototypes, test preview releases, build on it, come up with tooling, and ultimately, collectively own it and extend it.

Note: landing FVM will likely also have significant network scalability impacts as well that will need to be mitigated.

</details>

About this repo

<details><summary>Click to expand</summary> This repo acts as an entrypoint, hosting notes, design proposals, product ideas, and other documents related to this proejct.

Code and prototypes will usually be hosted in separate repos, linked from here for discovery.

This repo will incubate the FIP (Filecoin Improvement Proposal) that shall formally introduce this capability into the network.

</details>

Document index

⚠️ These documents are being drafted.

Experiments

License

Dual-licensed: MIT, Apache Software License v2, by way of the Permissive License Stack.