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

Set pre-commit deposit independent of sector content - first draft #307

Merged
merged 3 commits into from
May 12, 2022

Conversation

anorth
Copy link
Member

@anorth anorth commented Feb 20, 2022

The sector pre-commit deposit (PCD) is currently set equal to an estimate of the storage pledge for a sector.
The storage pledge is a 20-day projection of the expected reward to be earned by the sector.
This reward depends on power, which depends on the presence of verified deals hosted by the sector.
This dependency means the miner actor must consult the market actor, which intermediates verified data cap,
to determine the pre-commit deposit (and then again to compute initial pledge when the sector is proven).

This proposal sets the pre-commit deposit to a value independent of sector content:
the estimated storage pledge of a sector with space-time that is exactly filled by verified deals.

Discussion at #290

FYI @zixuanzh @nicola

@anorth anorth changed the title First draft of FIP setting pre-commit deposit independent of sector content Sett pre-commit deposit independent of sector content - first draft Feb 20, 2022
@anorth anorth changed the title Sett pre-commit deposit independent of sector content - first draft Set pre-commit deposit independent of sector content - first draft Feb 20, 2022
@zixuanzh
Copy link
Contributor

Thanks @anorth this proposal generally looks good and considerations have been described in discussions. We might want to double-check how PCD is used/refunded when a sector is ProveCommitted during implementation in case of bugs.

@jennijuju
Copy link
Member

Notes from lotus team

from implementation consideration:

@anorth anorth force-pushed the anorth/precommitdeposit branch from 4744751 to 27fd80c Compare March 10, 2022 03:32
@anorth
Copy link
Member Author

anorth commented Mar 10, 2022

Updated:

  • Changed SectorPreCommitOnChainInfo schema to record CommD, matching the schema eventually required when SPs specify their own CommD rather than compute from a privileged market actor
  • Restore the deal validity checks during pre-commit
  • Removed now-redundant loading of deal info for CommD calculation at ProveCommit, resulting in net gas saving
  • Noted the restoration of security buffers in the PCD calculation in light of SnapDeals

@nicola
Copy link
Contributor

nicola commented Mar 15, 2022

Proposal looks good to me.

Increasing PCD shouldn't be an issue, since the capital is locked only for ~140 blocks.

@@ -0,0 +1,166 @@
---
fip: <to be assigned>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIP0034! I'll merge into repo, and update number for you, @anorth

@kaitlin-beegle kaitlin-beegle merged commit 6142229 into master May 12, 2022
@kaitlin-beegle kaitlin-beegle deleted the anorth/precommitdeposit branch May 12, 2022 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants