PowerLoom / snapshotter-core

Apache License 2.0
0 stars 0 forks source link

Feat: rpc helper improvements + core-api update #13

Closed Seth-Schmidt closed 2 weeks ago

Seth-Schmidt commented 2 weeks ago

Fixes #12

Checklist

Current behaviour

Rate limiting is currently not supported in RpcHelper

Additionally, core-api is not compatible with the latest architecture changes.

New expected behaviour

RpcHelper now supports rate limiting on a per-second basis using the aiolimiter leaky bucket method. The limits are configurable on a per-node basis as each RPC will have its own limits. A wrapper has been added around any outgoing requests that will check and wait for resources to become available before continuing with the request.

I have also removed all references to the now unused redis_conn argument for RpcHelper calls, and fixed a response parsing issue I found in batch_eth_get_balance_on_block_range.


Core-Api has been updated for the latest architecture changes. I have also updated the get_project_last_finalized_epoch_info endpoint to no longer iterate over all previous epochs until a finalization is found. I have replaced this in favor of the lastFinalizedSnapshot contract call to the Protocol State that is now available.

Change logs

Added

Changed

Fixed

Deployment Instructions

No Changes