ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

VM: blake2f() precompile test hangs in Firefox

Open ryanio opened this issue 5 years ago • 3 comments

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.

ryanio avatar Sep 22 '20 04:09 ryanio

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)
image

evertonfraga avatar Sep 22 '20 16:09 evertonfraga

Someone should give this another test run on occasion.

holgerd77 avatar Jan 13 '22 18:01 holgerd77

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

ryanio avatar Jan 13 '22 20:01 ryanio