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

Add feature to stagger sector prove commit submission #10543

Merged
merged 9 commits into from
Apr 1, 2023

Conversation

shrenujbansal
Copy link
Contributor

Related Issues

#7002

Proposed Changes

Add a config to allow SPs to stagger sector prove commit submissions
This is done because gas estimates for ProveCommits are non deterministic and increasing as a large number of sectors get committed within the same epoch resulting in occasionally failed msgs. Submitting a smaller number of prove commits per epoch would reduce the possibility of failed msgs

Additional Info

Checklist

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

  • Commits have a clear commit message.
  • 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, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@shrenujbansal shrenujbansal requested a review from a team as a code owner March 22, 2023 21:26
api/api_full.go Outdated Show resolved Hide resolved
storage/pipeline/commit_batch.go Outdated Show resolved Hide resolved
Comment on lines 428 to 429
time.Sleep(builtin.EpochDurationSeconds * time.Second)
sectorsProcessed = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd try to avoid the sleep in any way possible.

Polling api.ChainHead every 2-3s, and looking for height change is probably good enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Out of curiosity, why should we try to avoid sleep? And what would be the difference between the 2 approaches? Seems like they'd have the same end result of waiting for around an epoch

node/config/types.go Outdated Show resolved Hide resolved
node/config/types.go Show resolved Hide resolved
Shrenuj Bansal and others added 6 commits March 23, 2023 18:01
api/api_full.go Outdated Show resolved Hide resolved
api/api_full.go Outdated Show resolved Hide resolved
storage/pipeline/commit_batch.go Show resolved Hide resolved
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.

Looks good, would be great to test on a real setup

@shrenujbansal shrenujbansal merged commit 2278a20 into master Apr 1, 2023
@shrenujbansal shrenujbansal deleted the sbansal/max-prove-commits-submit branch April 1, 2023 23:30
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.

None yet

2 participants