filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.81k stars 1.24k forks source link

FIlecoin storage capacity modeling -- Onboarding + Proving #11105

Open ZenGround0 opened 11 months ago

ZenGround0 commented 11 months ago

User Story

The cron gas modeling tracked in #11034 gives a piece of the filecoin network scaling picture. Further modeling of gas costs to onboard and window post data will further enrich our understanding and further help the community make informed decisions. We should also do this modeling for dispute resolution / recovery (both have the property of actually running window post).

Acceptance Criteria

For both onboarding and window post we want a simple numerical model (probably linear) that tells us how expensive onboarding and posting are. We should be able to immediately answer the following questions:

  1. How much storage can ever be added to the filecoin network today? To answer this we can assume max onboarding rate and max sector lifetime.
  2. How much storage can be proved by window post on the filecoin network?
  3. How much storage can be window post disputed / recovered?
### Deliverables
- [ ] Gas model for onboarding costs (precommit + prove commit + optional confirm sector in cron)
- [ ] Gas model for window post
- [ ] Gas model for window post dispute / recovery

Technical Breakdown

### Development
- [ ] Parse gas traces for each task based on method number.  For onboarding we'll need to parse several messages including cron
- [ ] Discover the relevant parameters for gas cost 
- [ ] Gather data and convert it into a vector of these parameters
- [ ] Fit data to a model, probably multilinear regression in all cases
### Testing
- [ ] As in #11034 the model should be evaluated for fit, i.e. using an R^2 parameter and this should drive continued improvements
ZenGround0 commented 11 months ago

Please take a look at the README and tools here: https://github.com/FILCAT/gas-model to help you get started.