Commit Graph

1590 Commits

Author SHA1 Message Date
Joonas Koivunen
da4e09b224 refactor: trim and doc incomplete IpfsPathError 2020-09-23 11:29:24 +03:00
Joonas Koivunen
627511e372 refactor: trim unused pub methods 2020-09-23 11:18:36 +03:00
Joonas Koivunen
2caf06d3ef doc: ipfspath and pathroot 2020-09-23 11:17:42 +03:00
Joonas Koivunen
8789be22e8 doc: ipfsoptions 2020-09-23 11:17:22 +03:00
Joonas Koivunen
34a6cf3de1 doc: hide IpfsInner in docs
this seems to still keep Ipfs methods through deref available, lets hope
it's the same in docsrs.
2020-09-23 10:37:43 +03:00
Joonas Koivunen
29202efe0b doc: bitswap::Block which ipfs re-exports 2020-09-23 10:37:43 +03:00
Joonas Koivunen
d5b55df86a refactor: remove one more re-export 2020-09-23 10:37:43 +03:00
Joonas Koivunen
5415751a17 doc: less bitswap re-exports, document BitswapStats 2020-09-23 10:37:43 +03:00
Joonas Koivunen
86fd2f7fdf doc: bitswap Stats and BitswapEvent, remove re-export of BitswapEvent 2020-09-23 10:37:43 +03:00
Joonas Koivunen
c2609247ed doc: add missing Ipfs::* method docs 2020-09-23 10:37:43 +03:00
Joonas Koivunen
d00277272b doc: stop linking to private members
not actually sure if this is so bad but ... less warnings.
2020-09-23 10:37:43 +03:00
Joonas Koivunen
dd9e325cc7 doc: fix intra links 2020-09-23 10:37:43 +03:00
bors[bot]
86bf01c619
Merge #391
391: Move the README example, remove the nightly feature and CI run r=koivunej a=ljedrz

Moving the code example from the README to the `examples` simplifies our CI setup and makes one of the runs redundant.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-22 15:04:57 +00: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
c1fcc6be34 chore: move the example from README to examples
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 16:19:16 +02:00
bors[bot]
2b3bb723d2
Merge #382
382: return errors for some extra DHT issues r=ljedrz a=ljedrz

Return explicit subscription errors on some of the more user-facing DHT requests, namely `Bootstrap`, `StartProviding` and `PutRecord`; `Kademlia` errors for those are currently only logged and `KadResult::Complete` is returned, potentially concealing issues.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-22 13:54:08 +00:00
bors[bot]
a7cca369d5
Merge #390
390: Example tuneup r=koivunej a=koivunej

Removes the examples:
 - client1 and client2
 - ipfs_bitswap_test

Also removes the stray file `examples/block.data`. It used to be used by something.

I wrote a longer one but the short gist is that fetch_and_cat has superceded both, except for the ipld stuff, which will now have zero examples but there are tests. It's better to have one clear example than to have multiple confusing and out of date ones.


Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2020-09-22 13:28:53 +00:00
Joonas Koivunen
ae646201c7
doc: suggestions from code review
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-09-22 16:28:17 +03:00
Joonas Koivunen
23cc1bf288 remove ipfs_bitswap_test
the example has long been superceded by both fetch_and_cat and
integration tests.
2020-09-22 16:00:31 +03:00
Joonas Koivunen
854d3afad7 doc: commenting pass on fetch_and_cat 2020-09-22 16:00:31 +03:00
Joonas Koivunen
65c3f48cba remove obsolete examples
client1 and client2 were a pair of two peers working together to form up
an example where one client creates an ipld document and the other one
downloads it, reading IPLD projections. the bitswap side is already done
elsewhere and the nature of use having to run two clients, there just
wasn't an easy way around without running the two nodes in the same
process. if that was done, then the example would be the same as
tests.
2020-09-22 16:00:31 +03:00
bors[bot]
bb072f81fe
Merge #383
383: remove the default random listening address r=ljedrz a=ljedrz

Remove the default random listening address, listen to no addresses by default.

Cc https://github.com/rs-ipfs/rust-ipfs/issues/356

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-22 12:15:08 +00:00
bors[bot]
335a23a6a5
Merge #387
387: fix: restore bootstrappers from static list, update the bootstrapper list r=koivunej a=ljedrz

Alters the `BOOTSTRAP_NODES` list to contain only the currently working addresses and changes the behavior of `Swarm::remove_bootstrappers` to not use the config file, but rather the aforementioned in-memory list.

Cc https://github.com/rs-ipfs/rust-ipfs/issues/356

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-22 11:55:07 +00:00
bors[bot]
8b4c34cf67
Merge #388
388: fix: unhandled panics in the fs blockstore r=koivunej a=koivunej

