oasisprotocol / oasisprotocol/cli
Fix oasis network show [entity id hash]
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 80
- Forks
- 23
- Avg merge
- 9h 43m
- Merged PRs (30d)
- 3
Description
For additional context see https://github.com/oasisprotocol/cli/pull/706#discussion_r3544676120.
Problems
- Status / pretty print should never return eagerly as they are used for debugging.
- Misleading output as error can also happen because of other reasons: https://github.com/oasisprotocol/cli/blob/7e8b7e032cecb47a2f3f00b0b23cae0b92a40dd3/cmd/network/show.go#L98
registry.Backend.GetNodereturnregistry.NoSuchErroras soon as the node descriptor has expired, however descriptor actually stays, just likeregistry.Backend.GetNodeStatusstill returns until debonding period expires.
Solution
Probably best to use switch for both statuses and print them independently (currently we mix them).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cmd/network/show.go at the referenced status and pretty-print handling, then read the registry.Backend.GetNode and GetNodeStatus behavior. Exercise the network show entry point with an expired node descriptor and other lookup errors; done means both statuses are reported independently without misleading early returns or error output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100