nimbus-eth1 icon indicating copy to clipboard operation
nimbus-eth1 copied to clipboard

Check stack usage (other than EVM)

Open mratsim opened this issue 4 years ago • 2 comments

As shown by https://github.com/status-im/nim-beacon-chain/issues/370#issuecomment-527252425, putting too much data on the stack will have serious impact on the GC as it scans it to find live objects (100x slowdown).

It seems like libsecp256k1 uses the stack a lot as well. The dependency should be updated after https://github.com/bitcoin-core/secp256k1/issues/692 is fixed.

mratsim avatar Nov 10 '19 14:11 mratsim

bitcoin-core/secp256k1#692 only applies to a weird non-defaultconfiguration that I expect nothing is actually using. The library doesn't otherwise use a large amount of information on the stack

gmaxwell avatar Nov 10 '19 18:11 gmaxwell

The stack-scanning done by Nimbus GC does affect nimbus-eth1 when the EVM runs and uses a lot of stack. Recent changes (shown above) have fixed stack usage in the EVM, so this is no longer a problem.

There may be other causes of substantial stack use, e.g. I haven't checked if libsecp256k1 does, mentioned above. Therefore keeping this issue open until that's been checked.

jlokier avatar Apr 27 '21 03:04 jlokier