Skip to content

Fix race in DAS chunk assembly by adding per-batch locking#3588

Merged
Tristan-Wilson merged 3 commits intoOffchainLabs:masterfrom
prestoalvarez:master
Sep 11, 2025
Merged

Fix race in DAS chunk assembly by adding per-batch locking#3588
Tristan-Wilson merged 3 commits intoOffchainLabs:masterfrom
prestoalvarez:master

Conversation

@prestoalvarez
Copy link
Contributor

  • Add a mutex to batch and guard add/close operations to prevent concurrent writes to the same chunk and double increments of seenChunks.
  • Eliminates rare “incomplete batch”/flaky assembly caused by data races.
  • Scope limited to DAS RPC server; preserves parallelism across different batches.

@Tristan-Wilson
Copy link
Member

Tristan-Wilson commented Sep 11, 2025

@prestoalvarez Thanks for your contribution, this looks like a real bug.

@Tristan-Wilson Tristan-Wilson merged commit eb640b7 into OffchainLabs:master Sep 11, 2025
18 checks passed
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.

3 participants