Skip to content
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

feat: add ipAddressHbarSpendingPlan #2913

Merged

Conversation

Ivo-Yankov
Copy link
Collaborator

@Ivo-Yankov Ivo-Yankov commented Aug 30, 2024

Description:
Adds clasees for limiting operator hbar usage by IP address.

Related issue(s):

Fixes #2888

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

victor-yanev and others added 7 commits August 29, 2024 14:45
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Copy link

github-actions bot commented Aug 30, 2024

Acceptance Tests

  19 files  278 suites   31m 45s ⏱️
603 tests 595 ✔️ 4 💤 4
887 runs  877 ✔️ 4 💤 6

Results for commit 7a7a29d.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Copy link

github-actions bot commented Aug 30, 2024

Tests

       3 files     295 suites   19s ⏱️
1 341 tests 1 340 ✔️ 1 💤 0
1 353 runs  1 352 ✔️ 1 💤 0

Results for commit 7a7a29d.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
@Ivo-Yankov Ivo-Yankov self-assigned this Aug 30, 2024
@Ivo-Yankov Ivo-Yankov added the enhancement New feature or request label Aug 30, 2024
@Ivo-Yankov Ivo-Yankov added this to the 0.55.0 milestone Aug 30, 2024
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

# Conflicts:
#	package-lock.json
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@Ivo-Yankov Ivo-Yankov marked this pull request as ready for review August 30, 2024 10:36
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Copy link
Contributor

@victor-yanev victor-yanev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please point this branch to 2901-Implement-add-expense and resolve the TODOs which are mentioning the #2888 issue

@Ivo-Yankov Ivo-Yankov changed the base branch from main to 2901-Implement-add-expense August 30, 2024 11:23
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
victor-yanev
victor-yanev previously approved these changes Sep 9, 2024
quiet-node
quiet-node previously approved these changes Sep 10, 2024
Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG few questions.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
victor-yanev
victor-yanev previously approved these changes Sep 10, 2024
Ivo-Yankov and others added 4 commits September 11, 2024 10:43
Co-authored-by: Victor Yanev <161485803+victor-yanev@users.noreply.github.com>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
…ddress-limiting-2

Signed-off-by: ebadiere <ebadiere@gmail.com>
…ddress-limiting-2

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

# Conflicts:
#	packages/relay/src/lib/services/hbarLimitService/index.ts
#	packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts
…ddress-limiting-2

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Copy link

sonarcloud bot commented Sep 17, 2024

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.56%. Comparing base (e54bb85) to head (7a7a29d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2913      +/-   ##
==========================================
+ Coverage   89.18%   89.56%   +0.37%     
==========================================
  Files          54       58       +4     
  Lines        3783     3863      +80     
  Branches      774      782       +8     
==========================================
+ Hits         3374     3460      +86     
+ Misses        362      356       -6     
  Partials       47       47              
Flag Coverage Δ
relay 89.71% <100.00%> (+0.10%) ⬆️
server 88.15% <ø> (+0.89%) ⬆️
ws-server 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../entities/hbarLimiter/ipAddressHbarSpendingPlan.ts 100.00% <100.00%> (ø)
...hbarLimiter/ipAddressHbarSpendingPlanRepository.ts 100.00% <100.00%> (ø)
...kages/relay/src/lib/db/types/hbarLimiter/errors.ts 100.00% <100.00%> (ø)
...s/relay/src/lib/services/hbarLimitService/index.ts 96.26% <100.00%> (+0.26%) ⬆️

... and 4 files with indirect coverage changes

@victor-yanev victor-yanev merged commit 325261b into main Sep 17, 2024
39 checks passed
@victor-yanev victor-yanev deleted the 2888-hbar-rate-limit-redesign-implement-ip-address-limiting-2 branch September 17, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[HBAR Rate Limit Redesign] Implement IP address limiting
5 participants