Commit Graph

46 Commits

Author SHA1 Message Date
Joonas Koivunen
081a598d1d test(conf): ignore pubsub tests on windows for now 2022-04-01 15:09:01 +03:00
Joonas Koivunen
82453e5850 fix(build): stop building while writing an error
forgot, you must not use backticks outside apostrophes...
2022-04-01 12:11:40 +03:00
Joonas Koivunen
ed430faed0 build: fix wrong repo urls 2021-12-02 11:46:14 +02: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
Mark Henderson
a008cb8769 Enabling pinned blocks test 2020-09-16 22:52:07 -04:00
ljedrz
c9aa5b7e7c fix: make all /bootstrap conformance tests pass
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-15 14:25:03 +02:00
ljedrz
6c2433ba8b feat: introduce most /bootstrap HTTP endpoints
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-15 09:35:03 +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
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
ce88339334 feat: enable recursive /dns
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 16:30:34 +02:00
ljedrz
1c9ac1ab58 feat: implement /dns
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 14:41:34 +02:00
ljedrz
520b9dd3b2 feat: implement /resolve
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 14:41:34 +02:00
Joonas Koivunen
33797610a9 test: skip IpfsPath pin/ls conformance tests 2020-09-01 14:42:26 +03:00
Joonas Koivunen
ed53adc72d feat: get non-ipfspath based tests working
also non-timeout ones as well.
2020-08-31 23:33:14 +03:00
ljedrz
b06d5cce56 fix: pass another dht.query conformance test
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-30 13:31:22 +02:00
Joonas Koivunen
01042136d4 chore: remove patching of .refs.local test
it was patching out the pin api use, which now works.
2020-08-27 10:15:19 +03:00
Joonas Koivunen
2658a1f5b9 feat: get first .pin tests passing 2020-08-27 10:05:56 +03:00
ljedrz
2fafec58c6 fix: don't use toString in the find_provs patch
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-26 12:23:51 +02:00
ljedrz
088bcae4ca fix: skip the multiple provide dht conformance test
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-26 11:24:29 +02:00
ljedrz
1f9f15d108 fix: patch dht/find-provs.js (object notation not implemented yet)
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-26 11:24:29 +02:00
ljedrz
ef12cb8e31 fix: fix the /dht/provide conformance tests
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-26 11:24:29 +02:00
ljedrz
a4e3bc8305 feat: enable most of the DHT conformance tests
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-26 11:24:29 +02:00
Joonas Koivunen
efcfd510e2 feat: local resolving via http
sadly the test doesnt seem to work against jsipfs over http, so it
cannot be enabled, updated the skipped comment though.
2020-08-25 12:36:37 +03:00
ljedrz
437f66d161 fix: patch add.js
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 14:58:25 +02:00
ljedrz
be8ba44e58 chore: update the conformance suite dependencies
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 14:58:25 +02:00
Joonas Koivunen
9a8267d5b5 chore: update stack limit notes 2020-08-08 11:52:15 +03:00
Joonas Koivunen
8c10a0ad0d fix: remove calling ulimit
while this may have succeeded on github actions it probably isn't wise
to run it every time at least automatically.
2020-08-07 21:05:38 +03:00
Joonas Koivunen
684ecdc9d3 doc: note lld-9 ulimit -s bisection 2020-08-07 15:06:55 +03:00
Joonas Koivunen
dc2c0217b9 feat: /add?progress=true
adds the progress reporting, which is a progress notification to the
response stream on every block write *in addition to* a notification
*after* the file has been read (order with the `Added` message doesn't
seem to have been specified).
2020-08-07 15:06:55 +03:00
Joonas Koivunen
14112c3dca feat: /add?wrap_with_directory=true
previous implementation included "defaulting the name for the wrapper
dir" which was extra and not expected by the interface tests.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
65acedae1d fix: normalize prefix slash away to enable more tests 2020-08-07 15:06:55 +03:00
Joonas Koivunen
dd8d9d9bfe conformance: enable more directory tests 2020-08-07 15:06:55 +03:00
Joonas Koivunen
cca80c433f doc: remove obsolete comment 2020-07-30 13:37:53 +03:00
Joonas Koivunen
6a33edf884 fix: dont run setup.sh twice (patching will fail) 2020-07-30 13:37:53 +03:00
ljedrz
af3e539444 fix: adjust the existing local_refs conformance test patch
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-23 14:28:12 +02:00
Mark Robert Henderson
fba5399fc1 Removing the http symlink
Update setup.sh

Update ci.yml
2020-07-20 11:09:19 -04:00
Joonas Koivunen
1b870c2d7f fix: skip the stop tests as they are the final hanging ones 2020-07-20 15:24:32 +03:00
Joonas Koivunen
153da866f0 fix: ipfsd-ctl should await for subprocess 2020-07-20 15:00:39 +03:00
Joonas Koivunen
9b9f49d75a fix: ignore possibly hanging test case 2020-07-20 12:40:45 +03:00
Joonas Koivunen
0b6e3dddad add: why-is-node-running diagnostics for win/mac builds 2020-07-20 11:55:57 +03:00
Joonas Koivunen
2576a6d77a doc: suggestions from code review
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-07-16 16:23:59 +03:00
Joonas Koivunen
d551477b7a ci: stop patching with git apply 2020-07-16 15:27:26 +03:00
Joonas Koivunen
a8cbfd8b80 doc: minor touches to conformance/README.md 2020-07-16 14:58:59 +03:00
Joonas Koivunen
e4d85b701a chore: update conformance/README.md 2020-07-16 14:44:08 +03:00
Joonas Koivunen
fef5c75b1e add link to ipfs-http debug binary 2020-07-16 14:44:08 +03:00
Joonas Koivunen
5eccb92768 copy ipfs-rust-conformance from b979f02634451ad23f
Source: b979f02634

Co-authored-by: ljedrz <ljedrz@gmail.com>
Co-authored-by: Mark Henderson <henderson.mark@gmail.com>
2020-07-16 14:42:51 +03:00