ljedrz
ee7a70e90e
refactor: simplify interop imports
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-08 11:38:16 +02:00
ljedrz
b52e413304
test: enable easy foreign node interop for many tests by adding ForeignNode::identity
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-08 11:18:26 +02:00
ljedrz
22208295cc
test: introduce jsipfs interop test feature
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-08 10:51:35 +02:00
ljedrz
0e3afd4382
chore: move the interop objects into separate modules
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-07 17:14:41 +02:00
ljedrz
b545c4022b
chore: rename the go-ipfs node objects to sound more general
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-07 17:14:41 +02:00
ljedrz
70b1c735e7
chore: rename test_dht_with_go to test_go_interop
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-07 17:14:41 +02:00
ljedrz
5628024208
test: introduce tests/common and move go interop there
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-07 17:14:41 +02:00
ljedrz
01054345b1
refactor: expose kad::Quorum in the IPFS::dht_{get, put} API
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-02 12:17:45 +02:00
ljedrz
69ccbb9cb1
feat: add dht get and put
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-02 09:29:26 +02:00
ljedrz
77237a5559
chore: extra post-review comment and a panic message grammatical fix
...
Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 17:31:06 +02:00
ljedrz
11dba5a44e
fix: make the go-ipfs DHT interop tests pass together
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 14:07:59 +02:00
ljedrz
5bcb3d92b4
chore: isolate the creation of the go-ipfs node
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 14:07:59 +02:00
ljedrz
2ee99d282d
feat: improve the go-interop DHT tests
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 14:07:59 +02:00
ljedrz
211d7224bd
feat: make test nodes use the test kad protocol
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 14:07:59 +02:00
ljedrz
7a0e02b913
feat: enable DHT interop tests with a go-ipfs node
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 14:07:59 +02:00
ljedrz
b5471f1f98
feat: improve the DHT tests
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-28 14:54:18 +02:00
ljedrz
d91976ffb3
fix: directly use Cid in Ipfs::{get_providers, provide}
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-26 11:24:29 +02:00
ljedrz
d84d64cdc9
feat: implement /dht/query (i.e. get_closest_peers)
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-21 13:23:47 +02:00
ljedrz
6d2cdb71f2
test: check the DHT provide and get_providers functionalities
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-21 12:51:35 +02:00
ljedrz
cb534f9a4d
feat: improve the find_peer_dht test
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-20 12:38:08 +02:00
ljedrz
e397a0a213
feat: introduce Ipfs::find_peer
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-19 15:59:26 +02:00
ljedrz
39d6459d6e
fix: fix the kademlia bootstrapping test (post-Multiaddr-wrapper fallout)
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-19 11:54:54 +02:00
ljedrz
4599fff709
feat: introduce a custom error for the Multiaddr wrappers
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 15:59:51 +02:00
ljedrz
6e8dff0bb7
feat: utilize the new Multiaddr wrappers
2020-08-17 15:51:26 +02:00
ljedrz
2c4fbe8c1b
fix: remove Ipfs::peer_id, add a connection test, dont add Protocol::P2p in IpfsEvents
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 09:01:49 +02:00
ljedrz
993b80d2d1
fix: disallow Multiaddrs without the P2p protocol
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-14 16:19:56 +02:00
ljedrz
a070ca13d0
fix: make the retrying loop in wantlist_cancellation less busy
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 18:00:28 +02:00
ljedrz
c930f651fd
test: make async tests use only 1 thread
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:16:20 +02:00
ljedrz
398aa58877
chore: import reordering with cargo fmt
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:15:45 +02:00
ljedrz
8be75f7a4a
feat: change the async executor to tokio
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:15:14 +02:00
ljedrz
50dd210719
test: tweak two node connection tests
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-12 12:04:15 +02:00
ljedrz
a0b777d542
fix: ignore connect_two_nodes_by_peer_id, add relevant comments
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-12 11:13:00 +02:00
ljedrz
58a966a24a
feat: test duplicate connection attempts
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-12 10:04:04 +02:00
Joonas Koivunen
c95a9bb862
fix: first drop mutex guard, then assert
...
the assert while holding the guard poisons the mutex and that causes
drop to panic because of the poisoned mutex, by design; see last
commit. by shortening the scope of the mutex guard we should once again
see more clear build failures :)
2020-08-11 13:51:17 +03:00
Joonas Koivunen
9e695e02cb
fix: go back to std::sync::Mutex
...
Turns out #174 was wrong, as the alternative required sprinkling
block_on which made the whole thing worse. we shouldn't risk a deadlock
with the mutex as we are not (can not) holding it across awaits.
unwrap as we are not expecting subscriptions to panic and poison the
mutex.
2020-08-11 13:03:45 +03:00
bors[bot]
70bccd8873
Merge #280
...
280: Patch a Bitswap leak r=koivunej a=ljedrz
We currently don't properly clean up after a connection to a `Bitswap` peer is closed, which leads to leaking `Ledger`s; funnily enough, it seems that just uncommenting a pre-existing line solves the issue. In addition, add a relevant test.
Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-06 15:08:27 +00:00
Joonas Koivunen
3e2554aa47
fix: add timeouts to connect_two tests
...
gha windows was stuck on this. it's not nice since we cannot see any
testing output before the run is cancelled.
2020-08-06 17:20:47 +03:00
ljedrz
2dfabdf66a
fix: patch a Bitswap leak and test it
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-06 16:02:04 +02:00
bors[bot]
b99288b7b1
Merge #290
...
290: Some maintenance r=koivunej a=ljedrz
Some maintenance work so as not to conflict too much with the pending PRs:
- depend on cid instead of libipld where only Cid is used
- update the `domain` dep (big `Cargo.lock` wins)
cc #75
Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-06 13:23:45 +00:00
ljedrz
f5f6790062
chore: depend on cid instead of libipld where only Cid is used
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-06 11:38:27 +02:00
ljedrz
7759ee0e32
fix: ignore a flaky kad test
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-06 10:48:06 +02:00
ljedrz
38b39747bb
feat: introduce the means to connect by PeerId
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-03 14:24:01 +02:00
ljedrz
dc48504d1c
chore: add a comment to the bitswap stress test
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-31 16:42:50 +02:00
ljedrz
0d74cea3df
feat: add a bitswap stress test
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-31 15:52:56 +02:00
ljedrz
e820e7a5e8
feat: keep a node's Span instead of its name
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-30 17:32:25 +02:00
ljedrz
0abe1b4aa4
refactor: improve node init in some tests
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-30 15:59:14 +02:00
ljedrz
e0d43ed861
feat: more logs
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-30 15:21:03 +02:00
ljedrz
0140c673b8
feat: attach tracing to nodes
...
Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-30 14:53:38 +02:00
Joonas Koivunen
7b71137eb8
fix: cleanup also the Pending related subs
...
earlier commit already included cleanup for the Ready and Cancelled
cases and this will do the same for Pending cases. the end result
doesn't change but as is apparent from the test changes: a single
Some(0) becomes None. however this does remove leaking and potential
bugs when a previously completed subscription would be reused.
2020-07-30 11:10:20 +03:00
ljedrz
a284c1f841
feat: replace log with tracing
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-29 14:50:00 +02:00