-
Notifications
You must be signed in to change notification settings - Fork 234
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
Reject out of date blocks submitted via RPC #1914
Conversation
…h are out of virtual DAA window)
Codecov Report
@@ Coverage Diff @@
## dev #1914 +/- ##
=======================================
Coverage 61.46% 61.47%
=======================================
Files 628 628
Lines 29556 29568 +12
=======================================
+ Hits 18167 18176 +9
- Misses 8814 8817 +3
Partials 2575 2575
Continue to review full report at Codecov.
|
infrastructure/config/config.go
Outdated
@@ -122,6 +122,7 @@ type Flags struct { | |||
IsArchivalNode bool `long:"archival" description:"Run as an archival node: don't delete old block data when moving the pruning point (Warning: heavy disk usage)'"` | |||
AllowSubmitBlockWhenNotSynced bool `long:"allow-submit-block-when-not-synced" hidden:"true" description:"Allow the node to accept blocks from RPC while not synced (this flag is mainly used for testing)"` | |||
EnableSanityCheckPruningUTXOSet bool `long:"enable-sanity-check-pruning-utxo" hidden:"true" description:"When moving the pruning point - check that the utxo set matches the utxo commitment"` | |||
AllowSubmittingNonDAABlocks bool `long:"allow-non-daa-blocks" hidden:"false" description:"When submitting blocks via RPC - accept blocks which are out of virtual daa window (although such blocks are not rewarded anyhow)"` |
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.
@someone235 is hidden:"false"
needed here ?
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.
I think it's better to move this flag directly to the submitBlock RPC command
infrastructure/config/config.go
Outdated
@@ -122,6 +122,7 @@ type Flags struct { | |||
IsArchivalNode bool `long:"archival" description:"Run as an archival node: don't delete old block data when moving the pruning point (Warning: heavy disk usage)'"` | |||
AllowSubmitBlockWhenNotSynced bool `long:"allow-submit-block-when-not-synced" hidden:"true" description:"Allow the node to accept blocks from RPC while not synced (this flag is mainly used for testing)"` | |||
EnableSanityCheckPruningUTXOSet bool `long:"enable-sanity-check-pruning-utxo" hidden:"true" description:"When moving the pruning point - check that the utxo set matches the utxo commitment"` | |||
AllowSubmittingNonDAABlocks bool `long:"allow-non-daa-blocks" hidden:"false" description:"When submitting blocks via RPC - accept blocks which are out of virtual daa window (although such blocks are not rewarded anyhow)"` |
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.
I think it's better to move this flag directly to the submitBlock RPC command
In order to avoid lagging miners from spamming the network, we reject by default all submitted blocks with
DAA score < virtual DAA score - DAA window size
. Such blocks are not rewarded anyhow. See issue #1896