Skip to content

Commit

Permalink
chore(drive)!: don't use 0.0.0.0 as default listen IP (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov authored Jul 17, 2024
1 parent 811dfa0 commit 4942906
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
8 changes: 4 additions & 4 deletions packages/rs-drive-abci/.env.local
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ABCI host and port to listen
ABCI_CONSENSUS_BIND_ADDRESS="tcp://0.0.0.0:26658"
GRPC_BIND_ADDRESS="0.0.0.0:26670"
ABCI_CONSENSUS_BIND_ADDRESS="tcp://127.0.0.1:26658"
GRPC_BIND_ADDRESS="127.0.0.1:26670"

# Metrics are disabled when empty. Must be http://0.0.0.0:29090 for example to enable
# Metrics are disabled when empty. Must be http://127.0.0.1:29090 for example to enable
PROMETHEUS_BIND_ADDRESS=

# stderr logging for humans
Expand Down Expand Up @@ -87,4 +87,4 @@ TOKIO_CONSOLE_ADDRESS=127.0.0.1:6669
TOKIO_CONSOLE_RETENTION_SECS=180

GROVEDB_VISUALIZER_ENABLED=false
GROVEDB_VISUALIZER_ADDRESS=0.0.0.0:8083
GROVEDB_VISUALIZER_ADDRESS=127.0.0.1:8083
6 changes: 3 additions & 3 deletions packages/rs-drive-abci/.env.mainnet
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ABCI host and port to listen
ABCI_CONSENSUS_BIND_ADDRESS="tcp://0.0.0.0:26658"
GRPC_BIND_ADDRESS="0.0.0.0:26670"
ABCI_CONSENSUS_BIND_ADDRESS="tcp://127.0.0.1:26658"
GRPC_BIND_ADDRESS="127.0.0.1:26670"

# Metrics are disabled when empty. Must be http://0.0.0.0:29090 for example to enable
# Metrics are disabled when empty. Must be http://127.0.0.1:29090 for example to enable
PROMETHEUS_BIND_ADDRESS=

# stderr logging for humans
Expand Down
6 changes: 3 additions & 3 deletions packages/rs-drive-abci/.env.testnet
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ABCI host and port to listen
ABCI_CONSENSUS_BIND_ADDRESS="tcp://0.0.0.0:26658"
GRPC_BIND_ADDRESS="0.0.0.0:26670"
ABCI_CONSENSUS_BIND_ADDRESS="tcp://127.0.0.1:26658"
GRPC_BIND_ADDRESS="127.0.0.1:26670"

# Metrics are disabled when empty. Must be http://0.0.0.0:29090 for example to enable
# Metrics are disabled when empty. Must be http://127.0.0.1:29090 for example to enable
PROMETHEUS_BIND_ADDRESS=

# stderr logging for humans
Expand Down
7 changes: 3 additions & 4 deletions packages/rs-drive-abci/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,7 @@ impl PlatformConfig {
tokio_console_retention_secs: PlatformConfig::default_tokio_console_retention_secs(),
initial_protocol_version: Self::default_initial_protocol_version(),
prometheus_bind_address: None,
// TODO: This is dangerous. The default value must be 127.0.0.1
grpc_bind_address: "0.0.0.0:26670".to_string(),
grpc_bind_address: "127.0.0.1:26670".to_string(),
}
}

Expand Down Expand Up @@ -695,7 +694,7 @@ impl PlatformConfig {
testing_configs: PlatformTestConfig::default(),
initial_protocol_version: Self::default_initial_protocol_version(),
prometheus_bind_address: None,
grpc_bind_address: "0.0.0.0:26670".to_string(),
grpc_bind_address: "127.0.0.1:26670".to_string(),
tokio_console_enabled: false,
tokio_console_address: PlatformConfig::default_tokio_console_address(),
tokio_console_retention_secs: PlatformConfig::default_tokio_console_retention_secs(),
Expand Down Expand Up @@ -736,7 +735,7 @@ impl PlatformConfig {
testing_configs: PlatformTestConfig::default(),
initial_protocol_version: Self::default_initial_protocol_version(),
prometheus_bind_address: None,
grpc_bind_address: "0.0.0.0:26670".to_string(),
grpc_bind_address: "127.0.0.1:26670".to_string(),
tokio_console_enabled: false,
tokio_console_address: PlatformConfig::default_tokio_console_address(),
tokio_console_retention_secs: PlatformConfig::default_tokio_console_retention_secs(),
Expand Down

0 comments on commit 4942906

Please sign in to comment.