Check if contracts are saved incorrectly with `extra-file-input-bug`
Checking the logs I've encountered couple contracts with logs:
2024-02-16T10:57:17.903Z [Server] [[32minfo[39m]: Storing LendingPool address=0x80692c4719b2aeCC099E2E275db808CCbCBA5A1d chainId=11155111 match runtimeMatch=extra-file-input-bug creationMatch=null
2024-02-16T10:57:16.198Z [Server] [[32minfo[39m]: Storing ImmutableBeaconProxy address=0xeCD55E80cb0969397B6efAd3Cb77cF13080090b6 chainId=42161 match runtimeMatch=extra-file-input-bug creationMatch=null
2024-02-16T10:57:11.672Z [Server] [[32minfo[39m]: Found an extra-file-input-bug for LendingPool on 11155111 at 0x80692c4719b2aeCC099E2E275db808CCbCBA5A1d. Sending to verification again with all source files.
2024-02-16T10:54:40.273Z [Server] [[32minfo[39m]: Storing GenericLogic address=0x44E3E2b7b25cdDbCC34E73d47f7aeefEF86D9642 chainId=11155111 match runtimeMatch=extra-file-input-bug creationMatch=null
2024-02-16T10:54:38.375Z [Server] [[32minfo[39m]: Found an extra-file-input-bug for GenericLogic on 11155111 at 0x44E3E2b7b25cdDbCC34E73d47f7aeefEF86D9642. Sending to verification again with all source files.
Double check if these contracts are saved incorrectly as a contract with such "runtimeMatch" shouldn't be saved
Checking the logs I've encountered couple contracts with logs:
2024-02-16T10:57:17.903Z [Server] [�[32minfo�[39m]: Storing LendingPool address=0x80692c4719b2aeCC099E2E275db808CCbCBA5A1d chainId=11155111 match runtimeMatch=extra-file-input-bug creationMatch=null 2024-02-16T10:57:16.198Z [Server] [�[32minfo�[39m]: Storing ImmutableBeaconProxy address=0xeCD55E80cb0969397B6efAd3Cb77cF13080090b6 chainId=42161 match runtimeMatch=extra-file-input-bug creationMatch=null 2024-02-16T10:57:11.672Z [Server] [�[32minfo�[39m]: Found an extra-file-input-bug for LendingPool on 11155111 at 0x80692c4719b2aeCC099E2E275db808CCbCBA5A1d. Sending to verification again with all source files. 2024-02-16T10:54:40.273Z [Server] [�[32minfo�[39m]: Storing GenericLogic address=0x44E3E2b7b25cdDbCC34E73d47f7aeefEF86D9642 chainId=11155111 match runtimeMatch=extra-file-input-bug creationMatch=null 2024-02-16T10:54:38.375Z [Server] [�[32minfo�[39m]: Found an extra-file-input-bug for GenericLogic on 11155111 at 0x44E3E2b7b25cdDbCC34E73d47f7aeefEF86D9642. Sending to verification again with all source files.Double check if these contracts are saved incorrectly, as a contract with such "runtimeMatch" shouldn't be saved
Hey, after debugging, I found that the contract is not stored in the repository because it checks the runTimeMatch before saving
But it is stored in the database and even called the function to store contracts in the repository.
I have added an error handling when extra-file-input-bug is detected and after re-verification if the runtimeMatch status is extra-file-input-bug, it will throw an HTTP validation error. and to make it easier I have created a log when it is stored to database
Note: I debugged this by just changing the status perfect to extra-file-input-bug and changed creationMatch=null
as I couldn't create the exact contract with that bug
And pull request https://github.com/ethereum/sourcify/pull/1276 which fixes the mentioned issue