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: cli: Make compact partitions cmd better #9070

Merged
merged 1 commit into from
May 29, 2023
Merged

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented Jul 20, 2022

Related Issues

More work towards #9041

Proposed Changes

Implements 2 improvements to the compact partitions command:

  • Auto split into smaller messages as needed, if a single message wouldn't fit in a block
  • Simulate if really-do-it isn't passed, reporting on the gas costs

Additional Info

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 20, 2022 18:19
@arajasek
Copy link
Contributor Author

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.

@jennijuju Unsure whether or not changes are needed here, thoughts?

@rjan90
Copy link
Contributor

rjan90 commented Aug 18, 2022

Just tested this, by trying to compact a single partition deadline, and the simulation of the message looks nice:

lotus-miner sectors compact-partitions --deadline 0 --partitions 0
compacting 1 paritions
total of 1 CompactPartitions msgs would be sent
msg 0 would cost up to 3175283136060

Two small UX-improvements could have been to print the potential gas cost in a more understandable format, and print msg 1 instead of msg 0 😄

@arajasek arajasek force-pushed the asr/rpc-errors branch 7 times, most recently from 8022543 to 0626286 Compare September 22, 2022 17:58
Base automatically changed from asr/rpc-errors to release/v1.18.0 September 23, 2022 16:57
Copy link
Contributor

@ZenGround0 ZenGround0 left a comment

Choose a reason for hiding this comment

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

I don't see any reason not to ship this

@arajasek arajasek changed the base branch from release/v1.18.0 to master May 29, 2023 17:06
@arajasek arajasek enabled auto-merge May 29, 2023 17:06
@arajasek arajasek merged commit 84bba33 into master May 29, 2023
88 of 93 checks passed
@arajasek arajasek deleted the asr/batch-clever branch May 29, 2023 17:19
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

3 participants