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

Remove vesting from PreCommitSector and ConfirmSectorProofsValid #18

Closed
anorth opened this issue Oct 20, 2020 · 4 comments
Closed

Remove vesting from PreCommitSector and ConfirmSectorProofsValid #18

anorth opened this issue Oct 20, 2020 · 4 comments

Comments

@anorth
Copy link
Member

anorth commented Oct 20, 2020

Background
Vesting is processed via State.UnlockVestedFunds, which is called from PreCommitSector, ConfirmSectorProofsValid, WithDrawBalance and the deadline cron. The original motivation for computing vesting on sector commitment is so that any vested funds could be used for pre-commit deposit or pledge.

The vesting table is quantized to 12-hr increments. Since vesting is processed in the deadline cron every 30 minutes, the calls during sector commitment almost always achieve nothing. The most it could achieve is to accelerate a release by 30 minutes.

Processing reward vesting is quite expensive as it loads and stores a sizeable array for the vesting table. For high-scale miners, committing many sectors per deadline (or even per-epoch), this represents a sizeable portion of total gas cost and chain bandwidth consumption.

Proposal
Remove vesting from PreCommitSector and ConfirmSectorProofsValid, leaving it to the deadline cron. If necessary, the miner's owner can trigger vesting via WithdrawBalance (possibly with an argument of zero).

This will reduce the gas consumption of these methods substantially, freeing up chain bandwidth for other messages, reducing gas costs, and/or improving validation speed.

First proposed in filecoin-project/specs-actors#1258

@momack2
Copy link
Contributor

momack2 commented Oct 22, 2020

More chain throughput (via lower gas usage) sounds great! The slight delay in miner rewards (which can be solved by manually triggering WithdrawBalance seems like a reasonable cost for such an improvement. 👍

@anorth
Copy link
Member Author

anorth commented Oct 23, 2020

Closed by #19

@anorth anorth closed this as completed Oct 23, 2020
@momack2 momack2 reopened this Oct 23, 2020
@momack2
Copy link
Contributor

momack2 commented Oct 23, 2020

Keeping this open as a place for discussion on FIP-0005

@nicola
Copy link
Contributor

nicola commented Nov 11, 2020

I think this can be closed now that it's accepted, correct? https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0005.md

@nicola nicola closed this as completed Nov 16, 2020
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

No branches or pull requests

3 participants