126 Commits

Author SHA1 Message Date
Addy Bryant
c3a48c9699 fix: updated libp2p in the bitswap crate 2022-04-01 12:11:39 +03:00
Addy Bryant
f601b8d3c7 fix: update libp2p and renamed the changed types 2022-04-01 12:11:39 +03:00
Karim Agha
6f23f715e2 Fixing build issue described in: https://github.com/libp2p/rust-libp2p/issues/2231
When including rust-ipfs as a dependency in any crate, it fails with the following error:

    ```
    error: failed to select a version for the requirement `aesni = "^0.7"`
    candidate versions found which didn't match: 0.99.99, 0.10.0, 0.9.0, ...
    location searched: crates.io index
    required by package `aes v0.4.0`
        ... which is depended on by `aes-gcm v0.6.0`
        ... which is depended on by `snow v0.7.1`
        ... which is depended on by `libp2p-noise v0.30.0 (/home/alexander/dev/misc/rust-libp2p/transports/noise)`
        ... which is depended on by `libp2p v0.37.1 (/home/alexander/dev/misc/rust-libp2p)`
        ... which is depended on by `libp2p-relay v0.2.0 (/home/alexander/dev/misc/rust-libp2p/protocols/relay)`
    ```

    This fix updates the libp2p version into one that has a fix for this dependency and now it compiles fine
