ethereumjs-monorepo
ethereumjs-monorepo copied to clipboard
VM: blake2f() precompile test hangs in Firefox
In the karma test runner, the blake2f() function hangs in Firefox. The tests for F() below it work fine.
It is not immediately obvious to me what could be going wrong, especially because the precompile doesn't seem to rely on any special external crypto module or anything other than BN.
There are some pretty heavy Blake2f tests on our suite. I would first check if the same tests take long in Chrome, so we might want to adjust timeouts. It's not uncommon to see SpiderMonkey and Webkit performing differently under the same workload.
The other hypothesis, is that whenever a script takes too much resources from FF, the browser prompts the user if they want to stop or continue. I suspect the script execution is halted when the prompt appears. So we should either:
- Find ways to "smoothen out" the way for FF to consume the script
- Have a way to click on Continue in that prompt
- Remove such tests from FF test suite (that would be unfortunate)
Someone should give this another test run on occasion.
yes this would be nice to see if it is still an issue, the test is skipped in Firefox with this code here:
https://github.com/ethereumjs/ethereumjs-monorepo/blob/c8fecf712c5983b18c8b465ed9979888b2daa191/packages/vm/tests/api/istanbul/eip-152.spec.ts#L84-L87