lighthouse
lighthouse copied to clipboard
stack overflow when running `overflow_cache_test_state_cache` in debug
Description
Getting this error when running cargo test
from the root directory:
thread 'tokio-runtime-worker' has overflowed its stack
Reproduced with cargo nextest
as well. It doesn't occur on CI, but on our laptops. i think it may be due to different platform max stack size defaults.
The failing test identified is overflow_cache_test_state_cache
Based on this comment, we might be able to get rid of this test once the state cache is removed in da checker:
// THIS TEST CAN BE DELETED ONCE TREE STATES IS MERGED AND WE RIP OUT THE STATE CACHE
The root cause of the stack overflow seems to be in the blob conversion here: https://github.com/sigp/lighthouse/blob/969d12dc6f4b1162a9b75c7f6801415a39ed8eea/beacon_node/beacon_chain/src/kzg_utils.rs#L32
Not sure if there's an easy way around it given that the KZG library accepts Blob
containing an owned array. It would be nice if it accepts refs like the peerdas KZG lib, so it doesn't require making a copy of the bytes (which will likely be unfeasible when we increase the blob count)
Version
5.2.1+ (current unstable
branch)