Skip to content

πŸ›‘οΈ [ZK-SERVICE] Rate Limiting & Denial of Service (DoS) Prevention MiddlewareΒ #823

Description

@ayomideadeniran

πŸ“ Issue Summary

Implement IP and API token rate limiting to protect proof generator endpoints from CPU exhaustion attacks.

❓ Problem or Motivation

Unthrottled POST requests to /generate-proof can crash service CPU resources completely.

πŸ’‘ Proposed Solution

  • Integrate express-rate-limit and redis-rate-limiter.
  • Enforce limit of 10 proof generation requests per minute per client IP.
  • Return HTTP 429 Too Many Requests with Retry-After headers.

🧩 Affected Areas

  • ZK Proof Service (zk-proof-service/server.js)

βœ… Checklist

  • I have searched for existing issues
  • This aligns with the project's goal

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions