Skip to content
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

[Merged by Bors] - Revise EE peer penalites #3485

Closed

Conversation

paulhauner
Copy link
Member

Issue Addressed

NA

Proposed Changes

Don't penalize peers for errors that might be caused by an honest optimistic node.

Additional Info

NA

@paulhauner paulhauner added ready-for-review The code is ready for review v3.0.0 🐼 Required for the v3.0.0 release labels Aug 19, 2022
ExecutionPayloadError::RejectedByExecutionEngine { .. } => true,
// An honest optimistic node may propagate blocks which are rejected by an EE, do not
// penalize them.
ExecutionPayloadError::RejectedByExecutionEngine { .. } => false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little concerned about this being false when getting blocks over rpc. A malicious peer might intentionally keep sending us invalid payloads without it getting penalized. Does it make sense to have different penalties for gossip and rpc errors?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could have different penalties, but I'm not sure how critical it is. Those blocks would have to be signed by a proposer so the attack surface is fairly small. Can a peer just send us the same block again and again via RPC?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we can't even penalize peers for invalid payloads via RPC since honest, optimistic nodes may do that.

Spec reference:

Non-faulty, optimistic nodes may send blocks which result in an INVALID response from an execution engine. To prevent network segregation between optimistic and non-optimistic nodes, transmission of an INVALID execution payload via the Req/Resp domain SHOULD NOT cause a node to be down-scored or disconnected. Transmission of a block which is invalid due to any consensus layer rules (i.e., not execution layer rules) MAY result in down-scoring or disconnection.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay this makes sense. I think we should merge this PR and handle any potential dos issues in sync.
@divagant-martian I'm not completely sure this is a dos vector in block lookups. We should tackle it in a separate PR if it is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a kinda tricky one.

In principle, we could end up in an infinite loop in sync where we continuously re-download the same blocks from the same peer. its unlikey tho. If a malicious peer sends us this in sync, we should re-download and progress from another peer.

If some peer sends us this in an RPC request, i think its not too bad, we should mark the block as failed and not try again (assuming its an execution failure, not a downloading failure).

Agree the current logic is probably the best. If we see anything happen we may want to add a small penalty to some of these

@paulhauner paulhauner added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Aug 19, 2022
@paulhauner
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Aug 19, 2022
## Issue Addressed

NA

## Proposed Changes

Don't penalize peers for errors that might be caused by an honest optimistic node.

## Additional Info

NA
@bors bors bot changed the title Revise EE peer penalites [Merged by Bors] - Revise EE peer penalites Aug 19, 2022
@bors bors bot closed this Aug 19, 2022
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

NA

## Proposed Changes

Don't penalize peers for errors that might be caused by an honest optimistic node.

## Additional Info

NA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge. v3.0.0 🐼 Required for the v3.0.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants