Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-batcher: Fix concurrent map write #13527

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mslipper
Copy link
Collaborator

When the batcher enqueues multiple transactions, multiple threads use the channel's public API at once. Since these methods modify the internal pendingTransactions map, this can lead to concurrent map access errors like this one: https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/75665/workflows/09c42fc5-cd49-482a-aaef-9def14c40388/jobs/3075154/tests.

@mslipper mslipper requested review from a team as code owners December 23, 2024 21:43
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.05%. Comparing base (4c162a2) to head (9e50101).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #13527      +/-   ##
===========================================
- Coverage    47.30%   43.05%   -4.25%     
===========================================
  Files          944      776     -168     
  Lines        78914    69395    -9519     
  Branches       803        0     -803     
===========================================
- Hits         37329    29879    -7450     
+ Misses       38826    36975    -1851     
+ Partials      2759     2541     -218     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
op-batcher/batcher/channel_manager.go 85.93% <100.00%> (+0.35%) ⬆️

... and 177 files with indirect coverage changes

mtx on channel_manager too
@mslipper mslipper force-pushed the bugfix/concurrent-map-write branch from b954938 to 9e50101 Compare December 23, 2024 22:34
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