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

fix(miner): fix new bug in StateMinerPreCommitDepositForPower calculation #12595

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Oct 14, 2024

Regression introduced by refactoring in #12384 where the NV16 special case was missed and the full sector weight calculation was applied. The lack of this special case essentially reverts FIP-0034 for this API, but not for actors which would have a different PCD calculation.

--

Not doing a CHANGELOG for this one because #12384 hasn't got to a final release yet.

Also haven't included a test here, even though I'd love to, because I don't have time to figure out how on earth to pull that off. But thanks to @LesnyRumcajs for pointing out the bug due to the Forest compatibility tests where this request:

curl -s -X POST -H "Content-Type: application/json" --data '{"method":"Filecoin.StateMinerPreCommitDepositForPower","params":["f0138097",{"DealIDs":null,"Expiration":3055733,"SealProof":8,"SealRandEpoch":2004533,"SealedCID":{"/":"bagboea4b5abcbp5d7ycbulzvf6ic73ab2zkeebeiasiyndbvpcl5zeqkk776uclm"},"SectorNumber":1990,"UnsealedCid":null},[{"/":"bafy2bzacea6eqwwy7ykvdodl6chmiiytsce7iku7jm6vw4hcy4m66tepfzc3q"},{"/":"bafy2bzacebvrs5yivvqjcbhiqnvnvrfqcend3trk4dzuiqnktfcpgybh7rrpo"},{"/":"bafy2bzacec46lz5fbbzcjdqjnjvecu64564s2k5kyxk5nh7ogu7fuglpkkl5i"}]],"id":1,"jsonrpc":"2.0"}' http://127.0.0.1:1235/rpc/v1 | jq .result

Was resulting in a value of: "26167664014885767245" for 1.30.0-rc when it should be "261676640148857672456" (1.29.2 and Forest).

…tion

Regression introduced by refactoring in
#12384 where the NV16 special
case was missed and the full sector weight calculation was applied. The lack of
this special case essentially reverts FIP-0034 for this API, but not for actors
which would have a different PCD calculation.
@rvagg rvagg added the skip/changelog This change does not require CHANGELOG.md update label Oct 14, 2024
@rvagg rvagg requested a review from ZenGround0 October 14, 2024 10:07
@rjan90 rjan90 merged commit d4b8af9 into master Oct 14, 2024
85 of 86 checks passed
@rjan90 rjan90 deleted the rvagg/StateMinerPreCommitDepositForPower-fix branch October 14, 2024 16:43
rjan90 pushed a commit that referenced this pull request Oct 14, 2024
…tion (#12595)

Regression introduced by refactoring in
#12384 where the NV16 special
case was missed and the full sector weight calculation was applied. The lack of
this special case essentially reverts FIP-0034 for this API, but not for actors
which would have a different PCD calculation.
rjan90 pushed a commit that referenced this pull request Oct 14, 2024
…tion (#12595)

Regression introduced by refactoring in
#12384 where the NV16 special
case was missed and the full sector weight calculation was applied. The lack of
this special case essentially reverts FIP-0034 for this API, but not for actors
which would have a different PCD calculation.
rjan90 pushed a commit that referenced this pull request Oct 14, 2024
…tion (#12595)

Regression introduced by refactoring in
#12384 where the NV16 special
case was missed and the full sector weight calculation was applied. The lack of
this special case essentially reverts FIP-0034 for this API, but not for actors
which would have a different PCD calculation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does not require CHANGELOG.md update
Projects
Status: ☑️ Done (Archive)
Development

Successfully merging this pull request may close these issues.

4 participants