op-service: Return ethereum.NotFound on 404 (#10210)
The beacon API returns HTTP Status Not Found (Code 404) when it is not able to find the resource. This should be disambiguated from transient errors. This commit has the HTTP client return the ethereum.NotFound error when the status code is 404. This is a commonly used sentinel error and the BlobDataSource was expecting this error. This will fix a bug that occurs when a block is reorged out after it is opened in derivation, but before blobs are fetched. The blob fetcher assumed that all errors where transient and would try to keep fetching the data even though the status code reported it as not found. This will return the right sentinel error to force a reset and exit this loop. I have added a unit test in op-e2e and confirmed that the test does not pass without this fix.
Showing
Please register or sign in to comment