Commit Graph

45 Commits

Author SHA1 Message Date
Steven Allen
334bc6f886 chore(dep): update deps
* update go-libp2p-core and fix tests for new minimum key size. This slows down
the test but terribly.
* switch to go-multiaddr-fmt
* update the datastore
* update gogo/protobuf
2019-10-28 15:32:22 -07:00
Steven Allen
2fb6d7a48f fix multiple TTL bugs
The first fix independently extends the address expiration time and the address
TTL:

By example:

* We have an address with a TTL of 4s that will expire in 1s.
* We update it with a TTL of 3s.

Before this change:

* We end up with an address with a TTL of 3s that will expire in 3s.

After this change:

* We end up with an address with a TTL of 4s that will expire in 3s.

---

The second fix prevents the in-memory addressbook from announcing existing
addresses every time their TTLs get updated.

---

The third fix correctly updates TTLs for existing addresses in the on-disk
addressbook.

This fixes https://github.com/libp2p/go-libp2p-identify/issues/2
2019-07-24 17:04:37 -07:00
Raúl Kripalani
3d3a10dd54
protobook: support removing protocols. (#84) 2019-06-19 23:53:07 +01:00
Steven Allen
9a662b9911 test: add metadata test 2019-05-31 19:58:37 -07:00
Steven Allen
0b5b389640 dep: switch to core (#80)
* dep: switch to core

Specifically, remove go-libp2p-{crypto,peer} deps.

* catch a few more usages of deprecated packages.
2019-05-31 14:51:16 +01:00
Raúl Kripalani
fec786e9ef pstore ds: make gc lookahead window optional. 2019-02-06 09:35:10 +00:00
Raúl Kripalani
d88042c422 improve code readability. 2019-02-05 16:52:27 +00:00
Raúl Kripalani
0baddf577e Merge branch 'master' into feat/pstore-ds-gc 2019-02-05 16:15:11 +00:00
Raúl Kripalani
6959c64874 add unit test to verify AddAddr doesn't shorten TTL. 2019-01-23 13:13:11 +00:00
Steven Allen
f32bc1c26d disable inline-peer id test 2018-12-07 13:47:26 -08:00
Raúl Kripalani
3a85498ae8 add tests for new GC routines. 2018-11-28 00:13:13 +00: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
Adrian Lanzafame
308d998d76
sort suite so benchmarks always run in the same order
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2018-11-07 15:48:31 +10:00
Steven Allen
6c58e9f9fa fix the inline key test
RandTestKeyPair uses RSA keys but we now forbid any RSA key under 512 bits.
2018-11-02 15:24:44 -07: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
Raúl Kripalani
4b2c1212e7 add a test and fix broken logic. 2018-09-14 18:27:23 +01:00
Raúl Kripalani
7c5cf50d9b adjust ttl tests as badger doesn't support sub-second ttl. 2018-09-13 16:09:32 +01:00
Raúl Kripalani
622589ab31 attempt to fix time-dependent tests in CI. 2018-09-13 10:35:03 +01:00
Raúl Kripalani
95cce50f15 hopefully fix intermittent time-dependent test failure. 2018-09-12 13:53:10 +01:00
Raúl Kripalani
4037390c42 increase test coverage. 2018-09-11 18:17:27 +01:00
Raúl Kripalani
7ae2621803 small fixes. 2018-09-11 14:42:19 +01:00
Raúl Kripalani
1b410c7294 Merge branch 'master' into txndatastore 2018-09-11 14:13:14 +01:00
Raúl Kripalani
903aa12603 check cache in ClearAddrs and perform targeted delete. 2018-09-11 12:43:36 +01:00
Raúl Kripalani
1c25f160a1 normalise import aliases. 2018-09-07 18:46:23 +01:00
Raúl Kripalani
08de02b668 regroup test utils; remove unused function. 2018-09-07 18:45:58 +01:00
Raúl Kripalani
2901497643 migrate Addrs() and PeersWithAddrs() to use txns, improve perf, benchmarks. 2018-09-07 18:37:01 +01:00
Raúl Kripalani
027d289a66 nested test cases in addr_book suite. 2018-09-07 16:54:00 +01:00
Raúl Kripalani
9be48ff689 optimise benchmark code. 2018-09-07 13:04:14 +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
a3c72582f5 increase wait times in tests. 2018-09-06 20:18:25 +01:00
Raúl Kripalani
bc77b649dc rename AddrMgr => AddrBook elsewhere. 2018-09-05 15:10:18 +01:00
Raúl Kripalani
fe732515cd add benchmark for ClearAddrs. 2018-09-04 18:02:00 +01:00
Raúl Kripalani
9b5c1de960 move benchmarks test cases to benchmarks_suite.go. 2018-09-04 16:21:02 +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
Raúl Kripalani
ad75ca465e regroup test and benchmark utils. 2018-09-07 17:45:29 +01:00
Raúl Kripalani
e200f3a5c1 gx-go unrewrite. 2018-09-02 12:10:55 +01:00
Raúl Kripalani
580527bc73 fix nil dereference in benchmarks. 2018-08-31 13:30:13 +01:00
Raúl Kripalani
5865418f5c organise imports. 2018-08-30 16:24:09 +01:00
Raúl Kripalani
b9ac6b77b1 gx-go rw. 2018-08-30 15:26:03 +01:00
Raúl Kripalani
eaa2ccbf1e refactor tests into suites.
This enables each implementation to subject itself to a common test
suite.
2018-08-30 13:44:50 +01:00
Jeromy
aa7305d39f remove go-ipfs-util dep 2017-03-23 18:57:39 -07:00
Jeromy
7842b6862f dont commit with deps rewritten 2017-02-03 12:49:59 -08:00
Jeromy
5ea1774aba gx publish 1.4.2 2017-02-03 10:32:21 -08:00
Jeromy
639e4e1e92 gx publish 1.3.0 2016-10-04 18:43:44 -07:00
Lars Gierth
ad26c6b105 Resolve circular dependency by porting testutil functions over 2016-04-15 23:11:01 -07:00