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

refactor(shed): improve termination-estimate CLI for delegated owner addresses #12569

Merged
merged 5 commits into from
Oct 14, 2024

Conversation

GrapeInTheTree
Copy link
Contributor

@GrapeInTheTree GrapeInTheTree commented Oct 10, 2024

Related Issues

Proposed Changes

AS-IS

The termination-estimate CLI command fails to function correctly under specific conditions:

  • When the owner address is a delegated address (F4 address), the existing code cannot send the Termination State Call.
  • This results in the termination-estimate command not working for miners with delegated owner addresses.

TO-BE

  • Added a check to determine if the owner's address is delegated.
  • If the owner's address is delegated, the code now uses the worker address to make the State Call.
  • This modification allows the termination-estimate command to function correctly for miners with delegated owner addresses.

Additional Info

Case Study of Failure Scenarios

Case 1: Normal Operation

  • Scenario: Miner's owner address is not delegated

  • Miner Address: f01083914

  • Account overview (From filfox)
    image

  • Output of command lotus state active-sectors f01083914 (Last 5 result)

328942: bagboea4b5abcbfmobbo3eohmpe6ttau22doqcilddximppemx763j2rqz6afcnrh
328943: bagboea4b5abcapzk7al4mfvmh2mzpaq3mfexqaeck2ybbeoacljdqbywuli4fgiz
328944: bagboea4b5abcariha7m3boweimn5jr7wnk2ypaygogzmusposu6qlszinltri6ye
328945: bagboea4b5abcakn5qru3yse5lqa2aq4ekzznqjwb6mkqrpapoyjhz72ro4afhsbp
328946: bagboea4b5abcao3nq57q42aplr576no4lg3lp5lslwgs6yfc773oxqpzmikg6qzr
  • Output of command termination-estimate with one of the above result : ./lotus-shed sectors termination-estimate --actor f01083914 328946
./lotus-shed sectors termination-estimate --actor f01083914 328946
Estimated termination penalty: 134421027270868758 attoFIL

Case 1: Malfunction Operation

  • Scenario: Miner's owner address is delegated (f4)

  • Miner Address: f01697248

  • Account overview (From filfox)
    image

  • Output of command lotus state active-sectors f01083914 (Last 5 result)

507031: bagboea4b5abcbgtonlgb5pcnrc6qdy47t6zj2zj6bm6vf45da2mrbmviotdti4sx
507032: bagboea4b5abcansneufjgctgy45ntlrc3ropoxvieh742sdemdqesbb77kt4qd2g
507033: bagboea4b5abcay25dtlgbmnvtqtv6ruf2n2qtbz52nqrt2sqllhowqkidvxt7oiu
507034: bagboea4b5abcakbe3xed3jf6z5rmoqurnqglzvak2ijjbvbffdzcjdtxwd532dql
507035: bagboea4b5abcbawfiaunopdmdd5otfj4wdempvuthz5tnug5fjvfa2yaal7hejr3
  • Output of command termination-estimate with one of the above result : ./lotus-shed sectors termination-estimate --actor f01697248 507035. -> does not print any result.

Checklist

refactor(shed): improve termination-estimate CLI for delegated owner addresses

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

…addresses

- Add logic to check if the miner's owner address is delegated.
- If it is delegated, the command now sends the termination state call using the worker ID.
@rvagg rvagg requested a review from LexLuthr October 10, 2024 01:11
- add detail description about the change
@GrapeInTheTree
Copy link
Contributor Author

@LexLuthr Thanks so much for the review. After I resolve conflict, that is current occurring bc of the CHANGELOG.md, is it ok to get ready to merge?

CHANGELOG.md Outdated Show resolved Hide resolved
@rvagg rvagg enabled auto-merge (squash) October 14, 2024 03:11
@rvagg rvagg merged commit f6d4fc7 into filecoin-project:master Oct 14, 2024
79 of 81 checks passed
@GrapeInTheTree
Copy link
Contributor Author

@rvagg Thanks for your help and review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ☑️ Done (Archive)
Development

Successfully merging this pull request may close these issues.

3 participants