-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore: make debugging windowPoSt-failures human readable #10390
Conversation
d0c15ee
to
668b24f
Compare
cmd/lotus-miner/proving.go
Outdated
postParams = append(postParams, postParam) | ||
} | ||
|
||
jr, err := json.Marshal(postParams) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Related Issues
#8561
Proposed Changes
Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps