Closed ddd-mtl closed 5 years ago
what is the core difference between hack mode and real mode?
@Connoropolous
what is the core difference between hack mode and real mode?
code reuse of dht module for app level dht - should be functionally identical
Made a clone of Hackmode named Realmode which:
PeerId is stored as URL with signPubId :
hc://HcS0yada
Added lots of comments.
N3hRealMode
added _p2pSendAll() helper
On DnaTrack
The peer sends a 'gossipNewTrack' to all the peers it knows. The receiving peers will add that peer to their data DHT of that DNA.
DnaTrack Gossiping
When a peer receives a 'peerConnect' it will send back the list of DNAs it is currently tracking: 'gossipAllTracks' The peer will add that peer to their data DHT(s).
Logging
Added helper functions nick() and me() to have a log friendly format of peerAddress. All logging starts with me() so we can know which peer is doing the log.
N3hMode
Moved _getTransportIdOrFail() to the concret class as implementation is specific now
dht-fullsync
Split _enumerateMissingAddresses into two different functions On 'fetchAddressList' gather all requested data asynchronously by calling
_gatherDataMap
which calls_fetchDataLocal