js-libs icon indicating copy to clipboard operation
js-libs copied to clipboard

light.js RPC call priotization

Open amaury1093 opened this issue 7 years ago • 0 comments
trafficstars

For simplicity, the balanceOf$.setFrequency() function has been removed, but it would be an idea to put it back.

The idea is:

  • right now, each RpcObservable has its frequency fixed (i.e. balanceOf$ calls eth_getBalance on each new block).
  • now let's imagine a dapp that makes a huge amount of rpc calls. It would be nice to prioritize these calls.
    • At least console.warn the dapp developer that there are too many rpc calls at the same time
    • Let the dapp developer choose the frequency of each RpcObservable (e.g. some eth_getBalance can be called on every 2 blocks)

amaury1093 avatar Oct 18 '18 14:10 amaury1093