You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(#18): use ip_echo to get public_ip and shred_version
Fix error re: non-blocking and using from_std on a std TcpListener by setting it non-blocking
In debug mode:
thread 'main' panicked at src/ip_echo.rs:128:32:
Registering a blocking socket with the tokio runtime is unsupported. If you wish to do anyways, please add `--cfg tokio_allow_from_blocking_fd` to your RUSTFLAGS. See github.com/tokio-rs/tokio/issues/7172 for details.
Copy file name to clipboardExpand all lines: README.md
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,7 @@ Use `--config <path>` to specify a custom config file location. Default is `conf
86
86
|`keypair_path`|`keypair.json`| Path to keypair file |
87
87
|`listen_ip`|`0.0.0.0`| Local bind/listen IP |
88
88
|`public_ip`| Auto (STUN) | Public IP address |
89
+
|`enable_stun`|`false`| Use STUN to discover public IP instead of `ip_echo`|
89
90
|`stun_server`|`stun.l.google.com:3478`| STUN server address |
90
91
|`gossip_port`|`8001`| Gossip listen port |
91
92
|`rpc_port`|`8899`| RPC listen port |
@@ -110,7 +111,22 @@ See [Solana Cluster Information](https://docs.anza.xyz/clusters/available) for t
110
111
- TCP/UDP port 8001 (gossip) - if you need to be a publicly reachable gossip entrypoint (optional)
111
112
- TCP port 8899 (RPC) - A publicly reachable RPC endpoint is required for validators to accept snapshots from you
112
113
113
-
**Note**: STUN-based IP detection and UPnP port forwarding are not recommended for production. Use explicit `public_ip` configuration instead, and configure port firewall/forwarding rules manually.
114
+
**Note**: STUN-based IP detection and UPnP port forwarding are not recommended for production.
115
+
Configure port firewall/forwarding rules manually. IP detection will be done via `ip_echo` to each entrypoint by default.
116
+
117
+
IP resolution preference order:
118
+
1.`public_ip` from user config (if provided)
119
+
2. IP echo result (if `public_ip` not provided)
120
+
3. STUN result (only if IP echo fails and STUN is enabled)
121
+
122
+
Shred version resolution:
123
+
1. If both configured and discovered versions exist and differ, it's an error
124
+
2. Use whichever version is available (either configured or discovered)
125
+
3. Return None if neither version is available
126
+
127
+
Note that even when `public_ip` is configured, IP echo is still attempted to get the shred version.
128
+
129
+
Explicit `public_ip` and `shred_version` configuration is always checked against `ip_echo` results.
114
130
115
131
## Known Issues
116
132
- Agave validators refuse to download snapshots from us, even though we are publicly reachable [issue #20](https://github.com/Blockdaemon/agave-snapshot-gossip-client/issues/20)
0 commit comments