Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Filecoin Protocol Master Plan FIP #745

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions FIPS/fip-0000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
fip: "0000"
title: Filecoin Protocol Master Plan
author: Steven Li (@steven004), @Fatman13
discussions-to: https://github.com/filecoin-project/FIPs/discussions/725
status: Draft
type: Organizational
created: 2023-06-30
---

## Simple Summary

Use a layered protocol design approach as guidelines to all future technical FIPs on L1 and L2.

## Abstract

_[Video recording](https://youtu.be/qhd0u7z9Fnw?t=2976) of proposed FIP#725 overview presented during core dev meeting 59._

We think the solution to many of the current protocol design dilemmas is a layered approach to protocol architecture design. Using an application stack analogy, to support generic applications to be run in computers, the OS layer focuses solely on managing processes, expose hardware resources, facilitate communications between apps, etc.

<img src="https://github.com/filecoin-project/FIPs/assets/1591330/2624292e-af15-404b-9b60-d8363f56ba93" width="230" />

By defining clear stratification and roles of each layer within the protocol architecture, we think Filecoin network as whole would then able to evolve into its next stage.

What's more, the layered approach is only doable after FEVM launched in March, 2023. For the longest time since mainnet launch, the Filecoin protocol itself is the product for data storage. It has to couple with all kinds of complexity a storage product requires. However, now we have the option to clean up the core protocol layer and push the storage product to layer 2 so that Filecoin core protocol can actually transition into a platform, just like the OS layer on the previous analogy.

<img src="https://github.com/filecoin-project/FIPs/assets/1591330/03c91b23-36a5-4dc9-8e47-50f2c575eb88" width="640" />

## Change Motivation

The following are some of common protocol design challenges we are facing today, which the proposed protocol master plan tries to address.

### Drastic protocol changes fail to reach soft consensus

One of the recurring problems we see throughout the past is that FIP governance is not quite able to have the community to reach soft consensus on drastic protocol changes, for example, changes like FIP36, FIP56, etc. It is very hard to setup definitive process on the how we can reach consensus, to understand which group should or should not weigh in on the decisions, or to increase governance engagement in general.

### Protocol limitations stalling ecosystem innovations

Then we have the problem of slow protocol iteration stalling innovations on user-defined defi and storage solutions. Many defi solution have to incorporate cefi elements due to limitation of protocol and user-defined storage market is being out-competed by the built-in network subsidies.

### Incremental FIPs with no strategic goal

Lastly, we have the problem of FIPing with no clear strategic goals. A Lack of priorities and principles to guide which FIP should be discussed and implemented next. Just like the network as a whole needs a [master plan](https://www.youtube.com/watch?v=HrqavbeDDY0) to steer its development and priorities, the evolution of Filecoin protocol itself also needs a master plan to adapt itself in the ever changing market environment. Right now, FIPing is like guerrilla warfare with no clear end-game in mind. In a way, battles are won but the war is lost. Only with a Filecoin protocol master plan **thoroughly** and **openly** discussed, then we could move on to take the network to the next level/stage.

## Specification

Again all details in this version of Filecoin protocol master plan design is open for discussion. No particular parameter is set in stone. (Ideas [borrowed](https://mp.weixin.qq.com/s/1nz9MjMBxvsydLZy3LiUYA) from @steven004)

<img src="https://github.com/filecoin-project/FIPs/assets/1591330/dec61a05-6bf3-4f01-9319-398db2b9b53b" width="640" />

What we like to stress again is that, on the left side of the illustration above, before FEVM Filecoin protocol itself is the storage product and everything is tightly coupled. Like in an old Chinses saying "牵一发动全身", which means "pulling one hair is affecting the whole body". And on the right side of the illustration above, the core protocol layer, like rewards, miner, consensus, and prove of storage, are completely separated from user layer, where products and application are actually built. This layer division effectively makes Filecoin core protocol as a platform.

### Layered Approach

Layered protocol design approach mandates future technical FIPs to contribute to the realization of the following protocol stratification.

L1 - core protocol: reward, consensus, miner, proof of storage
L2 - user/application layer: Rest of the actors

### One Example Path To Layered Approach

_**Important Note**: this path is not mandated by this FIP, but a mere example on how layered approach could be realized._

<img src="https://github.com/filecoin-project/FIPs/assets/1591330/891c6c46-6259-4e05-8587-865e6fbe0579" width="640" />

- **Level all sector power**: CC sectors and DC sectors will all just have raw byte storage power, effectively removing concept of QAP and reducing L1 complexity.
- **Add `subsidy` built-in actor**: with sectors normalized, the subsidized reward for storage deals is completely decoupled from storage power and will be managed by `subsidy` built-in actor. (revisit of [FIP0033](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0033.md))
- **Move market actor to L2**: introduce a concept of verified market actor on L2 which can enjoy its share of the reward from `subsidy` actor if network participants made storage deals through this actor.
- **Dynamic reward sharing**: block reward will be shared between `subsidy` and `miner` actor, each claiming 50% of the BR with `subsidy` gradually decay to 10% of the BR. (revisit of [FIP442](https://github.com/filecoin-project/FIPs/discussions/442))
- **Cap slashing for consensus miner**: ongoing [FIP712](https://github.com/filecoin-project/FIPs/discussions/712) discussion.

## Design Rationale

_**Important Note**: rationale follows up with the example spec above and is not mandated by this FIP, but a mere example on the effects of layered approach._

One of the key characteristics of this design is the layered approach through decoupling a complex interlinked system into two distinct functional space.

Leveling all sector power is the corner stone of the whole design. All sectors are born equally through PoRep and should be treated equally. QAP not only adds unnecessary complexity to L1 as the network is slowly but surely becoming a DC only network (with growing [security concerns](https://github.com/filecoin-project/FIPs/discussions/554#discussioncomment-4605247)), but also couples rewards with storage power which limits many potential innovations on a truly value driven storage deal marketplace. Besides, with QAP gone and subsidy for storage deals untied from storage power, the protocol could actually leverage L2 to have much more flexible ways to subsidize storage deals.

To achieve the eventual paid storage deals for network participants and to accommodate [f+ program](https://github.com/filecoin-project/FIPs/discussions/636#discussioncomment-5076101), a 50-50 BR split between the `subsidy` and `miner` actor is proposed. This roughly allows every network participants to maintain its current block revenue, as at the writing of this proposal QAP of DC and QAP of CC are [relatively close](https://filscan.io/). To help network participants to transition from subsidized deals to actual paid deals, the share of `subsidy` BR will be ever shrinking according to a f(x) and reach a 10-90 BR split with `miner` actor in the end.

Once the market actor is [pushed to L2](https://github.com/filecoin-project/FIPs/discussions/554#discussioncomment-4376052), it can then experiment with various deal terms to suit whatever client and provider want without the need to wait for a FIP discussion or a network upgrade. A governance body can determine which market actor to become a verified one to gain access to the deal subsidies from the `subsidy` actor.

With user-defined layer and protocol layer properly separated, the core L1 consensus could just focus on what it does the best, namely EC based on storage capacity, a Turing complete vm and lastly storage proofs including PoRep and PoSt with sector as its fungible unit.

With unnormalized sector pledge where for 1 TiB of sectors you may have pledge ranging from 4 fil to 10 fil and slashing derived from BR when the sector is sealed which means that some sector may still have pledge left after slashing while some may go into debt after slashing, this complicates storage apps building on top of this complex slashing system, stalling innovations on user-defined [financing](https://github.com/filecoin-project/FIPs/discussions/691#discussioncomment-5817293) and storage markets.

Additional design rationals... [1](https://github.com/filecoin-project/FIPs/discussions/725#discussioncomment-6191921)

## Incentive Considerations

_**Important Note**: considerations follows up with the example spec above and is not mandated by this FIP, but a mere example on the effects of layered approach._

The way protocol design is setup right now wipes out the potential for user-defined storage market because the incentive for QAP is too strong for it to compete. Given the new design, network incentive for early data on-boarding adopters could gradually be phased out and be substituted with proper market driven storage exchange.

As reward for consensus mining become more predictable, a bigger pool of swing miners would likely to join and contribute to the security of the network. They can have better assessment of their share of the BR, their liquidity status to hedge against macro economy uncertainty, and potentially start storage providing if incentives are [aligned](https://github.com/filecoin-project/FIPs/discussions/712#discussioncomment-6108272).

## Product consideration

_**Important Note**: considerations follows up with the example spec above and is not mandated by this FIP, but a mere example on the effects of layered approach._

With the above design, it also comes with explicit [separation of roles](https://github.com/filecoin-project/FIPs/discussions/636#discussioncomment-5096322), namely consensus miner and storage provider, so that they could co-exist and each serves its purpose in the network.