status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
523 stars 227 forks source link

inhibit LC sync while DAG is synced #6505

Closed etan-status closed 1 month ago

etan-status commented 1 month ago

Normally, running LC and DAG sync at same time is fine, but on tiny devnet where some peer may not support the LC data, we can end up in situation where peer gets disconnected when DAG is in sync, because DAG sync never uses any req/resp on local devnet (perfect nw conditions) so the LC sync over minutes removes the peer as sync is stuck.

We don't need to actively sync LC from network if DAG is already synced, preventing this specific low peer devnet issue (there are others still). LC is still locally updated when DAG finalized checkpoint advances.

github-actions[bot] commented 1 month ago

Unit Test Results

         9 files  ±0    1 334 suites  ±0   30m 10s :stopwatch: +53s   5 064 tests ±0    4 716 :heavy_check_mark: ±0  348 :zzz: ±0  0 :x: ±0  20 991 runs  ±0  20 587 :heavy_check_mark: ±0  404 :zzz: ±0  0 :x: ±0 

Results for commit 1252b69b. ± Comparison against base commit 485ed833.

etan-status commented 1 month ago

Tested on Holesky with additional trace logging to see that the inhibit fn result is properly computed and honored.