AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

Suggestion : Allow for multiple RPC endpoints for each config #600

Closed paradox-tt closed 9 months ago

paradox-tt commented 9 months ago

Hello,

With Parity's RPC endpoints scaled down, it might be best to allow multiple RPC endpoints to be specified with each configuration and let the chopstix select an available one if there's an issue:

    at node:net:337:12'
[12:59:36.216] INFO (ws/305006): Error handling request: Error: disconnected from wss://kusama-rpc.polkadot.io: 1006:: Abnormal Closure 'Error: disconnected from wss://kusama-rpc.polkadot.io: 1006:: Abnormal Closure
    at WebSocket.__internal__onSocketClose (/home/ansible_user/.npm/_npx/81ad9c881cb83600/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:353:23)
    at callListener (/home/ansible_user/.npm/_npx/81ad9c881cb83600/node_modules/ws/lib/event-target.js:290:14)
    at WebSocket.onClose (/home/ansible_user/.npm/_npx/81ad9c881cb83600/node_modules/ws/lib/event-target.js:220:9)
    at WebSocket.emit (node:events:514:28)
    at WebSocket.emit (node:domain:488:12)
    at WebSocket.emitClose (/home/ansible_user/.npm/_npx/81ad9c881cb83600/node_modules/ws/lib/websocket.js:264:10)
    at TLSSocket.socketOnClose (/home/ansible_user/.npm/_npx/81ad9c881cb83600/node_modules/ws/lib/websocket.js:1283:15)
    at TLSSocket.emit (node:events:526:35)
    at TLSSocket.emit (node:domain:488:12)
    at node:net:337:12'
2023-12-21 12:59:39          API-WS: disconnected from wss://kusama-rpc.polkadot.io: 1006:: Abnormal Closure
2023-12-21 12:59:42          API-WS: disconnected from wss://kusama-rpc.polkadot.io: 1006:: Abnormal Closure
2023-12-21 12:59:45          API-WS: disconnected from wss://kusama-rpc.polkadot.io: 1006:: Abnormal Closure
2023-12-21 12:59:48          API-WS: disconnected from wss://kusama-rpc.polkadot.io: 1006:: Abnormal Closure
2023-12-21 12:59:51          API-WS: disconnected from wss://kusama-rpc.polkadot.io: 1006:: Abnormal Closure
2023-12-21 12:59:54          API-WS: disconnected from wss://kusama-rpc.polkadot.io: 1006:: Abnormal Closure

Update: Never mind, I found the --endpoint flag.