-
Notifications
You must be signed in to change notification settings - Fork 478
[draft]Flag for throw on partial match #2198
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
Conversation
Hi and thanks for the PR :) The idea looks good to me but this is only covering one of these two cases:
Which one do you need? Both? The code as is does not work because you are not providing the I also notice our test case only covers the case 2 above and not 1. We need a test case for this too. Also curious about your use case. Are you running your self-hosted Sourcify and what purposes? Why do you need the verification job to return a success when the match does not improve? We're always looking into understanding how people use Sourcify behind the scenes. |
Hi thanks for the comments. I think we need both cases, we always want to retry the actual verification, then only store if improving the match. Will update the PR with the implementation comments. The reason we want to do this is at some frequency internally we want to reverify all our contracts against the original source repo (using a self hosted sourcify instance). If a developer modified the source code before the original verification slightly then with the current system when we reverify the contract would already be marked as verified as so sourcify would not retry the verification iiuc. It is also slightly hard for us to just download the source code of the verified contract as we change the contract name with each deploy so would have to add logic to account for this. I think there are other ways of getting around this, but generally we would like to just ensure the bytecode deployed matches the source repo whenever we need to. |
Reading through now realised a couple of things.
I though I was doing this in line 157 of In terms of the second case, rerunning verification if a full match exists. iiuc the Apologies not particularly familiar with typescript. |
Can you reach out to me so I can ask more questions :) same username on all platforms and @kuzdogan:matrix.org on Matrix. |
Yes so
You can pass this config as a request variable similar to these and call as such: Then if it's both
Happy to help! As said we can also implement this if you ever feel it's too much but if you want go for it! |
…am/sourcify into throw-on-partial-match
Is this still needed? |
closing due to inactivity |
For our use case we want to be able to ensure its possible to check contracts pass verification even if the contract has already been verified and stored in the database. Not sure if this is a use case others may share or not. Also not sure that this is the best way to go about this.
This PR adds a flag to config that allows for disabling the exception thrown if a match already exists for a contract (at the same verification level).
If the flag is disabled then the reverification will pass, (but wont update the database).