ethereum / sourcify

Decentralized Solidity contract source code verification service
https://sourcify.dev
MIT License
780 stars 395 forks source link

Add sourcify request retry mechanism in Monitor #1561

Closed marcocastignoli closed 2 months ago

marcocastignoli commented 2 months ago

Some of the /verify requests in the monitor running on GCP are failing with ECONNRESET error. We already tried debugging the problem but with no luck. Until we find a better solution we need to implement a retry mechanism in Monitor.

This PR implements a retry mechanism in Monitor configurable with:

  sourcifyRequestOptions: {
    // Maximum number of retry attempts for contract verification requests after encountering an error
    maxRetries: 3,
    // Delay in milliseconds between each retry attempt for verification requests to Sourcify
    retryDelay: 30000,
  },
manuelwedler commented 2 months ago

Oh didn't see the CI is failing. Could you have a look on that before merging?