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

[txpool] Long time consuming ddos attack protection #254

Merged
merged 7 commits into from
Nov 15, 2022

Conversation

DarianShawn
Copy link
Collaborator

Description

Some transactions call contracts that take a long time, to the detriment of all other transactions.
In the previous version, we assumed it to be an attack and simply banish it.
This is unfair to users who really need this demand, and if their frequency is extremely low, it is not a problem.
So we decided to drop the real DDOS attack instead of just considering time consuming.

Changes include

  • Hotfix (change that solves an urgent issue, and requires immediate attention)

Testing

  • I have tested this code with the official test suite

@DarianShawn DarianShawn added the hotfix Major bug fix that should be merged ASAP label Nov 15, 2022
@DarianShawn DarianShawn self-assigned this Nov 15, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #254 (ea73353) into dev (a840ee8) will decrease coverage by 0.92%.
The diff coverage is 38.95%.

@@            Coverage Diff             @@
##              dev     #254      +/-   ##
==========================================
- Coverage   51.21%   50.29%   -0.93%     
==========================================
  Files         117      117              
  Lines       17525    18242     +717     
==========================================
+ Hits         8975     9174     +199     
- Misses       7789     8283     +494     
- Partials      761      785      +24     
Impacted Files Coverage Δ
blockchain/storage/kvstorage/kvstorage.go 54.16% <ø> (+2.46%) ⬆️
consensus/ibft/hooks.go 55.26% <ø> (ø)
consensus/ibft/pos.go 0.00% <0.00%> (ø)
helper/keccak/keccak.go 0.00% <ø> (ø)
helper/keccak/pool.go 0.00% <ø> (ø)
jsonrpc/debug_endpoint.go 36.84% <0.00%> (ø)
network/bootnodes.go 100.00% <ø> (ø)
network/connections.go 98.07% <ø> (ø)
secrets/secrets.go 100.00% <ø> (ø)
state/executor.go 3.07% <0.00%> (-0.12%) ⬇️
... and 57 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@abrahamcruise321 abrahamcruise321 left a comment

Choose a reason for hiding this comment

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

LGTM.

@abrahamcruise321 abrahamcruise321 merged commit 66833d0 into dev Nov 15, 2022
@abrahamcruise321 abrahamcruise321 deleted the hotfix-ddos-attack branch November 15, 2022 09:42
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotfix Major bug fix that should be merged ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants