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 pledge calc in Commit Submit #138

Open
magik6k opened this issue Aug 9, 2024 · 1 comment
Open

Fix pledge calc in Commit Submit #138

magik6k opened this issue Aug 9, 2024 · 1 comment

Comments

@magik6k
Copy link
Collaborator

magik6k commented Aug 9, 2024

Similar to filecoin-project/lotus#12341, we use StateMinerInitialPledgeCollateral in https://github.com/filecoin-project/curio/blob/main/tasks/seal/task_submit_commit.go#L239; That method isn't DDO-aware

@rvagg
Copy link
Member

rvagg commented Oct 10, 2024

Currently curio contains the custom pledge calculation method similar to lotus-miner (until recently):

func (s *SubmitTask) pledgeForPower(ctx context.Context, addedPower abi.StoragePower) (abi.TokenAmount, error) {

After NV24 we have FIP-0081 activation which ramps up over a year to always include a 30% simple component, so over the course of the next 12 months the actual pledge will increasingly differ from that estimated by the custom pledge calculation included in Curio which likely lead to underestimations (unless network conditions change I suppose).

Lotus' StateMinerInitialPledgeCollateral has been marked as deprecated, and the new StateMinerInitialPledgeForSector API, which just takes duration, sector size and verified size should be used. This is both DDO-friendly and FIP-0081 aware so should be accurate into the future.

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

2 participants