Open lyfsn opened 1 month ago
Can you share genesis file you are using?
Can you share genesis file you are using?
In my test environment, I generate a random genesis file every time using this script, which creates many accounts in one genesis file.
For a quick test, this is a larger than 800MB genesis file of Endurance's mainnet. You could also try using this file: (But I haven't tried this file to see if it will produce the error. My error comes from the script method mentioned above.) https://github.com/OpenFusionist/network_config
hi @LukaszRozmej For the above mentioned performance regression, I've done a further investigation and have some conclusions and points I'd like to further discuss
Regarding the performance issue: PR: https://github.com/NethermindEth/nethermind/pull/7215 was a performance optimization that replaced LruCache with ClockCache to reduce lock granularity. However, due to implementation details, it caused a regression that led to timeout issues when initializing large genesis files (>800M). The latest commit (60159fb448d5b7fd53565aa7b15942a8c68614ba) appears to have fixed this issue based on our tests.
Issue identification method:
Regarding the 40s hard-coded timeout: this has been previously discussed.Related PR: https://github.com/NethermindEth/nethermind/pull/6160. We can further discuss this issue:
It's up for discussion if we want to increase the timeout from 40 seconds (current default, hard-coded value) to something different.
Let me know if you need any additional information or clarification on this matter.
@ohko4711 thank you for the analysis. #7215 might have some unplanned effect though https://github.com/NethermindEth/nethermind/commit/60159fb448d5b7fd53565aa7b15942a8c68614ba shouldn't affect genesis based on the code, so not sure if it was this that could fix it. @benaadams can you check, both are your changes.
I will move the timeout to config though.
Description Our custom network uses a large 1GB genesis.json file, and it worked fine with versions before 1.28.0, such as 1.27.x.
However, after upgrading to version 1.28.0, my Nethermind node can't start and encountered this error:
Steps to Reproduce
Actual behavior The node can't start and logs a timeout of 40 seconds.
By the way, why is the
40s
timeout hardcoded? https://github.com/NethermindEth/nethermind/blob/e856de5a33259ea0e54c40c28db37631bf56c2c0/src/Nethermind/Nethermind.Init/Steps/LoadGenesisBlock.cs#L23Expected behavior The node can start normally, just like in version 1.27.x.
Screenshots
Desktop (please complete the following information): Please provide the following information regarding your setup:
Additional context In my more precise testing, if the genesis file size exceeds 256MB, the node fails to start and times out while loading the genesis file.
My startup paramaters:
Logs