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
Explore using websockets to watch for new blocks in sync-realtime rather than relying on polling. This would be an improvement for latency critical application, and save on rpc credits for some apps as well.
Specifically, I think we could use the "eth_subscribe" method in replacement of the eth_getBlockByNumber and setInterval.
After this upgrade and #1115, Ponder would be close to the minimum latency possible. It would be good to start to get an intuition around the short comings of the "eth_subscribe" rpc method and what work arounds we would need.
This would most likely require changes to ponder.config.ts. I think it could look like:
Description
Explore using websockets to watch for new blocks in
sync-realtime
rather than relying on polling. This would be an improvement for latency critical application, and save on rpc credits for some apps as well.Specifically, I think we could use the "eth_subscribe" method in replacement of the
eth_getBlockByNumber
andsetInterval
.ponder/packages/core/src/sync-realtime/index.ts
Lines 810 to 857 in e6a0ab8
After this upgrade and #1115, Ponder would be close to the minimum latency possible. It would be good to start to get an intuition around the short comings of the "eth_subscribe" rpc method and what work arounds we would need.
This would most likely require changes to
ponder.config.ts
. I think it could look like:We probably would still need to preserve the polling option when there is no available websocket connection.
Related
The text was updated successfully, but these errors were encountered: