Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Verify contracts on Sourcify by default #4944

Closed
kuzdogan opened this issue May 15, 2023 · 8 comments · Fixed by #9630
Closed

Feature: Verify contracts on Sourcify by default #4944

kuzdogan opened this issue May 15, 2023 · 8 comments · Fixed by #9630
Assignees
Labels
A-compatibility Area: compatibility A-extensions Area: extensions A-verification Area: verification Cmd-forge-verify Command: forge verify-contract/check T-feature Type: feature T-post-V1 Area: to tackle after V1

Comments

@kuzdogan
Copy link

kuzdogan commented May 15, 2023

Component

Forge

Describe the feature you would like

I'm suggesting Foundry to verify contracts on Sourcify by default on forge create --verify or forge verify-contract, event without --verification-provider sourcify or --verifier sourcify.

IMO contracts should be verified everywhere and not Etherscan only. I am suggesting Foundry verifies the contracts on Sourcify alongside Etherscan unless another verifier is explicitly stated with --verifier or --verification-provider. Since Sourcify does not require an API key, it can be enabled by default.

Disclaimer: I am working on the project Sourcify

@kuzdogan kuzdogan added the T-feature Type: feature label May 15, 2023
@gakonst gakonst added this to Foundry May 15, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry May 15, 2023
@iainnash
Copy link
Contributor

Would be great to allow parallel verification (maybe comma between providers or --disable-sourcify).

@CodeSandwich
Copy link
Contributor

One more point, Sourcify is the better default, because it works without being logged in. The current default is to require passing an Etherscan API key, to NOT need it you need to pass a --verifier sourcify parameter.

@kuzdogan
Copy link
Author

Hey :) Can I bump this

@zerosnacks zerosnacks added A-compatibility Area: compatibility Cmd-forge-verify Command: forge verify-contract/check labels Jul 2, 2024
@zerosnacks
Copy link
Member

zerosnacks commented Jul 2, 2024

Hi @kuzdogan,

Generally supportive of the idea but given the amount of time it usually takes to verify these contracts I think it is unreasonable to enable multi-vendor verification by default. Ideally Foundry would be able to interface with a single API and then verify once, having that API distribute the verification to the different vendors.

IIRC there was a sort of collective of verified source code hosts planning to do something like this but I cannot find the name or reference.

A good reference for model like this is could be https://docs.flashbots.net/flashbots-protect/mev-share#examples / https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions where users just interact with rpc.flashbots.net/fast and then the API shares it with all registered builders.

Sourcify is in a good spot to propose something like this, if it isn't doing it already.

@zerosnacks zerosnacks added the A-extensions Area: extensions label Jul 2, 2024
@iainnash
Copy link
Contributor

iainnash commented Jul 2, 2024 via email

@kuzdogan
Copy link
Author

kuzdogan commented Jul 2, 2024

Hi @kuzdogan,

Generally supportive of the idea but given the amount of time it usually takes to verify these contracts I think it is unreasonable to enable multi-vendor verification by default. Ideally Foundry would be able to interface with a single API and then verify once, having that API distribute the verification to the different vendors.

Hey thanks for the response! Do you mean verification times in general or Sourcify specifically? Admittedly our infra is not doing well in terms of speed, but we're moving and hopefully in a few weeks we'll be more responsive.

One additional consideration here is that our current API does not have a ticketing/receipt system and the requests hang until the verifications complete. This is quite suboptimal but that's something we inherited from the old codebase but will be different in our v2 API.

IIRC there was a sort of collective of verified source code hosts planning to do something like this but I cannot find the name or reference.

Yes you are referring to Verifier Alliance :) We're part of the collective. The shared database is still in the making. The idea there is that each Verifier pushes the contracts they receive to the DB. So it wouldn't matter if you verify on Sourcify, Blockscout or Tenderly.

A good reference for model like this is could be https://docs.flashbots.net/flashbots-protect/mev-share#examples / https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions where users just interact with rpc.flashbots.net/fast and then the API shares it with all registered builders.

Sourcify is in a good spot to propose something like this, if it isn't doing it already.

Yes we are actually considering pushing automatically to Etherscan if a contract gets verified on us. A lot of people have been asking this and it's been a common misconception. For us, the more verifiers have the contract, the better.

Also we are building a "unified" verification plugin in Remix in this direction. ethereum/sourcify#1331 Instead of "Etherscan" "Sourcify" plugins where will be a single verification plugin that supports all, and by default submit to verification on all of them.

@zerosnacks zerosnacks added the A-verification Area: verification label Jul 5, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@grandizzy grandizzy removed this from the v1.0.0 milestone Oct 8, 2024
@grandizzy grandizzy added the T-post-V1 Area: to tackle after V1 label Oct 8, 2024
@kuzdogan
Copy link
Author

kuzdogan commented Nov 27, 2024

Hello again, is there any progress on this?

In the meantime, we released the "unified" Remix plugin in the same manner: https://x.com/SourcifyEth/status/1849450860600021229

If you need any help or input from our side please let me know.

@yash-atreya yash-atreya self-assigned this Jan 6, 2025
@yash-atreya yash-atreya moved this from Todo to Ready For Review in Foundry Jan 6, 2025
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Foundry Jan 7, 2025
@kuzdogan
Copy link
Author

kuzdogan commented Jan 7, 2025

Amazing! Thanks a lot

Just, can't we still keep Sourcify verification on, even when the Etherscan api keys are passed?

In the Remix plugin above, the rationale is that by default you verify it everywhere, unless you explicitly turn off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compatibility Area: compatibility A-extensions Area: extensions A-verification Area: verification Cmd-forge-verify Command: forge verify-contract/check T-feature Type: feature T-post-V1 Area: to tackle after V1
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants