Skip to content

feat: implement rate limiting#56

Merged
cameri merged 15 commits intomainfrom
7-implement-rate-limiting
Nov 16, 2022
Merged

feat: implement rate limiting#56
cameri merged 15 commits intomainfrom
7-implement-rate-limiting

Conversation

@cameri
Copy link
Owner

@cameri cameri commented Nov 13, 2022

Description

  1. Add Redis
  2. Implement NIP-20 Command Results
  3. Implement sliding window rate limiter
  4. Rate limit WebSocket messages by IP
  5. Rate limit Nostr Events by pubkey
  6. Add rate limiting to settings
  7. Update documentation to include redis and rate limiting

Related Issue

#7
#40

Motivation and Context

  1. Avoid the Tragedy of the Commons, where uncoordinated individuals acting on their own self-interest, cause depletion of a shared resource

How Has This Been Tested?

  1. Unit tests
  2. Integration tests (except rate-limiting)

Screenshots (if appropriate):

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • All new and existing tests passed.

@cameri cameri linked an issue Nov 13, 2022 that may be closed by this pull request
@cameri cameri self-assigned this Nov 13, 2022
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 3453372650

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 88.667%

Totals Coverage Status
Change from base Build 3452290770: 0.0%
Covered Lines: 724
Relevant Lines: 807

💛 - Coveralls

@cameri cameri force-pushed the 7-implement-rate-limiting branch from 2975b53 to ed15f36 Compare November 15, 2022 20:05
@cameri cameri added the enhancement New feature or request label Nov 16, 2022
@cameri cameri changed the title 7 implement rate limiting feat: implement rate limiting Nov 16, 2022
@cameri cameri marked this pull request as ready for review November 16, 2022 01:30
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
7.7% 7.7% Duplication

@cameri cameri merged commit b77239a into main Nov 16, 2022
@cameri cameri deleted the 7-implement-rate-limiting branch November 16, 2022 02:17
@github-actions
Copy link

🎉 This PR is included in version 1.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement rate limiting

2 participants