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

Update StateMinerInitialPledgeCollateral method to be DDO aware #12369

Open
5 of 11 tasks
LexLuthr opened this issue Aug 9, 2024 · 2 comments · May be fixed by #12384
Open
5 of 11 tasks

Update StateMinerInitialPledgeCollateral method to be DDO aware #12369

LexLuthr opened this issue Aug 9, 2024 · 2 comments · May be fixed by #12384
Labels
kind/bug Kind: Bug

Comments

@LexLuthr
Copy link
Contributor

LexLuthr commented Aug 9, 2024

Checklist

  • This is not a security-related bug/issue. If it is, please follow please follow the security policy.
  • I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.
  • I am running the Latest release, the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
  • I did not make any code changes to lotus.

Lotus component

  • lotus daemon - chain sync
  • lotus fvm/fevm - Lotus FVM and FEVM interactions
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt/WinningPoSt)
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

Lotus Version

NA

Repro Steps

  1. Run '...'
  2. Do '...'
  3. See error '...'
    ...

Describe the Bug

Method StateMinerInitialPledgeCollateral was used to calculate the initial collateral to be send via ProveCommit1 and ProveCommit2 messages for the deal sectors. Post DDO, this calculation seem off and collateral is too low. This results in collateral being deducted from miner balance.

I would request the team to fix the calculation to account for DDO sectors and add additional method to allow calculation for pledge for snap-deals as well. This can either be an additional method or use the same one.

Logging Information

NA
@LexLuthr LexLuthr added the kind/bug Kind: Bug label Aug 9, 2024
@rjan90
Copy link
Contributor

rjan90 commented Aug 13, 2024

We need to understand/investigate if DDO has had any impact on the StateMinerInitialPledgeCollateral method. @rvagg Is this something you could spend some time on when you have availability,

rvagg added a commit that referenced this issue Aug 14, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
rvagg added a commit that referenced this issue Aug 14, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
rvagg added a commit that referenced this issue Aug 14, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
@rvagg
Copy link
Member

rvagg commented Aug 15, 2024

Copying my comment from here in hope of getting some engagement:

As per filecoin-project/builtin-actors#1573 I think we can simplify the API even further; here are the options as I see them:

  • StateMinerInitialPledgeForSector(size, duration, pieceManifests) so you can use it arbitrarily to do the calculation with arbitrary params, or
  • StateMinerInitialPledgeForSector(sectorManifest) so you can load the precommit and figure out size and duration from that, and potentially do some checking on the claims to confirm if they could be successfully activated (provider, term, etc.).
  • StateMinerInitialPledgeForSector(duration, size, verifiedSize) because ultimately those are the only inputs we need, the rest comes from the power actor.

rvagg added a commit that referenced this issue Aug 15, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
rvagg added a commit that referenced this issue Aug 21, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
rvagg added a commit that referenced this issue Sep 5, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
rvagg added a commit that referenced this issue Sep 11, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
rvagg added a commit that referenced this issue Sep 17, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
rvagg added a commit that referenced this issue Sep 19, 2024
Fixes: #12369

deprecate StateMinerInitialPledgeCollateral since it only accounts for deals
in PCI, which aren't present in a DDO world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Kind: Bug
Projects
Status: ⌨️ In Progress
Development

Successfully merging a pull request may close this issue.

3 participants