Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

sourcify fails with 500 error code #197

Closed
d10r opened this issue Mar 29, 2023 · 9 comments · Fixed by #199
Closed

sourcify fails with 500 error code #197

d10r opened this issue Mar 29, 2023 · 9 comments · Fixed by #199
Labels
bug Something isn't working

Comments

@d10r
Copy link
Contributor

d10r commented Mar 29, 2023

I just tried to verify a new set of contracts across 8 chains using v0.6.0 of the plugin.
All requests to etherscan-ish instances succeeded while all requests to sourcify failed.
This problem persists over days now.
Attached is the debug output for one of them.
sourcify_500.txt

@d10r d10r added the bug Something isn't working label Mar 29, 2023
@rkalis
Copy link
Owner

rkalis commented Apr 2, 2023

Hmm. Since this issue only appears for Sourcify (with a status code 500), I'm tagging @marcocastignoli to see if he knows what might be the issue here.

@marcocastignoli
Copy link

@d10r hey can you please try to verify the contracts directly using the UI? https://sourcify.dev/#/verifier

@kuzdogan
Copy link
Contributor

kuzdogan commented Apr 6, 2023

I was able to verify the contract on our staging server: https://staging.sourcify.dev/#/lookup/0x1BD3b6522102F9ea406807f8ecaeB2D96278a83f but it fails on production.

The staging works because we now make use of the immutableReferences output of the compiler to leave out the values of the immutables ethereum/sourcify#973. This highly improved our chances of verification and will go with the next release. 🙂

@d10r
Copy link
Contributor Author

d10r commented Apr 6, 2023

thx @kuzdogan !

Request failed with status code 500
Failed to connect to Sourcify API at url https://sourcify.dev/server/

Would it be possible to provide some more info on what went wrong when something goes wrong? Is that currently a limitation of the sourcify API or of the plugin?

@kuzdogan
Copy link
Contributor

kuzdogan commented Apr 7, 2023

I see the plugin does not provide the server response to the user and only Request failed with status code 500. That can be an improvement. In that case, for example, you'd get "Deployed bytecode and recompiled bytecode don't match" or if there has been a compiler error etc. it will be sent by the server.

@kuzdogan
Copy link
Contributor

Opened a PR to return the server response #199

Do you have the project repo public @d10r ? If so I'd like to test it for your case

@d10r
Copy link
Contributor Author

d10r commented Apr 12, 2023

@kuzdogan
Copy link
Contributor

Thanks I got the response without --debug:

$ XDAI_MNEMONIC=<redacted> XDAI_PROVIDER_URL=https://rpc.gnosischain.com/ npx truffle run --network xdai-mainnet verify Superfluid@0x1BD3b6522102F9ea406807f8ecaeB2D96278a83f --verifiers=sourcify
Verifying contracts on sourcify
   Verifying Superfluid@0x1BD3b6522102F9ea406807f8ecaeB2D96278a83f
   Request failed with status code 500
   Response from https://sourcify.dev/server/:
   {"error":"Hardfork paris not set as supported in supportedHardforks"}
   Sourcify verification failed at https://sourcify.dev/server/
   Failed to verify 1 contract(s): Superfluid@0x1BD3b6522102F9ea406807f8ecaeB2D96278a83f

@rkalis
Copy link
Owner

rkalis commented Apr 24, 2023

Just published v0.6.3 which now does a better job at conveying these error messages. I reckon that Sourcify has also been updated since this issue was opened. If not, it will likely be updated soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants