-
Notifications
You must be signed in to change notification settings - Fork 113
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
Message validation #1066
Message validation #1066
Conversation
network/p2p/GENERAL_RULES.md
Outdated
- `Ignore` - message is invalid, ignored and not processed further, violation count is increased. | ||
- `Reject` - message is rejected, ignored and not processed further, violation count is set to violation threshold, peer is banned for the current round. | ||
|
||
## Semantic assertions |
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.
add a case when message for slot N is sent in multiple slots
network/p2p/GENERAL_RULES.md
Outdated
- Generally, If violation happens by a large margin, the message is rejected. | ||
- If an assertion has a rule for rejecting, the rule has higher priority than this one. | ||
- If violation count reaches a certain threshold, all further messages from the validator for current round are rejected. | ||
- Each round resets violation count to 0. |
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.
Handle case if node is a bit malicious (ignored) each round but does it repetitively: should it be punished?
network/p2p/GENERAL_RULES.md
Outdated
- TODO: Need to check if upon reorg there can be more than one duty per epoch. | ||
- First violation is ignored. Further ones are rejected. | ||
- Message round is equal to estimated current round. | ||
- Violation by [1; ceil(MAX_POSSIBLE_ROUND * 0.2)] rounds is ignored. Violations above that are rejected. |
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.
- future rounds should be punished
- earlier ones are to be discussed
- test if clock drift may cause any false positives (if so, consider checking Prysm code regarding clock drift)
af3124f
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.
Added just some minor comments. This is a lot of code, lets get it merged soon.
Generally I'm not a big fan of this approach, we're replicating the consensus state in a way and keeping the messages twice. the code is pretty well organized though and functions as a "separate entity" which is good because one of my concerns was bloating the p2p layer with consensus logic.
anyway I hope one day we would just relay on the protocol to validate its own messages since it should already have all tools in place. there are some extra stuff we validate by tracking the messages but IMO eventually it should be splitted from consensus logic.
81b2763
* Message validation (#1066) --------- Co-authored-by: moshe-blox <[email protected]> Co-authored-by: moshe-blox <[email protected]> * e2e tests for eth execution layer package (#1143) * New slot ticker (#1149) --------- Co-authored-by: Matus Kysel <[email protected]> Co-authored-by: moshe-blox <[email protected]> --------- Co-authored-by: Nikita Kryuchkov <[email protected]> Co-authored-by: moshe-blox <[email protected]> Co-authored-by: moshe-blox <[email protected]> Co-authored-by: Anton Korpusenko <[email protected]> Co-authored-by: Matus Kysel <[email protected]> Co-authored-by: Matus Kysel <[email protected]>
No description provided.