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

feat: recovery: Config for maximum partition count per message #8986

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented Jul 7, 2022

Related Issues

It is possible that users might have DeclareFaultsRecovered Messages with gasused approaching the block gas limit. See msg bafy2bzacebgkmblyhe5jptkdyiaq5euk6o4w5pdgdhxfeegt4thyp4jf2svea.

Proposed Changes

#8982 , but for DeclareFaultsRecovered

// Maximum number of partitions to declare in a single DeclareFaultsRecovered message. 0 = no limit.

// In some cases when submitting DeclareFaultsRecovered messages,
// there may be too many recoveries to fit in a BlockGasLimit.
// In those cases it may be necessary to set this value to something low (eg 1);
// Note that setting this value lower may result in less efficient gas use - more messages will be sent than needed,
// resulting in more total gas use (but each message will have lower gas limit)

We should probably just recommend users set the value to 1 if they run into this issue.

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@arajasek arajasek requested a review from a team as a code owner July 7, 2022 15:17
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Would be good to somehow test this

// respect user config if set
if s.maxPartitionsPerRecoveryMessage > 0 && len(currRecoveries) >= s.maxPartitionsPerRecoveryMessage {
currRecoveries = []miner.RecoveryDeclaration{}
batchedRecoveryDecls = append(batchedRecoveryDecls, currRecoveries)
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm reading this correctly, it looks like we'll include the first batch twice, and won't include the last one

@arajasek arajasek force-pushed the asr/feat/dfr-maxpart-config branch from 14d7d04 to 628e1a8 Compare July 7, 2022 15:51
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #8986 (628e1a8) into master (b499ef0) will increase coverage by 5.53%.
The diff coverage is 58.33%.

❗ Current head 628e1a8 differs from pull request most recent head 770c32c. Consider uploading reports for the commit 770c32c to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8986      +/-   ##
==========================================
+ Coverage   35.14%   40.67%   +5.53%     
==========================================
  Files         703      708       +5     
  Lines       78488    78745     +257     
==========================================
+ Hits        27581    32027    +4446     
+ Misses      45900    41256    -4644     
- Partials     5007     5462     +455     
Impacted Files Coverage Δ
storage/paths/gomock_reflect_3544667724/prog.go 0.00% <0.00%> (ø)
storage/wdpost/wdpost_run_faults.go 47.58% <79.24%> (-20.73%) ⬇️
storage/wdpost/wdpost_run.go 71.46% <100.00%> (-0.53%) ⬇️
storage/wdpost/wdpost_sched.go 85.71% <100.00%> (+3.98%) ⬆️
chain/events/state/fastapi.go 75.00% <0.00%> (-25.00%) ⬇️
storage/sealer/sched_post.go 83.20% <0.00%> (-0.80%) ⬇️
miner/miner.go 58.36% <0.00%> (ø)
chain/stmgr/actors.go 46.98% <0.00%> (ø)
... and 153 more

@arajasek arajasek force-pushed the asr/feat/dfr-maxpart-config branch from 628e1a8 to 770c32c Compare July 7, 2022 16:46
@arajasek arajasek merged commit fb0fe6b into master Jul 7, 2022
@arajasek arajasek deleted the asr/feat/dfr-maxpart-config branch July 7, 2022 17:37
@jennijuju jennijuju mentioned this pull request Jul 15, 2022
15 tasks
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

Successfully merging this pull request may close these issues.

2 participants