-
Notifications
You must be signed in to change notification settings - Fork 5
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
enha: reject unknown clients in the middleware #1939
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Final benchmark: Git Info:
Configuration:
RPS Stats: Max: 1251.00, Min: 919.00, Avg: 1114.58, StdDev: 51.00 Plot: View Plot |
User description
This is the first step towards removing the method wrapper.
PR Type
Enhancement
Description
Reject unknown clients in middleware
Remove method wrapper for client rejection
Implement client identification via headers/URL
Update E2E tests for unknown client handling
Changes walkthrough 📝
stratus_error.rs
Add response future conversion for StratusError
src/eth/primitives/stratus_error.rs
to_response_future
method for StratusErrorrpc_method_wrapper.rs
Remove client rejection from metrics wrapper
src/eth/rpc/rpc_method_wrapper.rs
reject_unknown_client
call from metrics wrapperrpc_middleware.rs
Implement client rejection in RPC middleware
src/eth/rpc/rpc_middleware.rs
reject_unknown_client
function in middlewarecall
method to use new rejection logicrpc_server.rs
Remove client rejection from RPC server methods
src/eth/rpc/rpc_server.rs
reject_unknown_client
function and its usagestratus_get_subscriptions
andeth_subscribe
mod.rs
Remove unused import for client rejection
src/eth/rpc/mod.rs
reject_unknown_client
functionhardhat.config.ts
Update Stratus URL in Hardhat config
e2e/hardhat.config.ts
?app=e2e
from Stratus URL in configjustfile
Enable debug logging for Stratus in E2E tests
justfile
e2e-json-rpc.test.ts
Add E2E tests for unknown client handling
e2e/test/automine/e2e-json-rpc.test.ts