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: Lotus cli: actor: Support move partition command to move partitions' deadline #11290

Closed
wants to merge 3 commits into from

Conversation

mb1896
Copy link
Contributor

@mb1896 mb1896 commented Sep 22, 2023

Related Issues

#11272

Proposed Changes

Add move-partition subcommand to lotus-miner actor command.

Additional Info

Still waiting for corresponding actor changes to merge https://github.com/filecoin-project/builtin-actors/pull/1326/files

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
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

Example usage

Before

$ ./lotus-miner proving deadlines
Miner: t01000
deadline  partitions  sectors (faults)  proven partitions
0         0           0 (0)             0
1         0           0 (0)             0
2         0           0 (0)             0
3         0           0 (0)             0
4         0           0 (0)             0
5         0           0 (0)             0
6         0           0 (0)             0
7         0           0 (0)             0
8         0           0 (0)             0
9         0           0 (0)             0
10        0           0 (0)             0
11        0           0 (0)             0
12        0           0 (0)             0
13        0           0 (0)             0
14        0           0 (0)             0  (current)
15        0           0 (0)             0
16        0           0 (0)             0
17        0           0 (0)             0
18        0           0 (0)             0
19        0           0 (0)             0
20        1           2 (0)             0
21        0           0 (0)             0
22        0           0 (0)             0
23        0           0 (0)             0
24        0           0 (0)             0
25        0           0 (0)             0
26        0           0 (0)             0
27        0           0 (0)             0
28        0           0 (0)             0
29        0           0 (0)             0
30        0           0 (0)             0
31        0           0 (0)             0
32        0           0 (0)             0
33        0           0 (0)             0
34        0           0 (0)             0
35        0           0 (0)             0
36        0           0 (0)             0
37        0           0 (0)             0
38        0           0 (0)             0
39        0           0 (0)             0
40        0           0 (0)             0
41        0           0 (0)             0
42        0           0 (0)             0
43        0           0 (0)             0
44        0           0 (0)             0
45        0           0 (0)             0
46        0           0 (0)             0
47        0           0 (0)             0

Then use

$ ./lotus-miner actor move-partitions --partition-indices 0 --orig-deadline 20 --dest-deadline 17
Miner: t01000
Moving 1 paritions
MovePartitions Message CID: bafy2bzaceaxz7ujzanqq5k5yhvszzgqyydxhylhfy7vrcywv4rbi76j2zicfk
Waiting for block confirmation...
Move partition confirmed

Check deadline has been moved

$ ./lotus-miner proving deadlines                                                                
Miner: t01000
deadline  partitions  sectors (faults)  proven partitions
0         0           0 (0)             0
1         0           0 (0)             0
2         0           0 (0)             0
3         0           0 (0)             0
4         0           0 (0)             0
5         0           0 (0)             0
6         0           0 (0)             0
7         0           0 (0)             0
8         0           0 (0)             0
9         0           0 (0)             0
10        0           0 (0)             0
11        0           0 (0)             0
12        0           0 (0)             0
13        0           0 (0)             0
14        0           0 (0)             0
15        0           0 (0)             0  (current)
16        0           0 (0)             0
17        1           2 (0)             0
18        0           0 (0)             0
19        0           0 (0)             0
20        0           0 (0)             0
21        0           0 (0)             0
22        0           0 (0)             0
23        0           0 (0)             0
24        0           0 (0)             0
25        0           0 (0)             0
26        0           0 (0)             0
27        0           0 (0)             0
28        0           0 (0)             0
29        0           0 (0)             0
30        0           0 (0)             0
31        0           0 (0)             0
32        0           0 (0)             0
33        0           0 (0)             0
34        0           0 (0)             0
35        0           0 (0)             0
36        0           0 (0)             0
37        0           0 (0)             0
38        0           0 (0)             0
39        0           0 (0)             0
40        0           0 (0)             0
41        0           0 (0)             0
42        0           0 (0)             0
43        0           0 (0)             0
44        0           0 (0)             0
45        0           0 (0)             0
46        0           0 (0)             0
47        0           0 (0)             0

@mb1896 mb1896 requested a review from a team as a code owner September 22, 2023 17:59
@mb1896 mb1896 requested a review from arajasek September 22, 2023 18:05
@jennijuju
Copy link
Member

This PR needs to be targeted at feat/nv21 branch rather than master.

Can we add a test case session in PR description and work with @filecoin-project/lotus-tse to get both happy cases and edge cases tested in devnet, things I would be curious about

  • move partitions that have faulty sectors
  • Move partitions to an already full partition
  • Move partitions when it’s in deadline window
  • Move partitions when the deadline is coming up in the next window
  • Move partitions when the deadline was just passed
  • move partition to a deadline that’s in the past
  • Move partitions to a deadline that’s beyond current

I might miss some - please feel free to add.

@mb1896 mb1896 closed this Sep 28, 2023
@rjan90 rjan90 deleted the 0920_move_partition branch January 31, 2025 08:24
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