Replies: 38 comments
-
@adamski With a working libp2p, you can simply connect to any existing ipfs node and start speaking the protocols you want. You would have to reimplement some of those, but the ipfs protocols are actually quite simple. Bitswap is just a single protobuf that you send to request blocks and receive (the same protobuf) to receive those blocks. You could probably implement cpp-ipfs using rust-libp2p pretty easily ;) |
Beta Was this translation helpful? Give feedback.
-
Great, thats very encouraging, thanks. |
Beta Was this translation helpful? Give feedback.
-
@whyrusleeping Coming back to this - are there any examples of using libp2p to speak to IPFS? Are there any docs that explain some of the terms here, e.g. "protobuf"? |
Beta Was this translation helpful? Give feedback.
-
@tomaka are you able to help with this at all? Any helpful links to similar JS code you can point me to? |
Beta Was this translation helpful? Give feedback.
-
Other than ipfs? (ipfs uses libp2p to talk to other ipfs nodes) What bits do you want to do? If you just want to be able to fetch data from ipfs nodes, you'll want to implement bitswap. The go implementation of that is here: https://github.com/ipfs/go-bitswap The raw protobuf message is defined here: https://github.com/ipfs/go-bitswap/blob/master/message/pb/message.proto |
Beta Was this translation helpful? Give feedback.
-
Yes, I just want to fetch and provide data to other IPFS nodes. Thanks for the links! |
Beta Was this translation helpful? Give feedback.
-
Does anyone here have a rough idea of days required to implement this? I'm in the process of applying for a research collaboration grant with a local university where implementing rust-ipfs will be the main focus. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Implementing the bitswap protocol (the name of the protocol used by IPFS) shouldn't be very difficult, as far as I know (I haven't looked into it). However you would also need to implement record stores in Kademlia (#146) and create the CLI interface. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I assume that the Kademlia record store is for local storage of other nodes on the network? Would that be based on https://github.com/libp2p/interface-record-store, or more similar to https://github.com/libp2p/js-libp2p-kad-dht? Is there any documentation that explains some of this stuff? |
Beta Was this translation helpful? Give feedback.
-
Let's move the discussion to #146 |
Beta Was this translation helpful? Give feedback.
-
I got bitswap working. The weird thing is that I always get a negative response to find_provider. By hardcoding |
Beta Was this translation helpful? Give feedback.
-
This might be caused by #694 |
Beta Was this translation helpful? Give feedback.
-
@dvc94ch do you have your code available online somewhere? |
Beta Was this translation helpful? Give feedback.
-
There are still some issues with it. I can publish it this week, just haven't gotten around to it yet. |
Beta Was this translation helpful? Give feedback.
-
@tomaka Does the chat example still work in master? I've been struggling with some kind of deadlock problem where the first message is received, but the reply never is, so I've tried tracing calls to NetworkBehaviour and UpgradeInbound/UpgradeOutbound and comparing it to the chat example, but I can't get the chat example working anymore. |
Beta Was this translation helpful? Give feedback.
-
I hacked the
In addition to that the |
Beta Was this translation helpful? Give feedback.
-
Yeah, #734 |
Beta Was this translation helpful? Give feedback.
-
What's the likelihood of For my particular use case, I don't mind having only nodes I set up being discoverable (local / remote data replication), but eventually I want to be able to have those nodes discoverable by JS and Go nodes and vice versa. |
Beta Was this translation helpful? Give feedback.
-
Curious. Running
confirmed |
Beta Was this translation helpful? Give feedback.
-
I think @richardschneider worked on this interop last, maybe they can clear something up. |
Beta Was this translation helpful? Give feedback.
-
Indeed a known issue: libp2p/go-libp2p#176 (comment) |
Beta Was this translation helpful? Give feedback.
-
#968 is now able to discover legacy IPFS clients in js and go. However, as both of them are technically specific to the ipfs-domain, I am not sure we want to have that code in the regular libp2p code, but also don't really see a way to make it more generic or nicer. I am thinking of future-gating it... |
Beta Was this translation helpful? Give feedback.
-
@gnunicorn maybe the best solution is the one all large corporations use. Write a spec for the rust-libp2p-mdns implementation, get it accepted in libp2p/specs and let every one else fix their code. |
Beta Was this translation helpful? Give feedback.
-
There's already a spec and the rust-libp2p-mdns implementation hopefully follows it. We're basically at the last step. |
Beta Was this translation helpful? Give feedback.
-
Some things are specific to rust-libp2p no? Like the service tag must be |
Beta Was this translation helpful? Give feedback.
-
That's exactly what is specified here: https://github.com/libp2p/specs/blob/2f3e55d391338a32a7cb67e4e4aa7b78d02e0d8c/discovery/mdns.md |
Beta Was this translation helpful? Give feedback.
-
Hadn't seen it because it's not in master... Thanks! So @gnunicorn and I found an issue where the multiaddr returned by the legacy mdns was unsupported which is fixed now and that the jsipfs node fails an identity check if you attempt to connect before the peer was discovered. I'm not sure what the next steps are other than waiting. |
Beta Was this translation helpful? Give feedback.
-
@dvc94ch Hi! Do you, by any chance, have this hack available somewhere? I'm trying to connect rust-libp2p with js-libp2p, and having all kind of troubles. Incompatibility between Rust & JS mDNS is one of them. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/dvc94ch/js-libp2p-mdns/commits/master |
Beta Was this translation helpful? Give feedback.
-
I'm looking around for an IPFS implementation I can use in a cross-platform desktop/mobile application. I've been playing with https://github.com/Agorise/c-ipfs, but it seems to be incomplete and unstable from my testing.
I don't necessary need a full IPFS implementation, but would ideally like to be able to interact with nodes powered by go-ipfs. My use case is "offline first" application user data storage, and I'd like to replace my current dependency on Couchbase server infastructure with IPFS.
In order to use this library I would need to create a C++ wrapper for it, but it seems that things are moving and changing fast here so I wonder if its better to wait until the API has settled?
Beta Was this translation helpful? Give feedback.
All reactions