Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b8bf044
feat: rendezvous protocol full implementation
vasco-santos May 20, 2020
d7290df
chore: interface-peer-discovery compliance
vasco-santos Jul 10, 2020
b080670
feat: garbage collector
vasco-santos Jul 13, 2020
ebb22d1
feat: cookie for discovery
vasco-santos Jul 13, 2020
9765a95
chore: cleanup
vasco-santos Jul 15, 2020
b6edaf3
chore: update aegir
vasco-santos Jul 17, 2020
0e304f9
chore: convert to seconds in the wire
vasco-santos Jul 17, 2020
b248924
chore: remove unregister comments for response
vasco-santos Jul 20, 2020
47641f7
feat: use signed peer records to exchange multiaddrs
vasco-santos Jul 22, 2020
b668c8a
chore: tests
vasco-santos Jul 22, 2020
7e3c541
chore: change readme
vasco-santos Jul 27, 2020
1a1590d
chore: update deps
vasco-santos Sep 22, 2020
b357829
chore: remove peer discovery interface as we will be creating libp2p.…
vasco-santos Sep 22, 2020
4abd363
chore: use uint8array instead of buffer
vasco-santos Sep 22, 2020
7763df2
chore: update libp2p integration doc
vasco-santos Sep 28, 2020
63d607b
chore: fix register ttl param return
vasco-santos Sep 28, 2020
5f45c6f
chore: update docs
vasco-santos Sep 29, 2020
640b64f
chore: remove enabled property from libp2p integration doc
vasco-santos Oct 5, 2020
8f6e148
chore: apply suggestions from code review
vasco-santos Nov 16, 2020
894ad2e
chore: separate server and client rendezvous
vasco-santos Nov 17, 2020
ee10d69
chore: add docker
vasco-santos Nov 17, 2020
3798fbb
fix: changed default values and moved them into the server with prope…
vasco-santos Nov 17, 2020
cdf2f6b
chore: update docs and constants
vasco-santos Nov 17, 2020
9fe0691
chore: add tests for protocol with direct connection to server
vasco-santos Nov 18, 2020
52fa2bd
chore: DoS protection with max registrations
vasco-santos Nov 19, 2020
06d53ac
chore: refactor client
vasco-santos Nov 21, 2020
d501d97
chore: add datastore and types
vasco-santos Dec 8, 2020
a2d5f83
chore: fix build
vasco-santos Dec 13, 2020
83cd4b7
chore: run with mysql
vasco-santos Dec 21, 2020
9b294f5
feat: gc
vasco-santos Dec 24, 2020
9bf5bcb
chore: add gc tests
vasco-santos Dec 24, 2020
7a569c7
chore: review docs and binary
vasco-santos Dec 24, 2020
c297156
chore: add datastore docs and model picture
vasco-santos Dec 28, 2020
e1cd224
chore: add library docs
vasco-santos Dec 28, 2020
264ce2a
chore: add docker setup docks
vasco-santos Dec 28, 2020
01ec7bc
chore: remove client code and move server into src
vasco-santos Jan 4, 2021
5f025d3
chore: use connection pool
vasco-santos Jan 11, 2021
2840251
fix: bin stdout addresses and ports correctly
vasco-santos Jan 15, 2021
9da390f
chore: add benchmarks
vasco-santos Jan 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: convert to seconds in the wire
  • Loading branch information
vasco-santos committed Jul 17, 2020
commit 0e304f962688dfa322b019ee1facfb500e0ed009
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class Rendezvous {
addrs
},
ns,
ttl // TODO: convert to seconds
ttl: ttl * 1e-3 // Convert to seconds
}
})

Expand All @@ -253,7 +253,7 @@ class Rendezvous {
throw new Error('unexpected message received')
}

return recMessage.registerResponse.ttl // TODO: convert to ms
return recMessage.registerResponse.ttl * 1e3 // convert to ms
}

for (const id of this._rendezvousPoints.keys()) {
Expand Down Expand Up @@ -331,7 +331,7 @@ class Rendezvous {
id: PeerId.createFromBytes(r.peer.id),
multiaddrs: r.peer.addrs && r.peer.addrs.map((a) => multiaddr(a)),
ns: r.ns,
ttl: r.ttl
ttl: r.ttl * 1e3 // convert to ms
})

// Local search if Server
Expand Down
2 changes: 1 addition & 1 deletion src/server/rpc/handlers/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = (rendezvousPoint) => {
id: r.peerId.toBytes(),
addrs: r.addrs
},
ttl: r.expiration - Date.now()
ttl: (r.expiration - Date.now()) * 1e-3 // convert to seconds
})),
status: RESPONSE_STATUS.OK
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/rpc/handlers/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = (rendezvousPoint) => {
msg.register.ns,
peerId,
msg.register.peer.addrs,
msg.register.ttl
msg.register.ttl * 1e3 // convert to ms
)

return {
Expand Down