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

FIP-0084: Drop ProveCommitSectors message after ProveCommitSectors3 inclusion #820

Merged
merged 10 commits into from
Jan 4, 2024

Conversation

jennijuju
Copy link
Member

@jennijuju jennijuju commented Sep 4, 2023

I wanna start this FIP early so to suggest the implementation clients to move away from ProveCommitSectors sooner rather than later - so that we can resolve the imbalanced sector activation charges and move more jobs outside of the network cron.

This will addressed the bug where aggregation is more expensive than single prove commit post FVM and FIP-45 - this is a bug requested to be fixed by a handful SPs #689

This FIP is dependent on the ProveCommitSectors2 thats being introduced in the new direct data onboarding pipeline.

@jennijuju
Copy link
Member Author

Will open for review when DDO fip is merged

@jennijuju jennijuju marked this pull request as ready for review November 23, 2023 19:00
@jennijuju
Copy link
Member Author

@filecoin-project/fips-editors this is ready for review.

@Stebalien @magik6k @rjan90 @snadrus @zhiqiangxu - will appreciate your peer review as well.

Copy link
Contributor

@rjan90 rjan90 left a comment

Choose a reason for hiding this comment

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

Added comments and suggestions primarily to enhance readability, correct spelling errors, and remove unnecessary standard comments.

FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved

Test cases for an implementation are mandatory for FIPs that are affecting consensus changes. Other FIPs can choose to include links to test cases if applicable.

Calling `ProveCommitSector` will fail with ***USR_UNHANDLED_MESSAGE.***
Copy link
Collaborator

Choose a reason for hiding this comment

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

Small nit, but should this be moved to the specification section?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator

@kaitlin-beegle kaitlin-beegle left a comment

Choose a reason for hiding this comment

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

Editorial Review - looks good. Clearly written and concisely scoped.

fip: "<to be assigned>" <!--keep the qoutes around the fip number, i.e: `fip: "0001"`-->
title: Deprecate `ProveCommitSectors` to Avoid Single PoRep Proof Verification in Cron
author: Jennifer Wang (@jennijuju)
discussions-to: [<URL>](https://github.com/filecoin-project/FIPs/discussions/689)
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this is an appropriate discussion topic to use here. It's a good discussion about a problem, but not particularly oriented around this solution. The context of FIP-0076 wasn't available when that discussion was made. Could you please open a new one and summarise this proposal there?

Copy link
Member Author

Choose a reason for hiding this comment

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

FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved

## Incentive Considerations

This FIP will enforce storage activation fees to be paid by the callers rather than having an imbalanced network subsidy. This means storage providers who only onboard sectors via `ProveCommitSector` will start to pay for sector proof validation and sector/deal activation, which is a gas cost increase from ~71M to ~196M based on the current implementation. However, the activation cost is expected to be lower with the direct data onboarding flow via the `ProveCommitSectors2` method, and storage providers and their data clients may choose to opt-out of f05 deal activation, which would result in significantly less gas cost.
Copy link
Member

Choose a reason for hiding this comment

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

I think more could be said here (or in motivation) about how the subsidy incentivises inefficient use of the resources of chain validation by discouraging aggregation of proofs.

Copy link
Member Author

Choose a reason for hiding this comment

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

(included in the motivation section

FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved

Currently, `ProveCommitSector` accepts a single PoRep proof for an individual sector, validates the proof, and activates the sector along with the deals inside it via a cron call to the power actor. In contrast, when submitting an aggregated PoRep with `ProveCommitAggregate`, all proof validation and sector activation are executed synchronously and the costs are billed to the caller. This creates an imbalance in the sector activation gas subsidy available to different onboarding methods, and also adds unnecessary work to unpaid network cron jobs.

To address this issue, we propose to deprecate the `ProveCommitSector` method after the network upgrade that includes the `ProveCommitSectors2` method, which is planned as part of [FIP-0076 - Direct Data Onboarding](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0076.md) and is expected to be in scope for upcoming network upgrades.
Copy link
Member

Choose a reason for hiding this comment

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

I agree that the planning of upgrades isn't within scope, but I'd still like us to clearly state that this comes strictly after FIP-0076, i.e. not at the same time. This is important as you yourself point out in the discussion and as explicitly stated further down. Change here could be as simple as:

FIP-0076 provides an alternative, synchronous activation path for non-aggregated proofs. This proposal subsequently removes the ProveCommitSector method and thus the imbalance.

@@ -0,0 +1,79 @@
---

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved

Test cases for an implementation are mandatory for FIPs that are affecting consensus changes. Other FIPs can choose to include links to test cases if applicable.

Calling `ProveCommitSector` will fail with ***USR_UNHANDLED_MESSAGE.***
Copy link
Member

Choose a reason for hiding this comment

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

FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
Thus, we would like to resolve the imbalance in sector activation and make proof aggregation financially sensible again.

This change also removes unnecessary yet expensive sector and deal activation work from the network cron, which prevents the network from potential cron blowup in the long term.

Copy link
Member

Choose a reason for hiding this comment

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

I'd also like to note that this will let us get rid of the FVM syscall that lets actors explicitly charge gas. We currently use this to charge for the deferred proof verification.

Copy link
Member Author

Choose a reason for hiding this comment

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

which sys call is this?

Copy link
Member Author

Choose a reason for hiding this comment

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

kernel GasOps?

@jennijuju jennijuju changed the title Deprecating provecommitsectors message after ProveCommitSectors2 inclusion Drop provecommitsectors message after ProveCommitSectors2 inclusion Jan 3, 2024
Copy link
Member

@anorth anorth left a comment

Choose a reason for hiding this comment

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

Please take FIP-0084 and update the README to link here. I will approve this after that, and nits.


## Simple Summary

Remove *`ProveCommitSector` (method 7)* in favor of `ProveCommitSectors2` and `ProveCommitAggregate`. This change ensures that single PoRep validations and single sector activations are executed synchronously and billed to the caller, instead of being executed asynchronously via a cron call to the actor.
Copy link
Member

Choose a reason for hiding this comment

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

The new method name changed to ProveCommitSectors3 in 886. Perhaps include the method numbers (#892).

FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
FIPS/fip-drop-provecommit1.md Outdated Show resolved Hide resolved
jennijuju and others added 8 commits January 5, 2024 05:16
Co-authored-by: Phi-rjan <orjan.roren@gmail.com>
Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com>
Co-authored-by: Alex North <445306+anorth@users.noreply.github.com>
Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com>
Co-authored-by: Alex North <445306+anorth@users.noreply.github.com>
@anorth anorth changed the title Drop provecommitsectors message after ProveCommitSectors2 inclusion FIP-0084: Drop ProveCommitSectors message after ProveCommitSectors2 inclusion Jan 4, 2024
@anorth anorth merged commit e22c254 into master Jan 4, 2024
1 check passed
@anorth anorth deleted the jen/droppc branch January 4, 2024 21:43
@jennijuju jennijuju changed the title FIP-0084: Drop ProveCommitSectors message after ProveCommitSectors2 inclusion FIP-0084: Drop ProveCommitSectors message after ProveCommitSectors3 inclusion Jan 4, 2024
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