-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: rpc helper improvements + core-api update #13
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xadahiya
approved these changes
Oct 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, let's deploy this on our test instance to see how it works.
xadahiya
approved these changes
Oct 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed some minor improvements and cleanup in 842054c. LGTM now!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theaiolimiter
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 inbatch_eth_get_balance_on_block_range
.Core-Api
has been updated for the latest architecture changes. I have also updated theget_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 thelastFinalizedSnapshot
contract call to the Protocol State that is now available.Change logs
Added
snapshotter/tests/rpc_helper_test.py
snapshotter/tests/static/abi/UUPSUpgradeable.json
snapshotter/tests/static/bytecode/protocol_state.json
snapshotter/tests/static/bytecode/uups_upgradeable.json
Changed
poetry.lock
pyproject.toml
setup.cfg
snapshotter/processor_distributor.py
snapshotter/snapshotter_id_ping.py
snapshotter/system_event_detector.py
snapshotter/tests/test_web3_async_provider.py
snapshotter/utils/generic_worker.py
snapshotter/utils/models/settings_model.py
snapshotter/utils/preloaders/tx_receipts/delegated_worker/tx_receipts.py
snapshotter/utils/rpc.py
snapshotter/utils/snapshot_utils.py
Fixed
snapshotter/core_api.py
build.sh
Deployment Instructions
No Changes