2021-10-20 10:32:26 +00:00
Krzysztof Lis
414ccf5cbd chore: upgrade some of the other deps, fix tests 2021-08-18 14:58:33 +02:00
Krzysztof Lis
6c7004ae14 chore: upgrade to libp2p 0.39
Includes replacing `upgrade::{write_one, read_one}` with `upgrade::{write_length_prefixed, read_length_prefixed}` respectively, which is a direct consequence of [PR2111](https://github.com/libp2p/rust-libp2p/pull/2111).
2021-08-18 14:57:47 +02:00
Joonas Koivunen
b487c3e7fd chore: upgrade to libp2p 0.38 2021-08-17 15:13:40 +02:00
Krzysztof Lis
b713f86819 chore(deps): hash_hasher doesn't have any features 2021-08-04 15:01:03 +02:00
Krzysztof Lis
3254c05d44 perf: Use hash_hasher in hashmaps/sets where the key is a Cid/Multihash
Referenced-issues #258
2021-08-04 15:01:03 +02:00
Joonas Koivunen
be4043b602 fix(deps): anyhow std feature is required
this was not set originally because probably mpart-async sets it, but
the code in `ipfs` assumed `std` feature was enabled and thus the from
conversion was accessible.
2021-08-04 12:49:48 +03:00
Joonas Koivunen
02336a5380 feat(dnslink): impl with trust-dns-resolver 2021-02-05 22:30:24 +02:00
Joonas Koivunen
af19ed833b chore(deps): remove unused dirs flagged by cargo audit 2021-01-25 11:56:17 +02:00
Joonas Koivunen
203170898c chore(deps): libp2p 0.34, core+swarm 0.27 2021-01-25 11:49:29 +02:00
Joonas Koivunen
de7f312610 fix(deps): tempfile only needed for tests 2021-01-25 11:49:26 +02:00
Joonas Koivunen
b8ea76c26c chore(deps): rand 0.8 2021-01-25 11:49:22 +02:00
Joonas Koivunen
e6af4d3008 fix(deps): rand is used in only tests directly 2021-01-25 11:49:13 +02:00
Joonas Koivunen
a162ad01ba chore(deps): prost 0.7 2021-01-25 11:49:07 +02:00
Joonas Koivunen
2e0b436172 chore: most of the libp2p updating, comment out mdns
not a nice thing to do but there remains an issue with the dependencies,
and the libp2p tokio-mdns feature is gone. there are also some conflicts
remaining.
2021-01-25 11:46:24 +02:00
Joonas Koivunen
b7ab9b743e chore: upgrade bytes, add bytes feature for domain 2021-01-25 11:45:21 +02:00
Joonas Koivunen
5cbe44c024 chore(deps): latest domain 2021-01-25 11:45:21 +02:00
Joonas Koivunen
5b55ded946 chore(deps): tokio 1.0 2021-01-25 11:40:49 +02:00
ljedrz
bc0379402b chore: post-update tweaks
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-01-18 16:56:36 +02:00
ljedrz
7e51079010 chore: update tokio to 0.3
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-01-18 16:56:36 +02:00
ljedrz
c0657bf739 chore: update libp2p to 0.30
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-01-18 16:56:36 +02:00
Joonas Koivunen
623bf8fc29 doc: sled_data_store feature and sledds docs 2021-01-11 14:20:12 +02:00
fetchadd
d5ee450797 refactor: better code style and use OnceCell to init sled db 2021-01-05 22:16:46 +08:00
fetchadd
81f2f24494 feat: Using sled as DataStore and PinStore 2021-01-05 09:06:07 +08:00
Niklas Long
e60e9835d0 fix: use unique repo dirs for testing nodes
The introduction of repo locking caused tests with multiple
nodes using the same temporary repo directory to fail.
2020-11-11 18:04:09 +01:00
Niklas Long
aed5ae2934 feat: repo locking with fs2 2020-11-10 17:40:32 +01:00
Joonas Koivunen
7cfa005ea4 chore: bump ipfs version to 0.2.1 2020-10-08 10:49:14 +03:00
Joonas Koivunen
1e452e8a89 chore: prepare for release, bump version 2020-09-23 18:06:32 +03:00
Joonas Koivunen
e9d41e4b22 refactor: rename bitswap as ipfs-bitswap 2020-09-23 16:23:18 +03:00
ljedrz
6fb62f136b chore: remove the nightly feature and CI run
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 16:19:16 +02:00
ljedrz
e9f129eb66 chore: update libp2p
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-11 17:01:38 +02:00
bors[bot]
0019ece68a
Merge #353
353: Implement /dns and /resolve r=ljedrz a=ljedrz

Add a rudimentary implementation of the `/dns` and `/resolve` endpoints; putting it out there already, as due to the similarity of these two endpoints I'm not 100% sure how much we want to "condense" their inner workings.

This upgrades or conformance suite stats from
```
170 passing
50 pending
```
to
```
178 passing
42 pending
```

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-08 15:01:38 +00:00
ljedrz
3174225d7c fix: make DNS resolution work in Windows
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-08 15:21:14 +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
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
bors[bot]
4c719d49c2
Merge #359
359: This PR uses libp2p dns, so that /dns4 and /dns6 multiaddrs can be dialed. r=koivunej a=rklaehn

Not quite sure how to best test this without having a test that uses the dns of the CI server. Any ideas?

Co-authored-by: Rüdiger Klaehn <rklaehn@protonmail.com>
2020-09-07 14:20:07 +00:00
Joonas Koivunen
c38673ff3e refactor: the pinstore "interface tests"
my first attempt with macro generated tests: lots of quite confusing to
debug compiler errors but the final outcome looks ok.
2020-09-04 18:30:19 +03:00
Rüdiger Klaehn
08c911b970 Add support for dialing dns4, dns6 and dns multiaddrs 2020-09-04 10:30:01 +02:00
Joonas Koivunen
044aa2dfa0 fix: write files once
concurrent writers will not retry if the first one fails. writing is now
done through tempfile which might be better, but relies on filesystem
being journalled and ordering the rename after fsync correctly.
2020-09-02 23:54:39 +03:00
Joonas Koivunen
9cc150625f test: race to put block 2020-09-02 23:54:39 +03:00
bors[bot]
347bf8af2f
Merge #349
349: Continued pinning r=koivunej a=koivunej

This PR adds the remaining `pin/*` APIs, with a bad implementation of recursive pinning. Aim is to inch forward to see a more proper implementation.

Compared to older pin storage implementations in go-ipfs at least this jumps right into using a "datastore" similar to the previous implementation. However I quickly found that the pin storage could not work on the simple datastore API. Instead of turning the datastore API into versioned and Repo level pin operations retryable on races this adds a version of `PinStore` which assumes locked access.

Recursive pinning is the slowest and most space inefficient variant: store all indirect pins. It doesn't seem wise but I am inclided to keep that at least for this PR. When adding a recursive pin, first the root is marked as `Recursive::Intent`, followed by marking all references as pinned `Indirect` from this root, followed by marking the root as `Recursive::Count(number_of_references)`. Writing down the indirect pins is likely not a proper way to do implement this, as this scheme requires all of the machinery only recording the recursive pinning for the root would require, but has some additional steps, and space use. It does not however require inmemory caching as the storage space is the cache.

There will be a long way to go towards a proper transactional, persistent pin storage (or even supporting one) after this PR but I aim to get the HTTP API tests going in this PR, or at least most of them. Probably scoping out the `pin (add|ls|rm) IpfsPath` for just supporting Cids at the moment.

Definitely not included:
 - `pin/rm` with multiple arguments; can't see how could this be possible to implement without proper transactional datastore
 - recovery from partial recursive pins

Removed:
 - `ipfs::repo::Column::Pin` and related paths

Not sure yet:
 - how to structure the `pin/ls` response formatting code
 - keep the string-precise anyhow errors or do proper error enums?

TODO:
 - `pin/ls` non-streaming response

The `pin/ls` responses are quite difficult beast.

### Checklist (can be deleted from PR description once items are checked)

- [x] **New** code is “linted” i.e. code formatting via rustfmt and language idioms via clippy
- [x] There are no extraneous changes like formatting, line reordering, etc. Keep the patch sizes small!
- [ ] There are functional and/or unit tests written, and they are passing
- [ ] There is suitable documentation. In our case, this means:
    - [ ] Each command has a usage example and API specification
    - [ ] Rustdoc tests are passing on all code-level comments
    - [ ] Differences between Rust’s IPFS implementation and the Go or JS implementations are explained
        - attempted this at the `ipfs::Ipfs` level method docs


Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2020-09-02 09:46:55 +00: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
2ee99d282d feat: improve the go-interop DHT tests
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
Joonas Koivunen
52ea6b735d fix: enable more futures features to get BoxStream 2020-08-29 19:10:59 +03:00
ljedrz
a33ee5fe09 feat: make dht/findpeer search the non-local DHT if necessary
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-20 19:05:50 +02:00
ljedrz
eb9a8f2e5e feat: update libp2p and use TokioMdns
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-19 09:35:35 +02:00
ljedrz
3dac76603f chore: remove unused futures features
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-14 11:14:30 +02:00