Skip to content

Fix race condition when two users connect simultaneously and receive the same User PDA #1947

@juan-malbeclabs

Description

@juan-malbeclabs

We identified a race condition in the user creation flow. When two users attempt to connect at the same time, both can end up receiving the same User PDA. This leads to conflicts, unexpected errors during account creation, and potential data corruption.

Steps to Reproduce:

  • Start two user connection requests in parallel.
  • Both requests try to derive and create the same User PDA.
  • The transaction succeeds for one user but fails (or creates inconsistencies) for the other.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions