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

cmd | node: Refactor core flags #910

Merged
merged 6 commits into from
Jul 18, 2022
Merged

Conversation

renaynay
Copy link
Member

Description

This PR consolidates flags related to adding a core endpoint. The reasoning behind this is to prevent users from having to pass too many flags once #571 is resolved (since the core accessor will now need both a gRPC and RPC endpoint for the celestia-core connection).

New flags

In the case that the default ports are exposed (grpc:9090, rpc:26657) on the celestia-core endpoint:

celestia <node_type> start --core <ip addr of core endpoint>

In the case that custom ports are exposed on the celestia-core endpoint:

celestia <node_type> start --core <ip addr of core endpoint> --core.grpc 9090 --core.rpc 26657

If --core.grpc || --core.rpc are not provided, we assume the defaults and attempt to connect.

@renaynay renaynay added area:config CLI and config area:node Node kind:break! Attached to breaking PRs labels Jul 15, 2022
@renaynay renaynay self-assigned this Jul 15, 2022
@renaynay renaynay requested a review from YazzyYaz July 15, 2022 12:13
cmd/flags_core.go Outdated Show resolved Hide resolved
node/config_opts.go Outdated Show resolved Hide resolved
cmd/flags_core.go Show resolved Hide resolved
core/client.go Outdated Show resolved Hide resolved
@renaynay
Copy link
Member Author

from @YazzyYaz

Immediate thoughts are, it should be explicit:
so --core should mean it’s for the IP address so something like --core.ip
or .grpc and .rpc I’d rather have something like --core.grpc.port and --core.rpc.port since it relates to ports.
my 2 cents (edited)

@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2022

Codecov Report

Merging #910 (8ccb595) into main (e0be707) will increase coverage by 0.41%.
The diff coverage is 56.25%.

@@            Coverage Diff             @@
##             main     #910      +/-   ##
==========================================
+ Coverage   58.15%   58.57%   +0.41%     
==========================================
  Files         125      128       +3     
  Lines        7415     7618     +203     
==========================================
+ Hits         4312     4462     +150     
- Misses       2645     2689      +44     
- Partials      458      467       +9     
Impacted Files Coverage Δ
cmd/flags_core.go 43.10% <33.33%> (-2.55%) ⬇️
node/core/core.go 81.25% <50.00%> (ø)
core/testing.go 78.57% <60.00%> (-4.58%) ⬇️
node/config_opts.go 40.00% <75.00%> (+4.86%) ⬆️
core/client.go 100.00% <100.00%> (ø)
node/components.go 90.36% <100.00%> (+1.17%) ⬆️
node/state/core.go 100.00% <100.00%> (ø)
node/state/state.go 100.00% <100.00%> (ø)
node/testing.go 100.00% <100.00%> (ø)
service/state/core_access.go 21.34% <100.00%> (+1.80%) ⬆️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0be707...8ccb595. Read the comment docs.

@renaynay
Copy link
Member Author

@YazzyYaz 5192563

Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

LGTM, only nits

cmd/flags_core.go Outdated Show resolved Hide resolved
node/config_opts.go Outdated Show resolved Hide resolved
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

utACK

cmd/flags_core.go Show resolved Hide resolved
@renaynay renaynay merged commit 7414cec into celestiaorg:main Jul 18, 2022
@renaynay renaynay deleted the core-flags branch July 18, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:config CLI and config area:node Node kind:break! Attached to breaking PRs
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants