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
Implement spec-compliant share splitting #246
Implement spec-compliant share splitting #246
Changes from 27 commits
2137d67
be307d5
e2ba998
b16f200
7d23abf
2331a72
665b611
5a0c5ea
95f2fb7
2a68a84
c956a63
8d75195
fe2c646
0a47c65
488ae0e
e0c0940
8e2e36d
99fb0e2
d00a9bc
132523a
d9adcfd
b6c6e30
d76c838
8f25a9b
defcd50
25f5d94
92301ea
b70b103
ff636c4
0a731c9
3eb7223
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 should never happen" in the sense of "this is an invalid state" kind of way?
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.
Yes. The only way to get in these is with 0-length transactions/evidence/ISRs, which should be invalid. Should this be a panic instead?
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.
Yeah, that's why I was asking. Because otherwise, we are reaching an invalid / unexpected state and silently recovering from it without even logging it. But we have to be careful here: is there any chance a (malicious) node could misuse panicing to shut down another honest node?
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.
The mempool logic should reject 0-length txs and evidence, and ISRs are non-zero by definition. I don't know if it does that currently.
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.
Not sure either. Let's panic on this and we'll find out soon enough :-D Nah, seriously, if this is some state that should never be reached (and if panicing can't be misused - or we can make sure it can't be misused), we should panic. But there should be an extensive comment explaining the expectations.
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.
Should the mempool logic be incorporated into ll-core or to the app via
CheckTx
? Both?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 feel like such a fundamental check could just be part of ll-core. There's no way a 0-length tx or evidence is valid.
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.
Fixed in ff636c4. Should we open an issue to make sure ll-core doesn't allow 0-length requests?
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.
Yes, probably a good idea to track this in an issue.