-
Notifications
You must be signed in to change notification settings - Fork 79
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
Optimize reschedule_recovered #545
Comments
Note, the comment: builtin-actors/actors/miner/src/expiration_queue.rs Lines 368 to 370 in ac3d3e8
Should say 40, not 14, because the fault max age is 40 days (due to https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0026.md). That means we:
Which isn't great. What we should do is:
|
An additional optimization: Compact these queues. Currently, we associate quantized epochs with values (i.e., epochs rounded up to the next deadline). Instead, we index by |
Here is the patch for this case basically following up the comments except the grouping and additional comments, and test passed with "cargo test reschedule_recover_restores_all_sector_stats -- --nocapture", Pls. help review it, |
builtin-actors/actors/miner/src/expiration_queue.rs Lines 394 to 396 in ac3d3e8 |
@Kubuxu did you do something here? Could you link it to this issue? Shall we close it? |
close by the #677 |
Optimize the following code block so that we dont have to loop through all sectors every time -> which is expensive on gas
builtin-actors/actors/miner/src/expiration_queue.rs
Lines 374 to 423 in ac3d3e8
The text was updated successfully, but these errors were encountered: