Skip to content

[Network] Add: join/repair Event variants and payload structs #84

Closed

Description

@thep2p

Summary

Add the 8 new Event variants and their payload structs needed for join and repair messaging, per docs/protocol/concurrent-insert.md, Section 2.

Scope

  • src/network/mod.rs — Event gains: GetMaxLevelOp, RetMaxLevelOp, GetNeighborOp, RetNeighborOp, GetLinkOp, SetLinkOp, BuddyOp, CheckNeighborOp.
  • src/core/model/join.rs (new) — the 8 request/response structs, with fields per Section 2's table in docs/protocol/concurrent-insert.md.
  • src/core/model/mod.rs, src/core/mod.rs — module wiring and re-exports.

Acceptance Criteria

  • All 8 variants and their payload structs exist with the exact fields specified in docs/protocol/concurrent-insert.md, Section 2.
  • Direction/side semantics are documented as receiver-owned, not hop-relative (per Section 2).
  • Crate builds; existing tests unaffected.
  • No new tests required for pure data types — matches this crate's existing convention for IdSearchReq/IdSearchRes, which also has no test file.

Dependencies

None.

Related

This design line supersedes the lock-based design in #77, including the lock-based concurrent-join follow-up that #66 defers to #77.

Dependency graph (unblocked first):
EPIC #81 -- local search & join protocol
  #67 [DONE] search_by_id            #71 [OPEN] search_by_mem_vec (independent)
  #74 [OPEN] search_by_id timeout fix   #76 [OPEN] delete/leave
  Concurrent join + repair (Algorithm 2 + Algorithm 8; supersedes closed #66, #77):
    L0 (no deps):         #84 <-- YOU ARE HERE  #85  #93  #86  #87
    L1:                   #94  #88  #89
    L2:                   #90  #91  #95  #96
    L2.5 (link round-trip follow-ups; #146 blocks #92): #145  #146
    L2.5 (stage-1 concurrent-join fix; blocked by #90, blocks #97): #148
    L3:                   #92
    L4 (acceptance gate): #97
    L5 (post-gate cleanup; also blocked by #76): #100
  Test-suite cleanup, blocked by #90:
    #147
  Test infrastructure, mock network hub (#62's latency simulation builds on #149's queue):
    #149 (blocked by #90, blocks nothing)
    #62 (no blocker)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions