-
Notifications
You must be signed in to change notification settings - Fork 924
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
feat(rpc): add share cmd #2664
feat(rpc): add share cmd #2664
Conversation
1ebf84b
to
7ca2341
Compare
7ca2341
to
74fe698
Compare
Codecov Report
@@ Coverage Diff @@
## rpc_cmds_feature_branch #2664 +/- ##
==========================================================
Coverage ? 49.19%
==========================================================
Files ? 163
Lines ? 11241
Branches ? 0
==========================================================
Hits ? 5530
Misses ? 5230
Partials ? 481 |
cmd/celestia/share.go
Outdated
} | ||
|
||
var getSharesByNamespaceCmd = &cobra.Command{ | ||
Use: "get-shares-by-namespace [dah, namespace]", |
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.
get-by-namespace
cmd/celestia/share.go
Outdated
} | ||
|
||
var sharesAvailableCmd = &cobra.Command{ | ||
Use: "shares-available", |
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.
available
} | ||
|
||
var getEDS = &cobra.Command{ | ||
Use: "get-eds [dah]", |
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.
Ryan be like (dah)
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.
да
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 agree with Hlib's review, will approve when those changes are made :) Wish there was an easy way to write unit tests for these
}, | ||
} | ||
|
||
var probabilityOfAvailabilityCmd = &cobra.Command{ |
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 know its not part of this PR but wanted to maybe start a discussion: This endpoint is dumb and should probably be removed entirely from the node, no?
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's a feature request we had a while ago that we implemented quickly in the API. We still need it in some form or another. It should be merged with ShareAvailable
call so that we don't just return binary answers, but a percentage of guaranteed local availability.
I suggest keeping the current cmd and merging it once we merge SharesAvailable API + shortening the current cmd name.
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 agree, we can merge it as it is and then remove it when it becomes redundant.
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.
Or I can return the percentage w SharesAvaliable(so available
cmd will make 2 rpc call 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.
Wish there was an easy way to write unit tests for these
Tested all cmds on arabica10
cmd/celestia/share.go
Outdated
} | ||
|
||
var probabilityOfAvailabilityCmd = &cobra.Command{ | ||
Use: "probability-of-availability", |
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.
We can call it availability
. WDYT?
0794b5d
into
celestiaorg:rpc_cmds_feature_branch
Overview
Checklist