hoprnet / RPCh

RPCh is the only private RPC provider. Uses HOPR under the hood.
https://RPCh.net
GNU Lesser General Public License v3.0
16 stars 6 forks source link

Rpch servers are unstable which leads to unstable connections #443

Closed trincema closed 11 months ago

trincema commented 1 year ago

It happens very often that the Rpch connection cannot be establish. The cause seem to be RpcUsually they have to be manually restarted. Sometimes, however, I've even seen some errors in the terminal running Rpch docker command. See attached screenshots.

Expected Behavior

Stable Rpch connections.

Current Behavior

Unstable Rpch connections.

(Optional) Possible Solution

Have to investigate these unstabilities and fix the issues causing them, but that is probably not that easy to reproduce.

Steps to Reproduce

  1. Start Rpch docker container
  2. Go to MM and try to establish a connection

Were you able to reproduce the bug using the above steps consistently each time? YES

Context (Environment)

Really hard to test and detect why some issues happened, could be confusing if the connection is unstable. Hard to setup connection in MM because of this.

Detailed Description

Logs

8f750219-9caa-49d9-89e9-697562e968b5 image

SCBuergel commented 1 year ago

Here logs of my MM connection failure. Protocol:

  1. Add RPCh server to MM as custom network and activate that network, I am using http://10.137.0.51:8080/?exit-provider=https://rpc.ankr.com/eth
  2. Close browser in which MM is running
  3. Start latest version of RPCh server from website. That is currently
docker run -e DEBUG="rpch*,-*metrics" -e RESPONSE_TIMEOUT=5000 -e DISCOVERY_PLATFORM_API_ENDPOINT=https://staging.discovery.rpch.tech -e PORT=8080 -e DATA_DIR=app -e CLIENT=handsome-rest-combine-kept-variety  --name rpc-server -p 8080:8080 --rm  europe-west6-docker.pkg.dev/rpch-375921/rpch/rpc-server:6b9862f
  1. wait 1 minute
  2. start browser and unlock MM. It should now attempt to connect to RPCh server. The last step consistently fails for me with We can't connect to RPCh mainnet. Debug output below: rpch_debug_output_seb.txt

Just to be on the safe side that this works in general I tested via curl and indeed all is well:

$ curl 10.137.0.51:8080/?exit-provider=https://rpc.ankr.com/eth -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
{"id":1,"result":"0x1","jsonrpc":"2.0"}