-
Notifications
You must be signed in to change notification settings - Fork 317
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
chore(p2p): log if rate limit was peer or global #12116
chore(p2p): log if rate limit was peer or global #12116
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one question about the peer scoring refactor but otherwise LGTM!
return false; | ||
default: | ||
return true; | ||
if (rateLimitStatus === RateLimitStatus.DeniedGlobal) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this conditional check that the RateLimitStatus
is DeniedPeer
instead of DeniedGlobal
before penalizing?
if (rateLimitStatus === RateLimitStatus.DeniedGlobal) { | |
if (rateLimitStatus === RateLimitStatus.DeniedPeer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh god youre right, will add unit test too
edit: good news, existing unit test caught it, this was just a typo
* master: (264 commits) chore(p2p): log if rate limit was peer or global (#12116) chore: @aztec/stdlib pt1 -> cleanup circuits js (#12039) chore(tests): shorten block times in e2e p2p tests (#12073) fix: darwin properly erroring (#12113) chore: add missing import (#12111) fix: yarn remake-constants (#12109) chore: fix error in oracle definition (#12090) fix: Don't consider skipping (#10598) fix: Use gas billed in block header building (#12101) fix(avm): disable wrong sha skippable (#12099) chore: Provide defaults for bb and acvm in release image (#12105) fix(avm): break TS dependency cycle (#12103) feat: IVC gates command in WASM (#11792) fix: SharedMutable compilation warnings (#12098) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg feat: Sync from noir (#12064) chore: Fix unbound CI variable on release image bootstrap (#12095) ...
* master: (264 commits) chore(p2p): log if rate limit was peer or global (#12116) chore: @aztec/stdlib pt1 -> cleanup circuits js (#12039) chore(tests): shorten block times in e2e p2p tests (#12073) fix: darwin properly erroring (#12113) chore: add missing import (#12111) fix: yarn remake-constants (#12109) chore: fix error in oracle definition (#12090) fix: Don't consider skipping (#10598) fix: Use gas billed in block header building (#12101) fix(avm): disable wrong sha skippable (#12099) chore: Provide defaults for bb and acvm in release image (#12105) fix(avm): break TS dependency cycle (#12103) feat: IVC gates command in WASM (#11792) fix: SharedMutable compilation warnings (#12098) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg feat: Sync from noir (#12064) chore: Fix unbound CI variable on release image bootstrap (#12095) ...
Overview
When running testbench, some rate limit logs were unclear if they were due to peer specific limits ( misbehaviour ) or due
to global limits ( ddos prevention ) this change fixes the error message to include what offense has been observed