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

[ALSP] Synchronization Engine BatchRequest spam detection (Permissionless-related engine level spam detection) #4704

Merged
merged 33 commits into from
Oct 12, 2023

Conversation

gomisha
Copy link
Contributor

@gomisha gomisha commented Sep 12, 2023

This PR adds ALSP spam level protection to the Synchronization Engine's BatchRequest message.

This is the third PR to implement ALSP misbehavior reporting at the engine level (first was 4590, second was 4665).

ref: https://github.com/dapperlabs/flow-go/issues/6812

Base automatically changed from misha/6812-alsp-sync-engine-range-request-spam to master September 14, 2023 21:57
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c5b6911) 52.85% compared to head (0d1fda2) 52.84%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4704      +/-   ##
==========================================
- Coverage   52.85%   52.84%   -0.01%     
==========================================
  Files         749      749              
  Lines       67135    67135              
==========================================
- Hits        35483    35480       -3     
- Misses      28966    28969       +3     
  Partials     2686     2686              
Flag Coverage Δ
unittests 52.84% <ø> (-0.01%) ⬇️

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

Files Coverage Δ
model/messages/synchronization.go 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gomisha gomisha marked this pull request as ready for review September 21, 2023 07:52
Copy link
Contributor

@kc1116 kc1116 left a comment

Choose a reason for hiding this comment

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

🚀

engine/common/synchronization/config.go Outdated Show resolved Hide resolved
engine/common/synchronization/config.go Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
engine/common/synchronization/engine.go Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
Copy link
Contributor

@yhassanzadeh13 yhassanzadeh13 left a comment

Choose a reason for hiding this comment

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

Except for the concern about the handling of irrecoverable errors; the rest looks very good.

engine/common/synchronization/engine.go Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
engine/common/synchronization/engine.go Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
Copy link
Contributor

@yhassanzadeh13 yhassanzadeh13 left a comment

Choose a reason for hiding this comment

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

Looks very good 👏 , thanks for applying the comments, there just one minor code styling comment left.

engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
Copy link
Member

@jordanschalm jordanschalm left a comment

Choose a reason for hiding this comment

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

Nice work, and thank you for the revisions.

Please address the point on changing the warn-level logs before merging.

engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
engine/common/synchronization/engine.go Outdated Show resolved Hide resolved
@gomisha gomisha added this pull request to the merge queue Oct 12, 2023
Merged via the queue into master with commit 7845139 Oct 12, 2023
64 of 65 checks passed
@gomisha gomisha deleted the misha/6812-alsp-sync-engine-batch-request-spam branch October 12, 2023 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants