Commit Graph

1818 Commits

Author SHA1 Message Date
Niklas Long
defa810788 doc: add missing docs for IpldDag methods 2020-11-13 10:25:49 +01:00
Niklas Long
02d98ad923 refactor: implement Lock trait on FsLock and MemLock 2020-11-12 19:32:50 +01:00
Niklas Long
b483d7a724 fix: remove file existence check for repo lock
This was after concerns were raised about potential time-of-check to
time-of-use (TOCTOU) issues. The check isn't
actually necessary as `OpenOptions::create` set to `true` will create
only if the file doesn't already exist.
2020-11-12 12:49:24 +01:00
Niklas Long
11ec571429 doc: add changelog entry for #429 2020-11-12 11:12:29 +01:00
Niklas Long
38f6b00437 test: add unit test for repo lock 2020-11-12 10:36:38 +01:00
Niklas Long
f370a9b710 refactor: expect unstead of unwrap on lock creation 2020-11-11 18:29:54 +01: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
bors[bot]
d3c84ee52e
Merge #428
428: Update to go-ipfs 0.7.0 (used in interop tests)  r=koivunej a=niklaslong

We were using `0.6.0`, this upgrades to `0.7.0`. 

I also removed the `--bits` option as `0.7` uses `ed25519` by default. 

Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-11-10 09:02:07 +00:00
Niklas Long
0effe7a18a doc: add changelog entry for #428 2020-11-09 13:41:33 +01:00
Niklas Long
bf3ad6113d ci: update go-ipfs to 0.7.0 in interop tests
This also removes the --bits arg as go-ipfs now uses ed25519 keys
instead of 2048 bit RSA by default.
2020-11-09 13:00:12 +01:00
bors[bot]
4044d6cb86
Merge #427
427: Further reduction of ipfs-http compilation times, take two r=aphelionz a=koivunej

This PR supercedes #422 as bors couldn't handle the "PR is from removed repository" case, so this is made from a branch which has only the same commit as the previous PR. PR uses the balanced tree approach from warp issue for further compilation time speedups. The commit hash differs because I apparently applied it per githubs instructions on top of different commit than the original seems to be, with different metadata.

Closes #422.

Co-authored-by: Artem Tarasov <artem@devopps.de>
2020-11-05 14:36:43 +00:00
bors[bot]
1b07ed4b9b
Merge #420
420: docs(http): initial draft of tutorial r=koivunej a=niklaslong

This is a first draft of the tutorial mentioned in #402. 

It currently covers:
- installing rust
- configuration of the `IPFS_PATH` 
- `-- init`
- `-- daemon`
- `ipfs id` from the go-ipfs CLI 


Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-11-05 10:19:22 +00:00
Artem Tarasov
b2365db44e Improved "combine" macro in ipfs-http
Copy-and-paste from https://github.com/seanmonstar/warp/issues/619;
Further reduces compilation time (30-40% improvement observed).

Removed "combine_unify" macro since it didn't add any extra benefit.
2020-11-05 11:31:04 +02:00
bors[bot]
73409a8432
Merge #423
423: http: configuration refactor r=niklaslong a=niklaslong

This is a wip but opening as a draft to keep track of this follow up to #421. This is also part of #402. 

This introduces the `Config` struct to serve as a facade to the configuration module. It's essentially a flattened `CompatibleConfigFile` struct exposing only the fields necessary to running the daemon.  


Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-10-30 17:06:57 +00:00
Niklas Long
eb005bb99a refactor(http): widen write error variant 2020-10-30 17:50:08 +01:00
Niklas Long
328d2abf54 refactor(http): flush write buffer for config file 2020-10-30 13:32:48 +01:00
Niklas Long
57226e16c1 doc: add changelog entry for #423 2020-10-30 10:56:26 +01:00
Niklas Long
9768f04f21 refactor(http): introduce Config struct as configuration facade 2020-10-29 15:20:49 +01:00
Niklas Long
58e7368100 refactor(http): return config struct in load 2020-10-29 15:20:42 +01:00
Niklas Long
4352695e6d refactor(http): return config struct in init 2020-10-29 15:20:01 +01:00
Niklas Long
ad2d93b3c9 docs(http): more small tweaks to tutorial 2020-10-27 15:48:50 +01:00
bors[bot]
83e73abffe
Merge #421
421: feat(http): create Profile abstraction to allow port choice r=koivunej a=niklaslong

This PR introduces a `Profile` abstraction to allow the customisation of port selection as discussed in #402.

