This repository has been archived by the owner on Oct 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 163
ipfs-http: manual testability or discoverability #402
Labels
Comments
koivunej
added
enhancement
New feature or request
help wanted
good first issue
Good for newcomers
documentation
labels
Sep 24, 2020
Above I mentioned the [swarm] listening address of |
The #406 made the |
bors bot
added a commit
that referenced
this issue
Oct 21, 2020
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 <[email protected]>
This was referenced Oct 21, 2020
bors bot
added a commit
that referenced
this issue
Oct 27, 2020
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 <[email protected]>
bors bot
added a commit
that referenced
this issue
Oct 30, 2020
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 <[email protected]>
bors bot
added a commit
that referenced
this issue
Nov 5, 2020
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 <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
This was cut from the v0.2.0 release for present time constraints however making ipfs-http more accessible as "the" ipfs binary would make the project more accessible to anyone just wanting to try it out. At the moment I see the following obstacles:
http/README.md
has no tutorial on how to try outipfs-http
ipfs-http
supports onlyinit --profile test --bits b
where b >= 2048ipfs-http
only binds to ephemeral localhost port for httpipfs-http
currently by default uses~/.ipfs
which is go-ipfs usesipfs-http
is "a bit incompatible" with go-ipfs 0.6 CLI at least, which Improve /add interop #380 started to exploreThe tutorial could be simple one which would show how to interact using go-ipfs CLI with the
ipfs-http
, something along the lines of:cargo run -p ipfs-http -- init
cargo run -p ipfs-http -- daemon
IPFS_PATH=~/.rust-ipfs go-ipfs-binary-somewhere id
ipfs-http
supporting only theinit --profile test --bits b
where b >= 2048 would be quite easy to fix so that it would supportinit
andinit --bits b
where b >= 2048 by adding a profile abstraction or even a simple if-tornado in place of:rust-ipfs/http/src/config.rs
Lines 68 to 74 in 722d41a
(I haven't really looked at go-ipfs init profiles, they might have more in-depth features but the "test or default" would most likely be enough here.)
The
ipfs::config::BOOTSTRAP_NODES
would need to be populated whenever in this "default" or not given profile along with listening address of/ip4/0.0.0.0/tcp/4004
. Also the http API port would need to be specified as it is quite frustrating to copy and paste the multiaddr from the stdout produced bycargo run -p ipfs-http -- daemon
and convert it to normal address for curl by hand. The ipfs-http::config::CompatConfigFile does not currently have any field(s) for configuring the API listening address. The API listening address needs to remain random for the--profile test
usage in conformance tests.The "a bit incompatible" can be seen by trying to
go-ipfs-0.6 add
stuff in; I was being too conservative here and go-ipfs probably uses just small variation to "file" as the field name:rust-ipfs/http/src/v0/root_files/add.rs
Lines 148 to 153 in 722d41a
The repo directory set by default is just wrong: we are not aiming for repo compatibility and as such, the we should be following js-ipfs lead and use
~/.rust-ipfs
by default (js-ipfs uses~/.jsipfs
).This has many parts and is well suited to be implemented in quite atomic PRs. If you are interested in working on any part of this, please leave a comment below.
The text was updated successfully, but these errors were encountered: