Isolated comparison between the current Rust Kad or ED2K runtime and the local
stock eMule community-0.60 analysis tree.
Reference anchors used for this review:
- Kad:
Kademlia/net/KademliaUDPListener.cpp,Kademlia/kademlia/Indexed.cpp,Kademlia/routing/RoutingZone.cpp,Kademlia/routing/RoutingBin.cpp,Kademlia/net/PacketTracking.cpp - ED2K:
BaseClient.cpp,DownloadClient.cpp,UploadQueue.cpp,ServerConnect.cpp,ServerSocket.cpp
| Area | Current status | Stock eMule comparison |
|---|---|---|
| Kad packet families | Close to oracle | Search, source, notes, and publish packet families are aligned closely enough for protocol work. |
| Kad routing | Close to oracle | Split rules and per-bin or per-subnet limits now track RoutingZone.cpp and RoutingBin.cpp closely. |
| Kad packet tracking | Close to oracle with one local extension | Request budgets match PacketTracking.cpp; Overlord keeps a separate relaxed SearchRes budget for harvest traffic. |
| Kad passive replay shape | Better than previous docs claimed | The snoop queue now preserves start_position, restrictive keyword payloads, and source or notes size; the old target-only doc claim was stale. |
| ED2K server session | Partial but credible | Login, keepalive, HighID or LowID handling, keyword search, source search, and callback-aware source decoding are implemented. |
| ED2K downloader | Partially aligned | Startup ordering is much closer to stock eMule, and the Rust runtime now keeps an adaptive rolling block window, but scheduler scope is still materially simpler. |
| ED2K listener or upload queue | Materially different | Verified-range serving and queue ranks exist, and the first score-ranked queue slice is implemented, but durable credits, real file priority, slot rotation, and harness/live queue evidence remain open. |
| ED2K notes | First active slice wired | ED2K-labeled notes search now reuses the stock-aligned Kad notes transport; richer note-author result modeling remains separate backlog work. |
Areas that are now close to stock eMule:
overlord-kad-proto/src/packet.rsmatches the stock search, source, notes, and publish wire families used fromKademlia/net/KademliaUDPListener.cpp.overlord-kad-routing/src/zone.rsandsrc/bin.rsnow follow the stock split predicate fromRoutingZone.cpp CanSplitplus the per-bin clustering limit enforced inRoutingBin.cpp AddContact.overlord-kad-net/src/tracker.rsmirrors the stock per-opcode request budgets fromPacketTracking.cppfor bootstrap, hello, find-node, search, publish, firewall, buddy, callback, and ping traffic.overlord-kad-dht/src/traversal.rsregisters peer identity before outbound search traffic and caps phase-2 fanout at the closestK, which is consistent with the stock jump-start search shape.
Intentional or accepted differences:
overlord-kad-dht/src/search.rs is_acceptable_keyword_resultis repo policy, not a direct port of the stock local keyword filtering inKademlia/kademlia/Indexed.cpp.overlord-kad-net/src/tracker.rsadds a separate relaxedSearchResbudget so harvest traffic is not clipped by the generic incoming flood bucket.
Remaining Kad parity gaps:
overlord-agent-emule/src/agent.rsrecords restrictive keyword searches, but local store replies still serve only the non-restrictive subset.- notes search is wired for Kad, but distinct-note-author modeling remains lighter than the stock indexer behavior.
Areas that are currently credible against stock eMule:
overlord-agent-emule/src/ed2k_server.rsimplements the core long-lived server session needed forOP_LOGINREQUEST,OP_OFFERFILESkeepalive,OP_IDCHANGE, keyword search, source search, and callback-aware source decoding, which covers the parts ofServerConnect.cppandServerSocket.cppthat matter for the current agent workflow.overlord-agent-emule/src/ed2k_tcp.rsfollows the observed startup orderHELLO -> HELLOANSWER -> secure-ident -> REQUESTFILENAME -> SETREQFILEID -> HASHSETREQUEST/ANSWER -> STARTUPLOADREQ -> ACCEPTUPLOADREQ -> REQUESTPARTS, which is much closer to the stockBaseClient.cppplusDownloadClient.cpppath than the earlier minimal implementation.- secure-ident request, public-key exchange, queue-rank handling, resumed piece verification, split part frames, and compressed part frames are all modeled in the current Rust runtime.
Verified differences against stock eMule:
overlord-agent-emule/src/ed2k_transfer.rsnow has a deterministic score-ranked queue slice with friend-slot boost, LowID penalty, duplicate reconnect refresh, and a file-priority hook. Stock eMuleUploadQueue.cppstill goes further with durable credit inputs, real file priority, duplicate and IP suppression inAddClientToQueue, and slot rotation withCheckForTimeOver.overlord-agent-emule/src/ed2k_tcp.rsnow keeps an adaptive pending-block window with rolling refills and safe teardown for malformed or out-of-order replies, but stock eMuleDownloadClient.cpp CreateBlockRequestsandSendBlockRequestscouple that scheduler to the wider pending-block list, download-rate, and A4AF behavior.overlord-agent-emule/src/ed2k_server.rsis intentionally narrower than the fullServerSocket.cppfeature surface. It does not claim full stock eMule coverage outside the targeted login, search, and source-search flow.- active ED2K notes search is wired through the Kad notes transport, but note-author result modeling remains file-centric.
- callback coverage remains narrower than stock
BaseClient.cpp TryToConnect, which spans direct TCP, direct UDP callback, server callback, Kad callback, and wait or abort branches.
- Kad protocol work is no longer the main parity risk. Most remaining Kad differences are deliberate repo policy or live-acceptance tuning.
- The biggest stock-eMule delta is now ED2K peer behavior, not Kad wire encoding.
- The highest-value ED2K parity upgrade is closing the same-server large-file source-discovery blocker for the AICH realnet gate. After that, finish credit aware queueing and carry the adaptive downloader window through fuller eMule-style A4AF and file-selection parity.
- The doc set previously understated passive Kad replay fidelity. That has been corrected in the current tracked docs.