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: More ux-friendly batching cmds #10837

Merged
merged 3 commits into from
May 8, 2023
Merged

Conversation

rjan90
Copy link
Contributor

@rjan90 rjan90 commented May 5, 2023

Proposed Changes

Add a easier way to publish with lotus-miner sectors batching precommit and lotus-miner sectors batching commit cmd´s. Currently its not clear that you need to add the --publish-now flag to manually send the batch.

Current output with these commands:

lotus-miner sectors batching commit 
7
8
9
10

Proposed change is to prompt the user if they want to publish the sectors/messages now and automatically do it for them:

lotus-miner sectors batching commit
7
8
9
10
Do you want to publish these sectors? (yes/no): yes
Batch 0:
        Message: bafy2bzacedbitvc6hkp463lehfut6di3iqrbwlhn2z7fe2qmprpy7dxapuidg
        Sectors:
                9       OK
Batch 1:
        Message: bafy2bzacec7jpltlldcdv6r5n6vjd2gvmgytgs6ovj7va325ddcp37lptjhem
        Sectors:
                10      OK
Batch 2:
        Message: bafy2bzacedinziwxrb52cfdanop3xcvmk2h6obxqbbemoggvncms5naayznjc
        Sectors:
                8       OK
Batch 3:
        Message: bafy2bzacebpltzu2me2hwn4jtakrjt6viqbcfb5hobz3ljhjqswg77aqqsudc
        Sectors:
                7       OK

Additional Info

A follow-up to this would be to give an estimate to how much gas it would cost.

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

cli: Add more ux-friendly batching cmd
@rjan90 rjan90 requested a review from a team as a code owner May 5, 2023 12:29
rjan90 added 2 commits May 5, 2023 14:59
Add errcheck
Add missing else bracket
@rjan90 rjan90 merged commit 5697645 into master May 8, 2023
@rjan90 rjan90 deleted the feat/ux-friendly-batch-cmd branch May 8, 2023 15:40
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