-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Labels
Description
Description
The goal of this workstream is to introduce a custom rate-limiting mechanism based on IP and CredentialId Access to the following resources should be limited:
- tx_exec_time
- tx_size
- tps
- gas_used
Checklist
- Pass SocketAddr from axum handler to
process_accept_txRate limiting: passSocketAddrfrom Axum toprocess_accept_tx. #2170 - Adjust the above logic to work with nginx
- We need to apply rate limiting to failed transactions too. For unsuccessful transactions, pass both
apply_tx_to_in_progress_batch_innerandgas_usedintoapply_tx_to_in_progress_batch_inner. https://github.com/Sovereign-Labs/sovereign-sdk/pull/2172/files - Implement
RateLimiterservice that rate limits based onIP&CredentialId. - Add handling for
x-forwarded-forheader Rate Limiting: Add handling forx-forwarded-for#2199 - Add config that respects cutom limits: Rate Limiting: Add
SovRateLimiterConfigandRuntime::resolve_address#2230 - Add custom limits for special CredentialId & IP Rate Limiting: Add
SovRateLimiterConfigandRuntime::resolve_address#2230 - Add relevant metrics Rate Limiter: Limit number of concurrent users. #2241
- Test everything on AWS and specifically verify IP-based rate limiting.
- Enable the service in the
devbranch