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: boost allocate commands #1957

Merged
merged 5 commits into from
Aug 27, 2024
Merged

Conversation

strahe
Copy link
Contributor

@strahe strahe commented Aug 27, 2024

This PR fixes two issues with boost allocation:

  1. When the number of entries in --piece-file exceeds the default batch size of 500, the datacap amount calculation is incorrect, leading to erroneous messages.

image

  1. When sending multiple messages, the nonce value remains the same because the datastore in SignAndPushToMpool does not persist(is not shared), so only the first message can be successfully sent.

img_v3_02e5_bd602930-159f-4988-b951-2c25fa8b0dch

After:
img_v3_02e5_2efadf19-a862-46c9-94eb-b2f95ca92eeh

Tested in my calibnet environment.

@strahe strahe marked this pull request as ready for review August 27, 2024 06:32
Copy link
Collaborator

@LexLuthr LexLuthr left a comment

Choose a reason for hiding this comment

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

Can you please also fix the datacap calculation for extend-claim command as well?

cmd/lib/common.go Outdated Show resolved Hide resolved
Co-authored-by: LexLuthr <88259624+LexLuthr@users.noreply.github.com>
@strahe
Copy link
Contributor Author

strahe commented Aug 27, 2024

Can you please also fix the datacap calculation for extend-claim command as well?

The logic for calculating datacap in extend-claim should be correct.

// Calculate Datacap for this batch
dcap := big.NewInt(0)
for _, k := range batch {
dc := newClaims[k]
dcap.Add(dcap.Int, dc.Int)
}

@LexLuthr LexLuthr merged commit effb23d into filecoin-project:main Aug 27, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants