Skip to content

sync: SVS v3 large-group revision (mhash, PARTIAL, announce+pull)#190

Open
Taranum01 wants to merge 7 commits into
named-data:psvsfrom
Taranum01:svs-exploration
Open

sync: SVS v3 large-group revision (mhash, PARTIAL, announce+pull)#190
Taranum01 wants to merge 7 commits into
named-data:psvsfrom
Taranum01:svs-exploration

Conversation

@Taranum01

Copy link
Copy Markdown

Summary

Implements the SVS v3 large-group revision (approved by Tianyuan Yu): inline FULL/PARTIAL sync, membership hash (mhash), and announce+pull recovery via published full vectors at 32=sv/<version>.

Event size ≤ threshold size > threshold
Publication Inline FULL Inline PARTIAL
Periodic sync Inline FULL Announce + pull
mhash mismatch Pull or sender announce Pull or sender announce

Backward compatible: SyncVectorThreshold defaults to 0 (unlimited → inline FULL only, same as current SVS v3 + mhash on wire). Large-group modes activate only when the threshold is set.

Main changes

  • TLV: MemberSetHash, VectorType, SvsDataRef on SvsData (std/ndn/svs/v3)
  • Core: ComputeMhash, PARTIAL encode, publish at 32=sv, announce-only Sync, pull + merge (std/sync)
  • Example: std/examples/svs/large-sync (--threshold, --debug for wire-mode logs)
  • Tests: unit + in-process multi-node integration (std/sync/*_test.go)

Open item

Mixed-version interoperability (revised vs plain SVS v3 peers in one group) — spec §10; not addressed in this PR.

Test plan

  • go test ./std/sync/...
  • go test ./std/...
  • NFD smoke: 3× large-sync --debug --threshold=80 on /ndn/svs/{alice,bob,carol} with multicast on /ndn/svs

Made with Cursor

Implements the approved large-group SVS revision with backward-compatible
defaults (SyncVectorThreshold=0). Adds mhash and PARTIAL/announce+pull paths,
32=sv publish/pull recovery, tests, and a large-sync example.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Taranum01 Taranum01 changed the base branch from main to psvs June 29, 2026 17:07
Taranum Wasu and others added 6 commits June 29, 2026 22:43
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop blind pulls to unpublished 32=sv prefixes on inline FULL mhash
mismatch (spec §5.6: merge inline first). Clone SvMap before encoding
outside the mutex to avoid concurrent map mutation panics.

Co-authored-by: Cursor <cursoragent@cursor.com>
DV prefix-table SVS uses default SyncVectorThreshold=0. Recovery was
still forcing announce-only sync on mhash mismatch, breaking step-2
prefix propagation while router reachability looked fine. Gate large-group
recovery behind threshold > 0 for true legacy behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
DV prefix-table sync uses default threshold 0. Emit StateVector-only
SvsData (no mhash/VectorType) so step-2 SVS matches pre-revision behavior
on the wire while large-group features stay behind threshold > 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds topo.min.conf (6 nodes) and make e2e-local for reliable local
validation on Mac Docker/Colima. Full sprint topo remains make e2e for CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Publish the revision spec alongside the std/sync implementation in PR named-data#190.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant