Skip to content

fix: handle malformed deposit requests#207

Open
matthias-wright wants to merge 9 commits into
audit-may-2026from
m/malformed-deposit
Open

fix: handle malformed deposit requests#207
matthias-wright wants to merge 9 commits into
audit-may-2026from
m/malformed-deposit

Conversation

@matthias-wright
Copy link
Copy Markdown
Collaborator

Builds on #202 (which builds on #167 and #192).

This addresses #201.

Changes:

  • Introduces an enum ParsedExecutionRequest with variants Valid(ExecutionRequest) and MalformedDeposit(MalformedDepositRequest). ExecutionRequest is the already existing execution request type, and MalformedDepositRequest is a new type for a deposit request with invalid keys.
pub enum ParsedExecutionRequest {
    Valid(ExecutionRequest),
    MalformedDeposit(MalformedDepositRequest),
}
  • Arriving execution requests are parsed into ParsedExecutionRequest first, and then processed. Malformed deposit requests will be rejected and a withdrawal will be initiated similarly to deposit requests that contain invalid signatures.
  • Unit tests are added to ensure that a malformed deposit request cannot drop valid same-entry deposit requests.

@matthias-wright matthias-wright changed the base branch from main to audit-may-2026 May 19, 2026 20:28
@matthias-wright matthias-wright changed the title M/malformed deposit fix: handle malformed deposit requests May 19, 2026
@evonide
Copy link
Copy Markdown

evonide commented May 22, 2026

LGTM. This PR parses grouped deposit entries per 288-byte deposit chunk so a malformed deposit is isolated/refunded while valid same-entry deposits still reach normal processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants