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

[Fix] Change default jsonrpc binding to all interfaces (0.0.0.0) #435

Merged
merged 10 commits into from
Mar 8, 2022

Conversation

ZeljkoBenovic
Copy link
Contributor

@ZeljkoBenovic ZeljkoBenovic commented Mar 3, 2022

Description

This PR changes the default JSON PRC and Prometheus IP binding to all interfaces ( 0.0.0.0 ) instead of localhost/loopback ( 127.0.0.1 )
This makes much more sense when starting the chain with default settings as this APIs will usually be queried from remote hosts.

Fixed server command usage defaults. For example:
--max-outbound-peers int the client's max number of outbound peers allowed. Default: 8 (default -1)
now displays:
--max-outbound-peers int the client's max number of outbound peers allowed. (default 8)

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Started the server with --jsonrpc :10001 and without --jsonrpc flag.
Started the server with --prometheus :5001 flag.
The JSON RPC API always binds to all interfaces and can be queried from remote host
The Prometheus API binds to all interfaces on defined port

Documentation update

Doc PR#70

Additional comments

Fixes EDGE-421

@zivkovicmilos zivkovicmilos added don't merge Please don't merge this functionality temporarily feature New update to Polygon Edge labels Mar 3, 2022
@zivkovicmilos
Copy link
Contributor

@ZeljkoBenovic

Adding a don't merge label here as it's directly conflicting with PR #410

Copy link
Contributor

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Please don't merge this before #410

@zivkovicmilos zivkovicmilos linked an issue Mar 3, 2022 that may be closed by this pull request
@ZeljkoBenovic ZeljkoBenovic self-assigned this Mar 3, 2022
@zivkovicmilos zivkovicmilos added bug fix Functionality that fixes a bug and removed feature New update to Polygon Edge labels Mar 3, 2022
@zivkovicmilos zivkovicmilos removed the don't merge Please don't merge this functionality temporarily label Mar 4, 2022
@zivkovicmilos
Copy link
Contributor

@ZeljkoBenovic
Removed the don't merge label, you can pull the latest changes from the develop branch 👍

@ZeljkoBenovic
Copy link
Contributor Author

Merged the Cobra CLI changes, changed default ip bindings and fixed few minor things with server cli command help output

Copy link
Contributor

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Looks great 💯

I've left some really minor comments 👍

* create struct for IPBindings
* set additional param in ResolveAddr for default ip binding
Copy link
Contributor

@Aleksao998 Aleksao998 left a comment

Choose a reason for hiding this comment

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

LGTM!

@ZeljkoBenovic ZeljkoBenovic merged commit 61fa938 into develop Mar 8, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2022
@zivkovicmilos zivkovicmilos deleted the fix/json_rpc_bindings branch March 10, 2022 09:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix Functionality that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gRPC and JSON RPC APIs improperly bound
4 participants