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

chore: make debugging windowPoSt-failures human readable #10390

Merged

Conversation

beck-8
Copy link
Contributor

@beck-8 beck-8 commented Mar 4, 2023

Related Issues

#8561

Proposed Changes

Additional Info

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

@beck-8 beck-8 requested a review from a team as a code owner March 4, 2023 06:36
@beck-8 beck-8 force-pushed the chore/compute-wdpost-human-readable branch from d0c15ee to 668b24f Compare March 4, 2023 07:00
@rjan90 rjan90 added this to the v1.21.0 milestone Mar 4, 2023
@rjan90 rjan90 linked an issue Mar 4, 2023 that may be closed by this pull request
18 tasks
postParams = append(postParams, postParam)
}

jr, err := json.Marshal(postParams)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would just output in a human readable format. This was outputting json because that was the simplest way to have some useful debug output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I didn't understand what you meant. You mean it's not easy enough to use is it now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is enough, if there is a more elegant way, please suggest it and I will learn.

lotus-miner proving compute window-post 0|grep -v Took|jq .
or
lotus-miner proving compute window-post 0|grep -v Took|jq .[].Partitions[].Skipped

Copy link
Contributor

Choose a reason for hiding this comment

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

It is easy now, but I'm not sure if the output should be json as most commands output data in more human-readable form (and some commands have --json for json output)

e.g.

$ lotus-miner sectors status 1715                                                                                                                                                                                                                                          SectorID:	1715
Status:		Proving
CIDcommD:	baga6ea4seaqao7s73y24kcutaosvacpdjgfe5pw76ooefnyqw4ynr3d2y6x2mpq
[...]

I guess at least this json could be output with json.MarshalIndent.

Note that this is purely for consistency with other commands, there is nothing technically wrong with this approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,I agree with standardization the output.

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.

lotus-miner proving compute window-post shows weird results
3 participants