-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync v2 #272
Comments
…5264) long term solution for sync protocol limits is to refactor code to use stream and enforce limits in a way that doesn't require re-compilation (spacemeshos/pm#272). for cache size, we will soon switch to smarter cache in atxsdata module, but until then we have to keep all atxs in memory.
…5264) long term solution for sync protocol limits is to refactor code to use stream and enforce limits in a way that doesn't require re-compilation (spacemeshos/pm#272). for cache size, we will soon switch to smarter cache in atxsdata module, but until then we have to keep all atxs in memory.
@lrettig: Requests for layer data comes in bursts, roughly every 5 minutes. For recent layers (yellow - recent 10 layers) this is OK, but for older layers (other colours, e.g. blue - last 2000 layers) this should be more evenly spread out to avoid spikes of requests / traffic that could be spread across a larger timeframe. |
very good summary from @fasmat that's exactly what it is. X time, Y number, colors, and legend "layers behind CurrentLayer at the time of asking. |
Current code related to synvc2 effort is here: spacemeshos/go-spacemesh#5769 There's also another proposal of a potentially simpler sync approach, but it makes an assumption that transferring e.g. a month worth of ATX IDs is and always will be cheap, and while this assumption may (or may not) hold for a while for a while after the ATX merge, it is not guaranteed to hold in the long run |
In order to improve the efficiency of the set reconciliation algorithm, we need |
After research discussion: |
Current progress: the multipeer reconciliation code has been added with support for both split-sync ("serve") and full-sync mode.
|
Pairwise sync part: spacemeshos/go-spacemesh#6350 |
Updated issue description for easier tracking of this issue. |
Description
syncv2
protocol uses recursive set reconciliation to make sure the nodes are always in sync.It will replace existing sync, providing the following benefits:
ax/1
epoch queriesThe plan is to use
syncv2
for ATXs only initially, later adding support for malfeasance proofs, then extending the use of the protocol to active set synchronization, etc.The recursive set reconciliation protocol is based on Range-Based Set Reconciliation paper by Aljoscha Meyer.
The multi-peer reconciliation approach is loosely based on SREP: Out-Of-Band Sync of Transaction Pools for Large-Scale Blockchains paper by Novak Boškov, Sevval Simsek, Ari Trachtenberg, and David Starobinski.
Full description of the syncv2 protocol
TODO
syncv2
servers on mainnetsyncv2
for mainnetsyncv2
to distribute active sets instead of sending them as the whole blobOriginal issue contents
this is a placeholder (not a spec) for all known sync improvements:
this was implemented way before project switched to libp2p and had other requirements in mind. right now this code has no benefits.
the goal is to have implementation that makes good use of hardware resources:
limited by network throughput it can get from peers. good metric is how fast state is synced based on total throughput it can get from peers. for example if it can get 10MB/s from peers and total unique data is 1GB, then whole sync should take ~100s
downloading data should not be blocked by validation and writing to disk. this is straighforward to solve with pipelining, but will require some changes in a way sync interacts with validators
dos resistance
current implementation lacks protection against abuse. some queries are expensive and we should rate limit them in a way that allows honest nodes to get data that they need, and prevents abusers from causing harm.
additionally every sync endpoint should be fuzzed. it needs to be taken into account when writing code for it.
existing implementation may miss out of order data. this is required long term for consensus correctness.
the implementation idea was to index data by received timestamp, and send such data to peers according to the timestamp.
from that list above it will be good implement 3 first items within 3 months. 4th item in 6 month or so
The text was updated successfully, but these errors were encountered: