1788 Commits

Author SHA1 Message Date
Addy Bryant
72ff95dca0 fix(swarm): corrected dial failure logic 2022-04-01 12:11:40 +03:00
Addy Bryant
888e6f17ef wip: re-add code fragment to handle dial failure 2022-04-01 12:11:40 +03:00
Addy Bryant
77291ee213 fix(swarm-test): add biased to tokio::select for non-random behavior 2022-04-01 12:11:40 +03:00
Addy Bryant
6c6fc3d28b fix: update libp2p and renamed the changed types 2022-04-01 12:11:40 +03:00
Addy Bryant
31262b5feb chore: more updating to libp2p 2022-04-01 12:11:40 +03:00
Addy Bryant
3b5919397b temp fix: changed field order to workaround bug in libp2p 2022-04-01 12:11:40 +03:00
Addy Bryant
25c8d583fc fix: removed unneeded BehaviourEvent struct 2022-04-01 12:11:40 +03:00
Addy Bryant
93b31b38fd chore: clean up type signature 2022-04-01 12:11:40 +03:00
Addy Bryant
bdf977c22c enable event_process for BehaviourEvent 2022-04-01 12:11:39 +03:00
Addy Bryant
a996922cc0 added change to changelog 2022-04-01 12:11:39 +03:00
Addy Bryant
e4002d6d43 re-add connection closed and established 2022-04-01 12:11:39 +03:00
Addy Bryant
085be771fe replaced todo placeholders 2022-04-01 12:11:39 +03:00
Addy Bryant
7e9da72dc5 fix the pubsub network behaviour action type 2022-04-01 12:11:39 +03:00
Addy Bryant
c1a5bba1ea some updates to pubsub 2022-04-01 12:11:39 +03:00
Addy Bryant
918d4d8f6d more updating of types 2022-04-01 12:11:39 +03:00
Addy Bryant
4e5ff4d23e more libp2p updating 2022-04-01 12:11:39 +03:00
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
Christopher Joel
80d2b79cb7
Update src/ipld/dag_cbor.rs
Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2022-01-31 14:50:42 -08:00
Christopher Joel
888776f279
Update src/ipld/dag_cbor.rs
Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2022-01-31 14:50:27 -08:00
Chris Joel
8e0d5d5192 Update changelog 2022-01-31 10:47:30 -08:00
Chris Joel
c843f07d75 Strict ordering for DAG-CBOR-encoded map keys 2022-01-31 10:47:30 -08:00
bors[bot]
a78a6237db
Merge #480
480: build: fix wrong repo urls, clippies r=koivunej a=koivunej

I had forgotten some old urls there which are sure to cause build failures, as seen in the #479.


Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2022-01-31 10:44:18 +00:00
Joonas Koivunen
b4547596ae chore(ipfs/ipns): work around unused warning
this probably makes sense in the future if ipns dht records ever become
supported.
2022-01-31 12:10:00 +02:00
Joonas Koivunen
0927be1193 chore(ipfs): clippies
assorted unused or idiomatic changes.
2022-01-31 12:10:00 +02:00
Joonas Koivunen
e9355bd498 chore(http): unused warnings on query structs
these query types were originally observing what kind of requests
conformance tests do and what kind of requests go-ipfs supports, so
keeping them as there might be some value. to be removed when upgrading
conformance tests.
2022-01-31 12:10:00 +02:00
Joonas Koivunen
8b7011f638 chore(unixfs): clippies
this includes a change on making `unixfs::InvalidCidInLink` properly
`#[non_exhaustive]` instead of using the hidden field trick. it probably
isn't a breaking change, but then again requires a more recent rustc,
which sort of makes it a breaking change.
2022-01-31 12:10:00 +02:00
Joonas Koivunen
1b3842c769 ci: lock nodejs version 14 2022-01-31 12:10:00 +02:00
Joonas Koivunen
ed430faed0 build: fix wrong repo urls 2021-12-02 11:46:14 +02:00
bors[bot]
ad3ab49b4d
Merge #475
475: Fixing build issue described in: https://github.com/libp2p/rust-libp2p/issues/2231 r=koivunej a=karim-agha

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


Co-authored-by: Karim Agha <karim.dev@gmail.com>
2021-11-03 09:26:16 +00: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
bors[bot]
111f116e36
Merge #473
473: Swarm cleanup following libp2p upgrade to v0.39.1 r=koivunej a=CHr15F0x

This is a follow up of https://github.com/rs-ipfs/rust-ipfs/pull/472. There are two changes introduced:
* remove eq_greedy as `Multiaddr` in `SwarmApi::pending_{addresses, connections}` contains p2p, align conversions accordingly (136496f7de),
* explicitly use `MultiaddrWithPeerId` in `SwarmApi::pending_{addresses, connections}` (3b6f69530f).

The former (136496f7de) works fine without the latter (3b6f69530f), however I am leaning more towards keeping both changes. Encoding the information about peer id presence/absence in Multiaddr in _type_ instead of relying on comments and `expect()`s improves readability and _developer experience_.

Please let me know what your thoughts are.

Co-authored-by: Krzysztof Lis <klis33@gmail.com>
2021-08-23 12:33:54 +00:00
Krzysztof Lis
05d420e3be chore(changelog): update 2021-08-23 14:20:48 +02:00
Krzysztof Lis
3b6f69530f refactor(swarm): pending_{addresses, connections} use MultiaddrWithPeerId
Enforce internal represenatation for `SwarmApi::pending_{addresses, connections}` to explicitly show that all multiaddrs include peer IDs by using `MultiaddrWithPeerId`.
2021-08-23 13:32:10 +02:00
Krzysztof Lis
136496f7de refactor(swarm): simplify usage of multiaddr after libp2p upgrade to 0.39
Get rid of eq_greedy.
2021-08-23 13:31:20 +02:00
bors[bot]
ede42ebe3e
Merge #472
472: chore: upgrade to libp2p 0.39 r=koivunej a=CHr15F0x

This PR is a follow up of #463.

It includes the following:
- upgrading libp2p to [v.0.39.1](https://github.com/libp2p/rust-libp2p/releases/tag/v0.39.1)
- upgrading some other deps (e.g.: prost, prost-base, quick-protobuf, base64), **excluding cid and multihash**
- fixes to tests that started failing following upgrade to libp2p v.0.38 in #463

Incoming shortly:
- [x] respective changelog update
- [x] ~~I haven't run the changes against current workflow, so some additional fixes could be necessary;~~ edit: though I did check against all tests locally numerous times during dev, albeit only in a linux/x64 environment; btw looks like the workflows are fine with the changes


Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
Co-authored-by: Krzysztof Lis <klis33@gmail.com>
2021-08-18 13:02:58 +00:00
Krzysztof Lis
c7a79980bd fix: code review - rework 2021-08-18 14:58:33 +02:00
Krzysztof Lis
a8851ebc92 chore: update changelog 2021-08-18 14:58:33 +02:00
Krzysztof Lis
99c3b81661 style: apply cargo fmt 2021-08-18 14:58:33 +02: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
bors[bot]
08f840b834
Merge #471
471: ci: cache improvements r=koivunej a=Mirko-von-Leipzig

This PR improves the CI caching, roughly halving the time required when caches are hit (no dependency or toolchain changes).

Overview of changes:

- Use [rust-cache action](https://github.com/Swatinem/rust-cache). This forms the bulk of the time improvement as Rust dependencies are now cached.
- Improve npm caching for conformance tests. This trims 2-3 minutes of build time.
- Improve job and step naming.
- Add a manual trigger for the workflow.
- Remove core dump for macos, no longer required.

Further details can be found in the commits.

I've been running into sporadic conformance test failures on windows ([link to run](https://github.com/Mirko-von-Leipzig/rust-ipfs/actions/runs/1135372291)):
```
  1) .pubsub.subscribe
       multiple connected nodes
         should send/receive 100 messages:
     FetchError: request to http://127.0.0.1:50533/api/v0/pubsub/pub?arg=pubsub-tests-C-aIrZS_7OSQMNSVOMszV failed, reason: read ECONNRESET
      at ClientRequest.<anonymous> (node_modules\node-fetch\lib\index.js:1455:11)
      at Socket.socketErrorListener (_http_client.js:475:9)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)
```

Co-authored-by: Mirko von Leipzig <mirko.vonleipzig@gmail.com>
2021-08-17 09:43:42 +00:00
Mirko von Leipzig
df11329836 ci: enable caching for vcpkg 2021-08-17 10:38:11 +02:00
Mirko von Leipzig
e2f31bc8de ci: consolidate steps and naming
Groups steps together where sensible, and made the naming more uniform.
2021-08-16 21:54:00 +02:00
Mirko von Leipzig
9d87e212a7 ci: fix conformance test npm caching
The setup for the conformance test would always build the npm packages.

Instead we now check for a cache hit, and only build if we miss.
2021-08-16 21:54:00 +02:00
Mirko von Leipzig
8f48aa0303 ci: remove macos core dump
This was used to debug a crash which no longer occurs.

Removing lets us simplify the workflow file, and improves caching.
2021-08-16 21:54:00 +02:00
Mirko von Leipzig
f8ab359e81 ci: use rust cache action
This replaces the existing one, which wasn't caching much.
2021-08-16 21:54:00 +02:00
Mirko von Leipzig
8c38e55d4d ci: improve job matrix naming
New name is simply the host OS.

Previously was a long string including all parameters, which wouldn't
fit on the GH page.
2021-08-16 21:54:00 +02:00
Mirko von Leipzig
0b3d08f7df ci: add workflow_dispatch trigger
This allows for manually triggering the workflow.
Particularly useful for running CI on forks without creating a PR.
2021-08-16 21:54:00 +02:00