jito-labs / shredstream-proxy

Client for receiving shreds from Jito network
44 stars 25 forks source link

Ifconfig.me is returning IPv6 which is incompatible #26

Closed SnakeDrak closed 3 months ago

SnakeDrak commented 4 months ago

I am receiving the below error:

thread 'shredstream_proxy-heartbeat_loop_thread' panicked at 'Invalid arguments: status: InvalidArgument, message: "Invalid IP provided", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "server": "jito-block-engine", "x-envoy-upstream-service-time": "1", "content-length": "0", "date": "Sun, 28 Jul 2024 22:57:27 GMT"} }.', src/heartbeat.rs:102:37

Checking the logs, it seems ifconfig.me is returning the IPv6 for some reason:

[2024-07-28T22:57:26Z INFO jito_shredstream_proxy] Retrieved public ip: 2a01:4f8:21......

Trying with the IPv4 interface with CURL it is working.

The workaround is to use the PUBLIC_IP environment variable.

esemeniuc commented 3 months ago

noticed there was an old version set to latest, this should be fixed