feat: improve range sync in fulu
Motivation
- stablize range sync and add metrics to it
Description
- should not do a range sync with peer that has lower target slot than the one in batch
- from fulu, we care about custody columns to pick a good peers
- switch from the most common target to highest target, see this for more context
- more metrics: how many peers per column in SyncChain
- more unit tests for PeerBalancer
Testing
- [x] synced from a stopped mainnet node
- [ ] waiting for
peerdas-devnet-7to test
blocked by https://github.com/ChainSafe/lodestar/issues/7754
There is a bug from earliestAvailableSlot that should get addressed by this PR
https://github.com/ChainSafe/lodestar/pull/7959#discussion_r2162626526
convert to draft as we'll need a PR for fusaka-devnet-2, need to test te/sync_pick_good_peers_fusaka_devnet_2
tested successfully on fusaka-devnet-2, see https://github.com/ChainSafe/lodestar/pull/8029#issue-3192494519
I notice that there are still some hiccup when syncing, need to also recover columns when syncing like in #7940
Codecov Report
Attention: Patch coverage is 66.90647% with 46 lines in your changes missing coverage. Please review.
Project coverage is 54.24%. Comparing base (
d30e8de) to head (15d77ec). Report is 1 commits behind head on peerDAS.
Additional details and impacted files
@@ Coverage Diff @@
## peerDAS #7746 +/- ##
=========================================
Coverage 54.24% 54.24%
=========================================
Files 844 844
Lines 62606 62710 +104
Branches 4707 4723 +16
=========================================
+ Hits 33960 34018 +58
- Misses 28573 28618 +45
- Partials 73 74 +1
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
:tada: This PR is included in v1.34.0 :tada: