-
Notifications
You must be signed in to change notification settings - Fork 373
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: use 0.0.0.0 as the default listening address for RPC and gnoweb #1657
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1657 +/- ##
==========================================
+ Coverage 56.17% 56.57% +0.40%
==========================================
Files 439 439
Lines 66242 66618 +376
==========================================
+ Hits 37209 37690 +481
+ Misses 26143 26009 -134
- Partials 2890 2919 +29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Looking good 💯
@@ -88,7 +88,7 @@ type RPCConfig struct { | |||
// DefaultRPCConfig returns a default configuration for the RPC server | |||
func DefaultRPCConfig() *RPCConfig { | |||
return &RPCConfig{ | |||
ListenAddress: "tcp://127.0.0.1:26657", | |||
ListenAddress: "tcp://0.0.0.0:26657", |
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'm 100% Again this. This is WAY TO DANGEROUS for mainnet.
Too many validators on cosmos with having 127.0.0.1
by default expose their validator on 0.0.0.0
, which is a terrible error and it's dangerous.
The result will be way worse if we set it to 0.0.0.0
by default.
After discussing with Guillhem and Albert, I think it's best if we move as follows:
Closing this PR! |
This is how geth handles working with Docker. Also, may need to include |
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.
Resolved during call today.
Decided to create this PR after discussing with @zivkovicmilos.
This PR changes the default listening address for the RPC node and gnoweb to be 0.0.0.0 instead of 127.0.0.1. This entails that when starting up a gno.land node or a gnoweb server, it is accessible from any IP address (on the specified port). This includes local loopback addresses like 127.0.0.1, private network addresses like 192.0.0.X, public addresses if the machine has one and the ports are not firewalled, as well as giving the ability to expose the services in docker without having to juggle flags or configuration files.
This PR attempts to improve the developer experience of using the two services "by default", with the risk of exposing the RPC endpoints out-of-the-box which could be undesirable for some production environments. However, as Milos has stated, and I agree, any validator who wants to launch a production-grade node
... is probably insane.
cc/ @albttx
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description