Commit Graph

89 Commits

Author SHA1 Message Date
ljedrz
0d43557bab feat: remove the rocksdb feature
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-05 09:43:08 +02:00
Caio
f69f2d25b8 Update filetime 2020-08-03 14:47:17 -03:00
ljedrz
e929cdf28b fix: extend tracing features
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-03 13:23:45 +02:00
Caio
15ff8885b2 Fix android build and include unixfs crate 2020-08-01 14:31:11 -03:00
Caio
94d9b0a358 Future-proof unused dependencies 2020-08-01 13:44:27 -03:00
Caio
d3bd3f649f Use default-features = false where applicable 2020-08-01 13:29:48 -03:00
ljedrz
a284c1f841 feat: replace log with tracing
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-29 14:50:00 +02:00
ljedrz
3b6ad52d85 chore: update remaining deps
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-28 13:44:45 +02:00
Joonas Koivunen
2bd1f588a0 chore: update openssl dep 2020-07-28 13:34:25 +03:00
Caio
e42b88c6a6 Use async macro for tests 2020-07-27 13:00:40 -03:00
ljedrz
cc26f40d14 feat: update libp2p again
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-21 14:50:06 +02:00
ljedrz
88c7219790 feat: update some dependencies
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-21 10:31:55 +02:00
Joonas Koivunen
a890964a39 chore: use released mpart-async 2020-07-10 09:31:09 +03:00
Joonas Koivunen
fbe90ab8ec feat: timeout on block/get 2020-07-09 14:15:44 +03:00
Joonas Koivunen
0a9ee274ca temp: upgrade to mpart-async with fix 2020-07-08 13:52:01 +03:00
Joonas Koivunen
76486f8ecb fix: rewrite block/put to support streaming multiparts
streaming multiparts are something we dont yet support, which is keeping
us back in an earlier version of js-ipfs-http-client for conformance
tests.
2020-07-08 13:52:01 +03:00
bors[bot]
933b52d97f
Merge #220
220: Initial file adder r=ljedrz a=koivunej

