Open clangenb opened 2 weeks ago
.....or use node for benchmarking? (I can't beleive I'm proposing this)
Hahah, not sure if node will hit performance limits before our worker.
But it might be beneficial anyhow to implement a better client. I mean, on the typescript side, we can use now parity's WS-provider without any changes, so we might be able to use parity's jsonrpsee client too instead of the low level inplementation we have here?
If we are lucky this can be done in a day, as it only affects the client, not the worker.
The benchmarks have been relying on the fact that we are not JSON RPC 2.0 compliant, but they have been broken with #1623.
In order to fix them, we need our client to be able to handle multiple requests/subscriptions in one websocket connection. Before, the benchmarks were just lucky to have been able to handle multiple requests on one connection.
This essentially means that we need to implement this code for the client: https://github.com/encointer/encointer-js/blob/master/packages/worker-api/src/rpc-provider/src/ws/index.ts.