Skip to content

fix: isolate refunded deposits from validator withdrawal queue#151

Open
matthias-wright wants to merge 1 commit intomainfrom
m/handle-invalid-deposits
Open

fix: isolate refunded deposits from validator withdrawal queue#151
matthias-wright wants to merge 1 commit intomainfrom
m/handle-invalid-deposits

Conversation

@matthias-wright
Copy link
Copy Markdown
Collaborator

Failed deposit requests have to be handled with care, because the deposit contract burns deposited funds.
If a deposit fails validation, a matching withdrawal request is queued to avoid loss of funds.
Currently, all of these withdrawal requests are grouped by the validator's public key. If an invalid deposit request triggered a withdrawal, and the same validator initiates another withdrawal, then those two withdrawals will be merged. This is not desirable, since the invalid deposit request might have different withdrawal credentials.

Changes:

  • Stores withdrawals triggered by invalid withdrawal requests under a different key in the withdrawal queue
  • Differentiates between deposit requests that are rejected because the validator already has a pending deposit/withdrawal request in the queue, and deposit requests that are rejected because the signatures are invalid.

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.

1 participant