Creates multiblock balanced trees. Is quite slow and uses quite a lot of heap.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2020-07-03 09:33:28 +00:00
Joonas Koivunen
587fd14461 add: examples/add.rs, still bad output 2020-07-03 12:20:31 +03:00
ljedrz
4093e64119 chore: update Cargo.lock
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-01 14:51:00 +02:00
ljedrz
a3b9b44e77 fix: make examples simple again 2020-06-25 10:11:27 +02:00
Joonas Koivunen
02987aa77e chore: update rust-libp2p 2020-06-23 16:57:27 +03:00
Joonas Koivunen
be1d3b3891 refactor(unixfs): drop unused tar dependency 2020-06-18 20:24:57 +03:00
Joonas Koivunen
740c5f1cd7 chore(unixfs): README, license notes, set version to 0.0.1 2020-06-18 20:24:57 +03:00
Joonas Koivunen
d1cd15b4ec
Merge pull request #193 from eqlabs/fix_use_tempfile
fix test using non-unique tempfile
2020-06-18 01:16:08 +03:00
Joonas Koivunen
3ba5ddf1a3 fix test using non-unique tempfile 2020-06-18 00:55:11 +03:00
Joonas Koivunen
27085b3095 chore: update hyper and warp to latest 2020-06-17 23:07:39 +03:00
Joonas Koivunen
6eb276eb28 add: test /get for long and file names 2020-06-17 17:27:05 +03:00
Joonas Koivunen
91635181c4 refactor: remove home-grown Either 2020-06-17 17:27:05 +03:00
Joonas Koivunen
6671e74113 feat: /get http endpoint
does not at all pass any tests. we need to add a root path param, which
will be a string version of the requested Cid for the http api. Also,
with this, it becomes possible to hide everything (files, symlinks)
under a single walk api.
2020-06-17 17:26:39 +03:00
Joonas Koivunen
c1a0943559 wip: sneak in most of the private parts of tar-rs 2020-06-17 17:26:39 +03:00
Joonas Koivunen
b7b3d12036 add tar dependency 2020-06-17 17:24:23 +03:00
Joonas Koivunen
2ddb78ac3c wip add new subcrate 2020-06-08 15:03:34 +03:00
Joonas Koivunen
7799d888f6
Upgrade libp2p 0.19.0 (#169)
* chore: upgrade the libp2p to 0.18.(0|1)
* refactor: fix most of the swarm with todos

mainly leaving the multiple connections case to panic.

* feat: add ability to configure listening addr

the original random listening address is still in place.

* add test case for the panic with two connections

* fix: allow multiple connections in p2p/swarm
* doc: Connection and the any connecting address
* chore: cleanup libp2p patching examples

* refactor: rename SwarmApi::stats

perhaps roundtrip_times is more readable.

* chore: upgrade to libp2p 0.19

* fix: awaiting for binding new listening addresses

the initial implementation didn't actually wait for anything other than
asking the swarm to start listening, but now the await will complete
only after a listening address has actually been bound. this required
some nasty matching on the multiaddr protocol parts which will hopefully
ever be used by test code but ... it works now, at least a bit better.

* fix test on macos, fix unspecified addr handling
2020-05-19 17:26:57 +03:00
Mark Henderson
f4cc4a5a5c feat: /block/rm endpoint
Adding list to BlockStore trait and cleanup support

Adding list functionality and tests

wip dag put

Update Cargo.toml

Co-Authored-By: Joonas Koivunen <joonas.koivunen@gmail.com>

Delete config

fix: switching back to Vecs

feat: adding list functions to repo and ipfs

feat: working endpoint

fix: more sane newline adding

fix: clippy

fix: cargo fmt

wip: block.rm

cargo fmt

Delete refs.rs

Update lib.rs

Update fs.rs

Update v0.rs

Update v0.rs

Update fs.rs

Update mod.rs

Update mem.rs

Update mem.rs

WIP

fix: removing to_owned

WIP: Got it working but need to implement unshared and then clean up

WIP: Compiling, but empty results probably due to clone

fix: cargo fmt

feat: new result enums and implementation

fix: cargo fmt

wip: 5/8 passing tests, need options and cid in errors

wip: PR comments

fix: last test passing 🎉

fix: cargo fmt

fix: clippy and fmt

chore: socializing things

fix: adding support folder

fix: redundant clone

chore: move HandledErr

chore: fmt and TODO removal

fix: clippy

fix: cargo fmt and clippy

chore: moving to block/options.rs

fix: otiginal Cid

fix: tests

fix: clippy tests
2020-04-17 15:51:01 -04:00
Joonas Koivunen
79985e4140
Add refs endpoint (#147)
A lot of code but going back and forth as well.

* fix: request logger name for good

* wip: initial broilerplate

* feat: ipfspath parsing and walking

* refactor: rewrite to walk the path before streaming

* fix: handling 0 for ipld link

* wip: get first tests to pass

still need to figure out the Send + Sync + 'static bound, issue is with
Sync, which might come from the refs used, get_block(&cid)..

this required some unsafety to be able to present the Stream as Send +
Sync + 'static as required by hyper. not 100% sure if that pin_project
is ok to do, but the only interfaces exposed are callable as futures so
it shouldn't be too bad.

* feat: format string support
* add: manual RefsOptions deserialization to have multiple `arg`

* fix: resolve multiple paths

I had not originally noticed that we need to do the walk from multiple
paths.

* add: dag-pb specific ipfspath walking

* add: make IpfsPath better debuggable

* wip: adjust logging

* add: yield ipld parsing failed err's

* add: "specialize" ipld_links for dag-pb

* feat: support visiting unique nodes

* fix: instead of stopping, filter out too deep elements

also, this should be done when expanding the nodes, not at this stage.

* refactor: reorg and document

originally it was easier to write everything to the same file, but it
gets difficult to read after 1000 lines. while reorganising stuff into
more tight modules, some direct calls were changed not to be needed,
like RefsOptions creating the EdgeFormatter; the EdgeFormatter is not
created in the refs function itself.

chopped off parts:

 * RefsOptions stuff to refs/options.rs
 * EdgeFormatter and the string format to refs/format.rs
 * Unshared to refs/unshared.rs
 * HandledErr, StreamResponse to refs/support.rs

* refactor: minor cleanup and docs

* fix: refs tests, enable unique test

* fix: use specific rust-ipld version with cbor fix

the situation is not good, as it would make sense to re-export libipld
from ipfs as parts are already re-exported but with strange names.

* refactor: allow dead_code StringError::new

* refactor: use the Edge for refs-local as well

* chore: cargo fmt and reorder tests

* doc: replace fixme with confirmed

* add: port tests for ipfspath

* fix: unignore good_but_unsupported test

* add: test cases for slash dedup per discussion

* add: walk dag-cbor tests for IpfsPath

* add: dag-pb path walking test

* add: tests for walking over a cbor link

* add: test case for dapb link listing

* fix: refs_local test, move all tests under mod test

* fix: remove unwrap from refs-local

kept the return value as a stream. it'll at least save us the trouble of
concatenating all of the values into a big vector.
2020-04-16 16:39:48 +03:00
Mark Henderson
4f3b53c1ca fix: cleaner Cargo.lock 2020-04-15 09:47:02 -04:00
Mark Henderson
d3912d511b fix: examples and unused" 2020-04-14 08:04:06 -04:00
Mark Henderson
bf7b0535ae chore: Cargo.lock 2020-04-14 08:04:06 -04:00
David Craven
028b8074c3 wip dag put 2020-04-14 08:04:06 -04:00
Joonas Koivunen
e1d836a137 chore: update cargo lock
unsure why this happens given the changes.
2020-04-02 13:04:00 +03:00
Joonas Koivunen
9b3bc0ee91 chore: update Cargo.lock 2020-03-28 19:45:18 -04:00
Joonas Koivunen
6cbf679644
Add pubsub http (#120)
* add: pubsub http api
* add: get shoveling and subscription complications going

currently the missing piece is seeing locally sent messages in the
subscribed streams, then maybe creating a more complicated API for
subscribing which will require a single task for shoveling into the
responses.

* chore: lower timeout to pass the tests

Should probably have another drop sender here.

* fix: close stream on first error

tokio::sync::broadcast will continue after telling how many items were
lost, which seems likely with the small buffer and quickly firing more
than the buffer elements.

* fix: raise the buffer size for subscribe responses
* feat: use custom rust-libp2p to pass tests

the v0.16.2-with-floodsub-opts includes "subscribers see locally
published messages" which is needed for the conformance tests to pass.
this has been PR'd as https://github.com/libp2p/rust-libp2p/pull/1520.

* fix: pubsub test after changing the floodsub impl
2020-03-25 21:42:06 +02:00
David Craven
1e96deab76 Update Cargo.lock 2020-03-21 12:41:21 -03:00
Joonas Koivunen
ebcb230d6b refactor: rename rust-ipfs-http to ipfs-http 2020-03-17 11:14:03 +02:00
Joonas Koivunen
8b1abb3333 fix: log warning instead of eprintln 2020-03-17 11:08:33 +02:00
David Craven
794d932cf1 Remove unnecessary dependencies. 2020-03-13 13:53:55 +01:00
David Craven
1428034150 Move bitswap into it's own crate. 2020-03-13 13:53:55 +01:00
Joonas Koivunen
18975b3427 chore: refresh lockfile 2020-03-12 16:30:36 +02:00
Joonas Koivunen
c316a1c824 add: build metadata with vergen
this could be moved over to rust-ipfs but I think that people will
prefer to track their own binarys version (which is tracked hopefully in
a vcs) instead of their `rust-ipfs` deps version, which will be in their
`Cargo.lock` file.
2020-03-11 14:02:29 -04:00
Joonas Koivunen
55ad527371 fix rebased patched dep 2020-03-10 15:21:11 +02:00