-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
enha: add configurable max request size for JSON-RPC #2043
Conversation
…ions Add a new configuration parameter `external_rpc_max_request_size_bytes` to control the maximum request size for external RPC connections. This allows more granular control over client resource limits and prevents potential large request-related issues across multiple components including RPC downloader, importer, and blockchain client.
PR Reviewer Guide 🔍(Review updated until commit f77c361)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to f77c361
Previous suggestionsSuggestions up to commit 18aa4db
|
Add max request size parameter (10485760 bytes) to leader-follower change and importer integration tests to align with new RPC configuration
Persistent review updated to latest commit f77c361 |
Merge on Hold. Need to deploy new version of stratus-updater first. |
Final benchmark: Git Info:
Configuration:
Leader Stats: Follower Stats: Plots: |
PR Type
Enhancement
Description
Add configurable max request size for external RPC
Implement in RPC downloader, importer, and blockchain client
Update integration tests with new parameter
Modify deployment script to include new configuration
Changes walkthrough 📝
rpc_downloader.rs
Update RPC downloader with max request size parameter
src/bin/rpc_downloader.rs
external_rpc_max_request_size_bytes
parameter toBlockchainClient::new_http
callimporter_config.rs
Implement max request size in ImporterConfig
src/eth/follower/importer/importer_config.rs
external_rpc_max_request_size_bytes
field toImporterConfig
structinit
method to pass max request size toBlockchainClient::new_http_ws
rpc_server.rs
Update RPC server to handle max request size parameter
src/eth/rpc/rpc_server.rs
external_rpc_max_request_size_bytes
instratus_init_importer
functionImporterConfig
initializationblockchain_client.rs
Implement max request size in BlockchainClient
src/infra/blockchain_client/blockchain_client.rs
max_request_size_bytes
field toBlockchainClient
structnew_http
,new_http_ws
, andbuild_http_client
methods to includemax request size
HttpClientBuilder
config.rs
Add max request size configuration to RpcDownloaderConfig
src/config.rs
external_rpc_max_request_size_bytes
field toRpcDownloaderConfig
struct
deploy.py
Update deployment script with max request size parameter
utils/deploy/deploy.py
external_rpc_max_request_size_bytes
toConfig
class with defaultvalue of "10485760"
change_to_follower_params
listleader-follower-change.test.ts
Update leader-follower change tests with max request size
e2e/cloudwalk-contracts/integration/test/leader-follower-change.test.ts
stratus_changeToFollower
calls in tests
leader-follower-importer.test.ts
Update leader-follower importer tests with max request size
e2e/cloudwalk-contracts/integration/test/leader-follower-importer.test.ts
stratus_initImporter
calls in tests