spacemeshos / go-spacemesh

Go Implementation of the Spacemesh protocol full node. 💾⏰💪
https://spacemesh.io
MIT License
760 stars 211 forks source link

sync2: ATX integration #6448

Open ivan4th opened 1 week ago

ivan4th commented 1 week ago

Motivation

We need more efficient ATX sync.

Description

This adds set reconciliation for ATXs. There are per-epoch syncers, with lower FPTree depth (16 by default) used for older epochs and greater FPTree depth (21 by default) used for current epoch. Both active syncv2 and passive (server-only) syncv2 are disabled by default. It is possible to enable syncv2 in server-only or full (active) mode.

Test Plan

Test on testnet and mainnet nodes

TODO

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 73.73068% with 119 lines in your changes missing coverage. Please review.

Project coverage is 79.8%. Comparing base (0914f1f) to head (bb7226f). Report is 3 commits behind head on sync2/fix-multipeer.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sync2/atxs.go 73.3% 41 Missing and 8 partials :warning:
syncer/syncer.go 73.9% 24 Missing and 7 partials :warning:
sync2/p2p.go 68.1% 13 Missing and 1 partial :warning:
fetch/mesh_data.go 62.9% 10 Missing :warning:
sync2/multipeer/multipeer.go 71.4% 4 Missing and 2 partials :warning:
sync2/multipeer/split_sync.go 78.2% 4 Missing and 1 partial :warning:
fetch/fetch.go 33.3% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## sync2/fix-multipeer #6448 +/- ## ===================================================== - Coverage 79.9% 79.8% -0.1% ===================================================== Files 352 353 +1 Lines 46436 46832 +396 ===================================================== + Hits 37108 37392 +284 - Misses 7223 7322 +99 - Partials 2105 2118 +13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.