Two profiles are supported: 
- `Test` for use with conformance tests (ephemeral port selection)
- `Default` serves on `4004`

Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-10-27 14:02:57 +00:00
Niklas Long
3d677c6ecc fix(http): use slice pattern matching for MultiAddr match/conversion to SocketAddr 2020-10-27 14:47:40 +01:00
Niklas Long
70c2e7d76f docs(http): small tweaks to tutorial 2020-10-27 10:00:12 +01:00
Niklas Long
07f5c6a76b docs(http): explain cmd line options in tutorial 2020-10-27 09:18:07 +01:00
Niklas Long
7b79d5d49e docs(http): remove static version from getting started examples 2020-10-26 14:52:18 +01:00
Niklas Long
9fb93fc63d fix(http): use multiaddr instead of socketaddr in config 2020-10-26 12:44:08 +01:00
Niklas Long
2039bc0ba9 doc: fix changelog entry for #421 2020-10-26 10:12:18 +01:00
Niklas Long
dfcfe84ef6 fix(http): use singular for api listening addr 2020-10-26 10:11:36 +01:00
Niklas Long
b10efa41e0 fix(http): serialise addresses.api as API 2020-10-26 10:10:51 +01:00
Niklas Long
4b58f0cdf7 doc: changelog entry for #421 2020-10-23 14:45:27 +02:00
Niklas Long
d4f475d0e1 fix(http): check for single profile before creating dir + config 2020-10-23 14:34:34 +02:00
Niklas Long
9dc0c33546 fix(http): plan for future support of multiple profiles 2020-10-23 13:38:01 +02:00
Niklas Long
ded7549c58 fix(http): create Profile abstraction to allow port choice 2020-10-22 18:08:49 +02:00
Niklas Long
ab74008ef7 docs(http): initial draft of tutorial 2020-10-21 15:50:54 +02:00
bors[bot]
e3e1cc2a38
Merge #419
419: fix(http): change default ipfs path to .rust-ipfs r=koivunej a=niklaslong

This PR changes the default `IPFS_PATH` from `.ipfs` to `.rust-ipfs` as mentioned in #402. 

I _think_ this is all that's needed? 


Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-10-21 12:11:57 +00:00
Niklas Long
6834938a4e fix(http): change default ipfs path to .rust-ipfs 2020-10-21 11:50:07 +02:00
bors[bot]
1fe59bd777
Merge #415
415: add unixfs benchmark r=niklaslong a=niklaslong

Opening this as a draft to have a discussion around the performance of the unixfs adder. 

Things I've observed so far: 
- benchmark is a little noisy (on my machine at least)
- the adder is significantly slower and more unstable when chunking by small amounts, though this is expected
- I'm not seeing clear spikes for factors of 174, just a general trend towards lower throughput as the input gets larger
- black boxing the returned blocks didn't seem to have much of an impact (small chunking size) 

I'm not sure what the best next step would be; as this is meant as a base for future improvements to unixfs, what values/resolution do we want for this? 


Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-10-14 15:31:00 +00:00
Niklas Long
c112743d6e cleanup and document benchmark 2020-10-14 16:39:52 +02:00
Niklas Long
9fe8ef6f58 add unixfs benchmark 2020-10-13 16:05:46 +02:00
bors[bot]
bebab31044
Merge #408
408: Fix gha deprecations r=koivunej a=koivunej

In this PR:

 - Fixes #407 
 - "no artifacts found" nagging for missing core files
 - 1.47 clippy warning

Github had [a security issue and will be deprecating some functionality](https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/). I learned this from the easy-to-miss workflow warnings.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
2020-10-12 10:31:07 +00:00
Joonas Koivunen
e007851434 chore: clippy match => matches! 2020-10-12 12:20:22 +03:00
Joonas Koivunen
ae5143ccb5 ci: upgrade setup-rust-action 2020-10-12 11:17:42 +03:00
Joonas Koivunen
a7e9f6ce44 ci: disable nagging when no cores found
the warning is quite unuseful since we haven't had a single core dump
after adding it, however there are important warnings from workflows we
should pay attention to.

also, adding a platform limitation cant be done because the ${{ always()
}} seems to have the highest priority.
2020-10-12 11:17:42 +03:00
Joonas Koivunen
73f9fac5ad ci: upgrade run-vcpkg 2020-10-12 11:17:42 +03:00
bors[bot]
860af8d561
Merge #414
414: Prepare 0.2.1 release r=koivunej a=koivunej

Tracked in #413. This turned out a bit misc PR with the comment removal from fetch_and_cat and all that.


Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
2020-10-08 08:18:57 +00:00
Joonas Koivunen
7cfa005ea4 chore: bump ipfs version to 0.2.1 2020-10-08 10:49:14 +03:00
Joonas Koivunen
31287cf369 doc: add commented out allow-lint, comments 2020-10-08 10:45:53 +03:00
Joonas Koivunen
4421608284 doc: remove out of date fetch_and_cat comment 2020-10-08 10:16:41 +03:00