nimbus-eth1
nimbus-eth1 copied to clipboard
Check stack usage (other than EVM)
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.
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
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.