ethereum / sourcify

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

Logging of error on contract submission not resolving variables #1440

Closed dreadedhamish closed 2 months ago

dreadedhamish commented 2 months ago

In PendingContracts.ts, this code is responsible for logging success or failure:

if (response.status === 200) {
      this.contractLogger.info(
        "[PendingContract.sendToSourcifyServer] Contract sent",
        {
          address: this.address,
          chainId: this.chainId,
          sourcifyServerURL,
        }
      );
      return response.json();
    } else {
      throw new Error(
        `Error sending contract ${
          this.address
        } to Sourcify server ${sourcifyServerURL}: ${
          response.statusText
        } ${await response.text()}`
      );
    }

I consistently get this in the logs for failures however:

{"address":"0x778E3d7101DDe4CA34C25543f51494890C0885bD","err":{},"level":"error","message":"Error sending contract to Sourcify server","moduleName":"ChainMonitor #369","service":"monitor","timestamp":"2024-06-15T01:11:18.851Z","url":"https://sourcify.dev/server/"}

manuelwedler commented 2 months ago

I think the cause of this could actually be the server. Might be the same issue with the db as the there is no unique or exclusion constraint matching the ON CONFLICT specification errors we are currently seeing.

dreadedhamish commented 2 months ago

I think the cause of this could actually be the server. Might be the same issue with the db as the there is no unique or exclusion constraint matching the ON CONFLICT specification errors we are currently seeing.

I thought there might be more going on as it isn't even resolving ${this.address} and ${sourcifyServerURL}

kuzdogan commented 2 months ago

I couldn't find any logs with this address. Do you maybe have more recent ones? My guess is it could be a 504 Timeout from the server. Is this the full log? I'd have expected the response content in the log

kuzdogan commented 2 months ago

Closing due to inactivity. Feel free to open if the issue persists.