Skip to content

Improve Msg.Discard Error Handling to Prevent DoS#18049

Open
maradini77 wants to merge 5 commits into
erigontech:mainfrom
maradini77:main
Open

Improve Msg.Discard Error Handling to Prevent DoS#18049
maradini77 wants to merge 5 commits into
erigontech:mainfrom
maradini77:main

Conversation

@maradini77

Copy link
Copy Markdown
Contributor

Description

  • Refactored Msg.Discard to return errors instead of calling log.Fatal, avoiding node-wide crashes on malformed payloads.
  • Propagated the new error contract through p2p consumers (peer handling, sentry handshake/server, tests) with precise diagnostics.
  • Added formatting and ensured go test ./p2p/... passes to validate the change.

anacrolix pushed a commit that referenced this pull request Dec 2, 2025
seems #18049 is important - but
i think it's big and controversial - likely will take time to
think/merge it. So, here is minimalistic version of that PR.
anacrolix pushed a commit that referenced this pull request Dec 2, 2025
seems #18049 is important - but
i think it's big and controversial - likely will take time to
think/merge it. So, here is minimalistic version of that PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants