Closed tayfunelmas closed 3 months ago
Attention: Patch coverage is 82.05128%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 71.80%. Comparing base (
dfd2ca0
) to head (fff0f32
).
Files | Patch % | Lines |
---|---|---|
chain/chain/src/chain.rs | 75.00% | 1 Missing and 6 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This addresses #11702.
The issue happens for forknet and local testing where the network starts from the genesis block and the genesis protocol version supports congestion control. In this case, every time the node restarts, it attempts to re-generate the genesis congestion info. However, this is done using the state roots at genesis; these state roots are garbage collected and causes the bootstrapping to fail.
We fix this by storing the genesis congestion info (CongestionInfo for each shard) in DB. If it exists, the node directly uses it instead of attempting to re-compute it from state roots.
We store the congestion info in BlockMisc column with key
GENESIS_CONGESTION_INFO
.This PR also adds a testloop test to check if the congestion info is saved (and not cleaned up by GC) and re-enables the previously disabled nayducks tests due to this problem.