-
Notifications
You must be signed in to change notification settings - Fork 129
Portal Client: Improve node status log #3327
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
124f462
Add log radius to portal node status log.
bhartnett 4332c53
Add log radius to portal node status log.
bhartnett eefa0b6
Add log radius to portal node status log.
bhartnett 3e3541b
Add log radius to portal node status log.
bhartnett be525fd
Remove log radius percentage.
bhartnett 08c00b5
Minor fix.
bhartnett 4fba9ee
Just show the log radius as a number.
bhartnett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
While I agree that showing the rounded down 0% is not very useful (hence also the original float precision TODO above), I do not think that showing the log radius percentage is any more useful to an user at all. Regular users have to understand log distance to know what this means, and even then, expressing it as a percentage is not so intuitive I think.
And for devs, I think the logRadius is handy, but from that you can deduct quite immediately the rest and do not need
logRadiusPercentage
.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.
After thinking about this a bit more I generally agree. Unfortunately, showing the U256 number as a float isn't currently supported by our libraries and I didn't find an easy solution. Even if we get it working, the decimals may be very small because we will eventually end up having very large amount of data in portal network. I think we should show the logRadius like this:
radius / 256
. Perhaps it could be named different to logRadius or perhaps it could go in a separate debug log since its not ideal for end users. My thoughts are that it doesn't matter too much and would be useful to just see the logRadius here.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've now removed the
logRadiusPercentage
field and moved thelogRadius
field to the last position which should be the least visible. Now that I think about it the existingradius
field is not very useful for an end user either (not suggesting we remove it though) and I noticed that in the help when we set the radius using the static option we set it using a log radius value. See from the help:So considering that logRadius is an end user setting on the CLI perhaps its ok to be in the logs.
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.
Yes, I'm perfectly fine with having
logRadius
in there.