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
### TL;DR
Refactored RPC to wrap the needed rpc calls and return already serialized data. This way we don't have to repeat the request creation and response handling whenever we need it. We have fixed queries so maintaining wrappers doesn't seem like a problem
### What changed?
- Moved RPC-related functionality from `common` package to a new `rpc` package
- Created a new `Client` struct in the `rpc` package to handle RPC operations
- Refactored worker logic to use the new RPC client
- Updated orchestrator components to use the new RPC client
- Added utility functions for handling big.Int slices and RPC configurations
### How to test?
1. Run the indexer with the updated code
2. Verify that block fetching, log retrieval, and trace processing work as expected
3. Check that batch processing is functioning correctly by monitoring RPC calls
4. Ensure that the orchestrator components (poller, committer, failure recoverer) are operating properly with the new RPC client
### Why make this change?
This refactoring improves the overall structure and performance of the indexer:
1. Better separation of concerns by moving RPC-related code to its own package
2. Improved maintainability and readability of the codebase
3. Easier extension and modification of RPC-related functionality in the future
0 commit comments