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: filter rate limit #1258

Merged
merged 3 commits into from
Nov 29, 2024
Merged

feat: filter rate limit #1258

merged 3 commits into from
Nov 29, 2024

Conversation

richard-ramos
Copy link
Member

Also includes refactor to have a rate limiter per peer with TTL
cc: @fryorcraken

@status-im-auto
Copy link

status-im-auto commented Nov 25, 2024

Jenkins Builds

Click to see older builds (9)
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ c7f7071 #1 2024-11-25 19:05:23 ~30 sec unknown 📄log
✖️ 440b816 #2 2024-11-25 19:28:18 ~30 sec unknown 📄log
✔️ 5403100 #3 2024-11-25 19:41:52 ~2 min unknown 📄log
✔️ a4251a9 #4 2024-11-26 13:01:01 ~2 min unknown 📄log
✔️ e37768a #5 2024-11-26 13:13:09 ~2 min unknown 📄log
✔️ a6359c4 #6 2024-11-28 20:01:33 ~2 min unknown 📄log
✔️ 955e484 #7 2024-11-28 20:03:46 ~2 min unknown 📄log
✔️ 27ebe7a #8 2024-11-29 14:01:08 ~2 min unknown 📄log
✔️ d1499b5 #9 2024-11-29 16:00:47 ~8 min unknown 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3828f31 #10 2024-11-29 16:06:00 ~5 min unknown 📄log
✔️ 366e0dd #11 2024-11-29 16:20:33 ~2 min unknown 📄log

Also includes refactor to have a rate limiter per peer with ttl
}

Option func(*FilterParameters)
FullNodeOption func(*FilterFullNodeParameters)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be FilterNodeOption.

Copy link
Member Author

Choose a reason for hiding this comment

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

I used FullNodeOption because both lightnode and fullnode have their own options, also, using Filter stutters when you use the package name due to repeating the word "filter", i.e. "filter.FilterFullNodeOptionvsfilter.FullNodeOption`.

Hm. I should change the parameters struct name too.

waku/v2/utils/limiter.go Outdated Show resolved Hide resolved
waku/v2/utils/limiter.go Show resolved Hide resolved
waku/v2/utils/limiter.go Show resolved Hide resolved
waku/v2/node/wakuoptions.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/client.go Show resolved Hide resolved
waku/v2/protocol/filter/client.go Show resolved Hide resolved
waku/v2/protocol/filter/options.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/options.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@chaitanyaprem chaitanyaprem left a comment

Choose a reason for hiding this comment

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

LGTM

waku/v2/utils/limiter.go Show resolved Hide resolved
@richard-ramos richard-ramos force-pushed the feat/rate-limit branch 3 times, most recently from d1499b5 to 3828f31 Compare November 29, 2024 16:00
@richard-ramos richard-ramos merged commit 0c594b3 into master Nov 29, 2024
12 checks passed
@richard-ramos richard-ramos deleted the feat/rate-limit branch November 29, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants