Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: orphan chunk state witness pool #10613
feat: orphan chunk state witness pool #10613
Changes from 28 commits
8dd0c4e
456a821
16828b3
d3dc400
5da1fea
9cb7df9
5a76c7c
97a0482
f9b9c52
42af070
6592ace
a29b8df
22a2b15
9974f09
dc19727
0183075
aedb405
198a428
49bea32
36b7391
f4cd1e7
3b3f8c4
db14aa8
3c045e2
3bcd5c5
0b126b8
a6858eb
0edf57a
f61f34c
bb41b37
33248ac
4e6711d
24b25f5
58be57b
056393d
5cae3c3
6e9b143
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
this is one example where I think asserting is more appropriate than returning an error
witness.inner.chunk_header.prev_block_hash()
, so violating that is a programmatic error, not an "invalid input" kind of errorThere 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 don't know, I'm really scared of introducing code that could lead to DoS vulnerability. It might not be a big threat to normal services, but on a blockchain I imagine that a DoS means that it'd be possible to kick out validators and cause all sorts of mayhem.
IMO passing the wrong block to
process_chunk_state_witness
is not a fatal error - it's invalid input, for which the function can safely fail.I added it because I know that there are plans to process witnesses before the block is applied, and I was worried that someone might accidentally use it incorrectly once the complexity of things increases.
I don't see a reason to risk a panic here. This error will show up in the logs with an
ERROR
log-level, and I think anyone debugging an issue looks for those, so the visibility is there. Maybe we could introduce aBUG
log-level, that would be used for non-critical bugs?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.
feel free to merge the PR as it is and we can discuss this on protocol core weekly sync