vyzo
c58ce1f56f
add Close method to memory address book, which cancels the gc process
2019-04-28 12:19:26 +03:00
vyzo
e4cf50160f
periodically schedule gc
2019-04-28 12:17:48 +03:00
vyzo
d0a3cc17f4
don't delete under the read lock
...
let gc clean up the addrs
2019-04-28 11:35:23 +03:00
vyzo
3cd491431b
read/write metadata lock
2019-04-27 22:19:49 +03:00
vyzo
0ddad15bd2
read/write address book lock
2019-04-27 22:19:39 +03:00
Steven Allen
aae59b7403
optimize memory of in-memory peerstore
2019-04-23 00:10:05 -07:00
Adrian Lanzafame
c04ff2d27b
add keybook benchmarks
...
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2018-11-07 15:48:31 +10:00
Steven Allen
588ab36ce8
update to match new ExtractPublicKey API
...
This is a "more correct" API and we might as well fix this before it becomes
used all over the place. The new API returns ErrNoPublicKey when there is no
inlined key.
This *also* fixes a bug where the datastore-backed keystore would panic if
`ExtractPublicKey` returned `nil, nil`.
2018-10-16 11:31:32 +01:00
Steven Allen
68a73712e1
store expiring addrs by pointer
...
Hopefully, this reduces the space wasted by using maps (see the comment in the
committed code).
2018-10-14 15:11:35 +01:00
Steven Allen
6daee68364
memoryAddrBook: document gc precondition
2018-10-03 17:42:54 -07:00
Steven Allen
e3a2970d93
add garbage collection for in-memory peerstore
...
There are better ways to do this but pausing dialing once an hour likely isn't
going to break anything and is the simplest approach.
2018-10-02 10:49:55 -07:00
Steven Allen
6d5cedf098
revert to storing peer addresses in a map
...
We switched to a slice to reduce the amount of memory the peerstore ended up
taking up unfortunately, this really killed us in allocations. Looking at
go-ipfs profiles, I'm worried that memory fragmentation is killing us so I'd
like to revert to the old behavior.
Note: The real solution here is dealing with "address abusers".
2018-10-01 22:16:08 -07:00
Raúl Kripalani
1b72b920ed
datastore-backed impls of KeyBook and PeerMetadata.
2018-09-28 14:04:52 +01:00
Raúl Kripalani
4e0c2169c7
Resolve TODO.
2018-09-12 13:42:26 +01:00
Raúl Kripalani
1b410c7294
Merge branch 'master' into txndatastore
2018-09-11 14:13:14 +01:00
Raúl Kripalani
1c25f160a1
normalise import aliases.
2018-09-07 18:46:23 +01:00
Raúl Kripalani
171f051aa1
add tests for keybook; []peer.ID => peer.IDSlice.
2018-09-07 13:04:14 +01:00
Raúl Kripalani
d79386365e
rename NewPeerstoreWith(...) => NewPeerstore(...); adjust godoc.
2018-09-05 15:14:57 +01:00
Raúl Kripalani
bc77b649dc
rename AddrMgr => AddrBook elsewhere.
2018-09-05 15:10:18 +01:00
Raúl Kripalani
7f4288fab1
rename package mem => pstoremem.
2018-09-04 18:07:44 +01:00
Raúl Kripalani
1b57c62e3d
increase benchmark coverage; introduce config struct.
...
* benchmark caching and cacheless variants of DS addrbook.
* benchmark peers with 1, 10, 100 addrs.
2018-09-07 17:45:29 +01:00