ipfs-shipyard / java-ipfs-http-client

A Java implementation of the HTTP IPFS API
MIT License
538 stars 243 forks source link

[BOUNTY] Support for go-ipfs v0.5+ #157

Closed lidel closed 4 years ago

lidel commented 4 years ago

This issue has a bounty!

Successfully closing this issue by making a PR of production-ready code can earn you not only the undying love of the IPFS community — it can net you a financial reward. See the current list of bounty issues and their values here.

How to claim this bounty

Want to work on this bounty project? Please leave a comment on this issue, and we'll be back in touch ASAP to discuss specifics.

POST-only HTTP API

go-ipfs 0.5+ blocks GET commands on the API port (https://github.com/ipfs/go-ipfs/pull/7097), requiring every command (RPC) to be sent as HTTP POST request. See API reference docs: https://docs.ipfs.io/reference/api/http/

Testing

Download links for go-ipfs 0.5+ are available at https://dist.ipfs.io

You can also test using an ephemeral Docker container:

$ docker run --rm -it --net=host ipfs/go-ipfs:v0.6.0

Bounty

$500 for each of two tasks listed on https://github.com/ipfs/devgrants/projects/1, namely:

NadeeraM commented 4 years ago

Hi @lidel I am getting same errors when try to connect to ipfs 0.5. IS this fix support go-ipfs 0.5 and Java 10+ going to merge to the master sooner? I try to build the support go-ipfs 0.5 branch locally, but tests are failing. Hope the issue will be fixed after merging the branch to main.

lidel commented 4 years ago

@NadeeraM sadly I am not a Java dev nor have bandwidth to push this over finish line. There are bounties at https://github.com/ipfs/devgrants/projects/1 if someone wants to pick up this project and bring it up to date. One is for fixing CI and tests, second is for bringing support for go-ipfs 0.5+ and CIDv1 in Base32/Base36, but effectively both need to be done at the same time.

NadeeraM commented 4 years ago

@lidel Thank you for the reply. I manage to build the branch locally and use the jar in my project to connect to IPFS 0.5. It works fine with jar hope to use mvn dependency after fix this issues. Will have a look at the bounty board.

odisseus commented 4 years ago

Here's the list of pull requests that are related to this issue.

Necessary updates of dependency versions:

Each of the projects needs to use the latest versions of its dependencies. As those are being updated, the preferred versions will change, so I'm not creating any pull requests yet.

Latest commits as of 2020-07-28:

multibase 82a60d2ed8f12040bc36a46941be79d60ba945ea multihash 2b3b5b74e84d1a2078f15c35e4d991218c3b4e7d multiaddr 2347e9ff1b7009ac652bf39d46206df5ed3786ad cid 715d8e9b55a47180cc879e7ea6a788856559817f

Actual changes to the application logic:

Additional data: graph of the dependencies between projects

com.github.ipfs:java-ipfs-http-client:jar:v1.2.3
+- com.github.multiformats:java-multiaddr:jar:v1.3.1:compile
|  \- com.github.ipld:java-cid:jar:v1.1.0:compile
|     +- com.github.multiformats:java-multibase:jar:v1.0.0:compile
|     \- com.github.multiformats:java-multihash:jar:v1.1.0:compile
+- junit:junit:jar:4.12:test
\- org.hamcrest:hamcrest-core:jar:1.3:test

P.S. The following pull requests are not related to the issue itself but I believe they make testing and debugging a bit easier:

ianopolous commented 4 years ago

I've updated java-cid, java-multihase and java-multibase to support base32, base64 and base36.

ianopolous commented 4 years ago

Now that there is a bounty I can justify spending time on this. @lidel

ianopolous commented 4 years ago

@lidel could you get someone with admin access to circle CI to disable it for java-cid please? https://app.circleci.com/settings/project/github/ipld/java-cid

vmx commented 4 years ago

@lidel could you get someone with admin access to circle CI to disable it for java-cid please? https://app.circleci.com/settings/project/github/ipld/java-cid

@ianopolous I clicked on "Stop building" I hope that is what was needed (I don't reallyl have a clue about CircleCI).

ianopolous commented 4 years ago

Thanks @vmx! That should do it.

lidel commented 4 years ago

@autonome I believe https://github.com/ipfs-shipyard/java-ipfs-http-client/pull/170 meets the requirements for both bounties described in https://github.com/ipfs-shipyard/java-ipfs-http-client/issues/157#issue-596230528 (The PR includes all the work that had to happen behind the scenes in libraries it depends on such as java-cid, java-multihash etc)

@parkan If it's also ok with you, please coordinate payout details with @ianopolous

NadeeraM commented 4 years ago

@lidel and @ianopolous

There is a issue in new release. I cant use it in my project . Dependency is not resolving.

Check jitpack web: https://jitpack.io/#ipfs/java-ipfs-http-client/ Screenshot from 2020-08-03 10-14-18

In my project i used following as dependency but not resolving dependency.

implementation 'com.github.ipfs:java-ipfs-http-client:v1.3.0'

Could not find com.github.ipfs:java-ipfs-http-client:v1.3.0.

Thanks

ianopolous commented 4 years ago

@NadeeraM Jitpack was using Java 8. I've fixed that and bumped the version to v1.3.2

NadeeraM commented 4 years ago

@ianopolous Thank you. Its working now :+1:

parkan commented 4 years ago

nice work @ianopolous! I'll be in touch about payout shortly -- is gitcoin ok with you?

ianopolous commented 4 years ago

@parkan I'd prefer USD please. You can use https://donorbox.org/peergos or a direct transfer, whichever is easier.

parkan commented 4 years ago

@ianopolous sounds good!

lidel commented 4 years ago

@ianopolous for the sake of completenes, do you mind attaching proper .jar to v1.3.2? thanks! :pray:

ianopolous commented 4 years ago

@lidel done.