ethereum-optimism / ethereum-optimism/optimism
fix(op-service): CachingReceiptsProvider leaks fetching lock on FetchReceipts error
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 145
Description
## Problem
`CachingReceiptsProvider.FetchReceipts` registers a per-block mutex in `fetching` and removes it after a successful fetch. If `inner.FetchReceipts` returns an error, the code returned without `deleteFetchingLock`, leaving the map entry (and mutex) behind indefinitely.
## Expected
Remove the fetching lock for the block hash on error, same as on success.
## PR
Tracked in the linked pull request.
Contributor guide
Research direction
Start at CachingReceiptsProvider.FetchReceipts and trace how the per-block fetching lock is registered and removed on the success path. Exercise the inner.FetchReceipts error path and verify that the lock for the block hash is also removed, with a regression test if the surrounding tests provide an appropriate location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100