-
Notifications
You must be signed in to change notification settings - Fork 324
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
[actpool] forbid processing system action #3867
Conversation
api/coreservice.go
Outdated
// system action is only added by proposer when creating a block | ||
if action.IsSystemAction(selp) { | ||
return "", errors.New("cannot process system action") | ||
} |
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.
for safety, to prevent potential replay of grantreward
Codecov Report
@@ Coverage Diff @@
## master #3867 +/- ##
==========================================
+ Coverage 75.38% 75.39% +0.01%
==========================================
Files 303 318 +15
Lines 25923 27303 +1380
==========================================
+ Hits 19541 20586 +1045
- Misses 5360 5661 +301
- Partials 1022 1056 +34
... and 6 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
It has been prevented in workingset
yes, but that's after a block is proposed (and then found invalid), so a block is wasted. In other words, someone can potentially keep sending such a system action and prevent block being generated, like a DoS attack? so it's worthwhile to early-detect this and throw it out of action pool? |
if so, we need to prevent adding it to actpool. |
yes, by early-exiting here, system action is neither added to local actpool (L436 below), nor being propagated to p2p network (L460 below) |
|
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #(issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: