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

Output proving check results in order #11495

Open
3 of 9 tasks
shotcollin opened this issue Dec 7, 2023 · 3 comments
Open
3 of 9 tasks

Output proving check results in order #11495

shotcollin opened this issue Dec 7, 2023 · 3 comments
Labels
kind/feature Kind: Feature

Comments

@shotcollin
Copy link
Contributor

Checklist

  • This is not brainstorming ideas. If you have an idea you'd like to discuss, please open a new discussion on the lotus forum and select the category as Ideas.
  • I have a specific, actionable, and well motivated feature request to propose.

Lotus component

  • lotus daemon - chain sync
  • lotus fvm/fevm - Lotus FVM and FEVM interactions
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt/WinningPoSt)
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

What is the motivation behind this feature request? Is your feature request related to a problem? Please describe.

When running lotus-miner proving check the sector results are printed in an apparently random order, or in an order that changes every time. This makes it difficult for a human to e.g. easily compare one set of results to the next without the use of an outside program or other means of sorting.

This probably goes without saying, but such a comparison is often useful e.g. for troubleshooting: say for example I have ten faulty sectors that happen to be in the same deadline but different storage paths. I run lotus-miner proving check <deadline> --only-bad --slow --faulty (the --faulty flag was a great addition, btw) and then make some change affecting one storage path to determine if that fixes the problem that led to the faults. When I run the same command again, the results are in a different order. If there were only a couple sectors it would be easy to visually tell whether the same number of sectors were still faulty after making the change. But it's more difficult to quickly tell the difference between, say, ten and eight results. With more than a few faulty sectors it's even more difficult to easily compare the results when they're in an order that changes every time.

Describe the solution you'd like

Sort the results of lotus-miner proving check in ascending order by sector number.

Describe alternatives you've considered

Using grep to determine if specific sectors are among the results. Using sort (which requires awk or some other way to isolate the sector number, which is in the third column of the results).

Additional context

My examples are fairly trivial and based on something I'm currently working on. I couldn't think of a more compelling motivation, but suffice it to say today isn't the first time I've wished the proving check results were sorted numerically by sector, or at least in the same order every time rather than a different order on each run.

@shotcollin
Copy link
Contributor Author

I realize another reason my example isn't great is that the --storage-id option could be used to isolate results from a particular storage path. In the actual thing I'm working on now that inspired my example, that flag doesn't help. (I didn't have the bandwidth to go into specifics here because I'm still trying to figure out the details of the problem in order to submit a proper issue for it.) Despite my poorly thought out example, I think the feature has real-world applicability.

@beck-8
Copy link
Contributor

beck-8 commented Dec 7, 2023

grep sed awk sort 😂

@shotcollin
Copy link
Contributor Author

Rrriiight, of course it can be accomplished with a bit of additional work. My point was that printing the results in order should be the default behavior, it shouldn't require invoking four (or any other number of) additional commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Kind: Feature
Projects
None yet
Development

No branches or pull requests

3 participants