Fixes #386 -- at least there are no more unhandled panics, seems that the blockstore is still racy but I am not sure how to fix it right now. I am not 100% what caused those panics but I suspect it was related to having multiple broadcast::Sender's alive in the blocking task queue trying to send to receivers which were already dropped because the outer async context was dropped.

In addition there are even more comments, minor comment adjustments, minor splitting to comment less but more clear code.

First commit is the fix.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2020-09-22 11:36:55 +00:00
ljedrz
fef8e7ca25 fix: restore default bootstrappers based on the pre-configured in-memory list
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 13:16:33 +02:00
bors[bot]
251a744c98
Merge #384
384: remove unimplemented ipns functionalities from Ipfs r=ljedrz a=ljedrz

Remove ipns insertion and cancellation features from `ipfs::Ipfs` (they are not implemented).

Cc https://github.com/rs-ipfs/rust-ipfs/issues/356

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-22 11:07:42 +00:00
Joonas Koivunen
78c02628ca
doc suggestions from code review
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-09-22 13:56:36 +03:00
Joonas Koivunen
bdd722c310 refactor: split the outermost error cases
this allows for better logging and commenting.
2020-09-22 13:33:36 +03:00
Joonas Koivunen
212d13e346 fix: clarify span usage in blocks.rs
I had accidentially not only created a subspawn for the blocking task
but in addition to that also moved the original span in.
2020-09-22 13:31:45 +03:00
Joonas Koivunen
c45c00a540 doc: explain thoughts behind RemoveOnDrop 2020-09-22 13:31:14 +03:00
Joonas Koivunen
64dc0afcc4 fix: panicking while putting a block
See related issue #386, the panic reports were popping up on GHA builds.
The reason why this fixes the issue is not entirely clear, even in
hindsight moving the tx over to the blocking task did seem like the
right thing to do, and it could had enabled other ways to cleanup the
synchronization as well.

However perhaps it is not more explcit that the synchronization key is
created and cleared in the async context.
2020-09-22 13:23:19 +03:00
ljedrz
9541a7af8f chore: update the pre-configured bootstrapper list
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 11:56:48 +02:00
ljedrz
df8a12e111 chore: remove the now-unused ipns functionalities
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 11:52:30 +02:00
ljedrz
c676074046 docs: comment on Ipfs::resolve_ipns current limitations
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 11:39:59 +02:00
ljedrz
d0297c0c78 fix: add a random listening addr to the http config file
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 11:36:43 +02:00
ljedrz
af7d88b421 fix: remove the unimplemented ipns functionalities from ipns
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 10:33:38 +02:00
ljedrz
d1773c4a0f chore: remove the ipns example
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 10:29:34 +02:00
ljedrz
5e87446924 chore: rename ipns::dns to ::dnslink
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 10:28:54 +02:00
ljedrz
0c4d2f8a50 test: use a random listening address in tests
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 10:21:30 +02:00
ljedrz
0a0106246e fix: remove unimplemented ipns functionalities from Ipfs
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 10:11:00 +02:00
ljedrz
5096bd87e5 fix: remove the default random listening address
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-22 10:04:48 +02:00
ljedrz
4c120779a2 fix: return errors for some extra DHT issues
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-21 12:44:38 +02:00
bors[bot]
ffc65c8b5d
Merge #379
379: A regular maintenance pass r=aphelionz a=ljedrz

The usual `cargo update` run plus the removal of an unneeded direct dep and a dead test.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-18 12:00:30 +00:00
ljedrz
1be3bb35c8 fix: remove the direct hyper dep from http
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-18 11:02:04 +02:00
ljedrz
282932d602 chore: remove a dead protocol upgrade test
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-18 10:32:36 +02:00
ljedrz
7ff70354fb chore: cargo update
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-18 10:26:58 +02:00
bors[bot]
86574f5e75
Merge #377
377: Enabling pinned blocks test r=ljedrz a=aphelionz

This PR un-skips one conformance test that works now that we have pinning. This brings our number up by one! 🧨 

Co-authored-by: Mark Henderson <mark@mrh.io>
2020-09-17 07:23:24 +00:00
Mark Henderson
a008cb8769 Enabling pinned blocks test 2020-09-16 22:52:07 -04:00
bors[bot]
cca0956342
Merge #375
375: A fistful of tweaks r=aphelionz a=ljedrz

A pretty wide range of test improvements, small fixes, refactorings and renames. Each commit describes the specific change, but I'll list the more noteworthy ones:
- automatically remove `Protocol::P2p(_)` from the `Multiaddr`s passed to `Ipfs::add_peer`
- only produce a `RepoEvent::RemovedBlock` when a block was actually removed
- add unit tests for the `Node` topologies

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-16 18:04:39 +00:00
bors[bot]
b42b913948
Merge #376
376: update README, remove old links r=aphelionz a=ljedrz

Self-explanatory: just a few updates to the README, plus the removal of old issue links.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-09-16 14:26:26 +00:00