ethereum / sourcify

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

`Maximum call stack size exceeded` when loading solc-json compilers `<0.6.2` in `VerificationService.init()` #1473

Open kuzdogan opened 1 month ago

kuzdogan commented 1 month ago

Discovered on https://github.com/ethereum/sourcify/pull/1465 in the test The downloadFunction for the solc-js compilers getSolcJs fails at the import stage for compilers earlier than 0.6.2. Weirdly this does not happen when the server is started and the compiler is downloaded and loaded for a contract but only on the init stage.

To reproduce:

The test will fail with Maximum call stack size exceeded.

To compare initializing to downloading on the fly when the server runs: