Coder Social home page Coder Social logo

libp2p / js-libp2p Goto Github PK

View Code? Open in Web Editor NEW
2.2K 2.2K 430.0 60.08 MB

The JavaScript Implementation of libp2p networking stack.

Home Page: https://libp2p.io

License: Other

JavaScript 0.96% TypeScript 98.86% Dockerfile 0.01% Makefile 0.05% Go 0.12%
ipfs js-ipfs libp2p networking-stack p2p

js-libp2p's Introduction

libp2p hex logo

The JavaScript implementation of the libp2p Networking Stack.



js-libp2p-monorepo

libp2p.io Discuss codecov CI

JavaScript implementation of libp2p, a modular peer to peer network stack

Project status

This project has been used in production for years in Ethereum, IPFS, and more. It is actively maintained by multiple organizations and continues to be improved! The API might change, but we strictly follow semver.

The documentation in the main branch may contain changes from a pre-release.

If you are looking for the documentation of the latest release, you can view the latest release on npm, or select the tag in github that matches the version you are looking for.

Want to get started? Check our GETTING_STARTED.md guide and examples.

Want to update libp2p in your project? Check our migrations folder.

Table of contents

Background

libp2p is the product of a long and arduous quest to understand the evolution of the Internet networking stack. In order to build P2P applications, devs have long had to make custom ad-hoc solutions to fit their needs, sometimes making some hard assumptions about their runtimes and the state of the network at the time of their development. Today, looking back more than 20 years, we see a clear pattern in the types of mechanisms built around the Internet Protocol, IP, which can be found throughout many layers of the OSI layer system, libp2p distils these mechanisms into flat categories and defines clear interfaces that once exposed, enable other protocols and applications to use and swap them, enabling upgradability and adaptability for the runtime, without breaking the API.

We are in the process of writing better documentation, blog posts, tutorials and a formal specification. Today you can find:

To sum up, libp2p is a "network stack" -- a protocol suite -- that cleanly separates concerns, and enables sophisticated applications to only use the protocols they absolutely need, without giving up interoperability and upgradeability. libp2p grew out of IPFS, but it is built so that lots of people can use it, for lots of different projects.

Roadmap

The js-libp2p roadmap can be found here: https://github.com/libp2p/js-libp2p/blob/main/ROADMAP.md

It represents current projects the js-libp2p maintainers are focused on and provides an estimation of completion targets.

It is complementary to the overarching libp2p project roadmap: https://github.com/libp2p/specs/blob/master/ROADMAP.md

Install

npm install libp2p

Usage

Configuration

For all the information on how you can configure libp2p see CONFIGURATION.md.

Limits

For help configuring your node to resist malicious network peers, see LIMITS.md

Getting started

If you are starting your journey with js-libp2p, read the GETTING_STARTED.md guide.

Tutorials and Examples

You can find multiple examples on the examples repo that will guide you through using libp2p for several scenarios.

Structure

Development

Clone and install dependencies:

> git clone https://github.com/libp2p/js-libp2p.git
> cd js-libp2p
> npm install
> npm run build

Tests

Run unit tests

# run all the unit tsts
> npm test

# run just Node.js tests
> npm run test:node

# run just Browser tests (Chrome)
> npm run test:chrome

Packages

List of packages currently in existence for libp2p

This table is generated using the module package-table with package-table --data=package-list.json.

Package Version Deps CI Coverage
libp2p
libp2p npm Deps GitHub CI codecov
@libp2p/interface npm Deps GitHub CI codecov
transports
@libp2p/tcp npm Deps GitHub CI codecov
@libp2p/webrtc npm Deps GitHub CI codecov
@libp2p/websockets npm Deps GitHub CI codecov
@libp2p/webtransport npm Deps GitHub CI codecov
secure channels
@chainsafe/libp2p-noise npm Deps GitHub CI codecov
@libp2p/plaintext npm Deps GitHub CI codecov
stream multiplexers
@libp2p/mplex npm Deps GitHub CI codecov
@chainsafe/libp2p-yamux npm Deps GitHub CI codecov
peer discovery
@libp2p/bootstrap npm Deps GitHub CI codecov
@libp2p/kad-dht npm Deps GitHub CI codecov
@libp2p/mdns npm Deps GitHub CI codecov
@chainsafe/discv5 npm Deps GitHub CI codecov
content routing
@libp2p/http-v1-content-routing npm Deps GitHub CI codecov
@libp2p/delegated-content-routing npm Deps GitHub CI codecov
@libp2p/kad-dht npm Deps GitHub CI codecov
peer routing
@libp2p/delegated-peer-routing npm Deps GitHub CI codecov
@libp2p/kad-dht npm Deps GitHub CI codecov
utilities
@libp2p/crypto npm Deps GitHub CI codecov
data types
@libp2p/peer-id npm Deps GitHub CI codecov
@libp2p/peer-record npm Deps GitHub CI codecov
pubsub
@ChainSafe/libp2p-gossipsub npm Deps GitHub CI codecov
@libp2p/floodsub npm Deps GitHub CI codecov

Used by

And many others...

Contribute

See CONTRIBUTING.md.

API Docs

License

Licensed under either of

js-libp2p's People

Contributors

achingbrain avatar alanshaw avatar ckousik avatar daviddias avatar ddimaria avatar dependabot-preview[bot] avatar dependabot[bot] avatar dignifiedquire avatar dirkmc avatar dryajov avatar github-actions[bot] avatar greenkeeperio-bot avatar hugomrdias avatar jacobheun avatar john-littlebearlabs avatar kumavis avatar libp2p-mgmt-read-write[bot] avatar marcopolo avatar maschad avatar mkg20001 avatar mpetrunic avatar richardschneider avatar semantic-release-bot avatar sgtpooki avatar tabcat avatar vasco-santos avatar victorb avatar web-flow avatar web3-bot avatar wemeetagain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

js-libp2p's Issues

go-js Interop: Make the dialling/listening flow independent from identify

Currently, there is a deadlock caused when connecting a go-ipfs and a js-ipfs node together, this is caused by how Identify is implemented. The tl;dr; is that go-ipfs executes the identify on the dialer side and blocks until that call is finished and js-ipfs won't 'handle' protocols until it finishes it's identify on the listening side causing a deadlock.

This issue revealed some other underlying issues that came from both implementations, since both implementations tried to hide/patch the problem that comes from having connections open (dialed or accepted), that were not identified (yet), causing issues for how protocols like bitswap, that depend on having the connection identified, to work.

In order to properly fix this issue, we need to remove this dependency/assumption on the protocols above libp2p and give them the ability to execute identify, if it didn't happen until then. By doing so, we keep our design principle of not making assumptions intact.

go-libp2p dialing flow
  1. nodeA dials to nodeB
  2. nodeA does the multistream to secio and spdy/yamux handshakes
  3. nodeA runs the Identify protocol
  4. nodeA blocks until Identify is finished. This means that no stream on this connection will be open until Identify finishes
js-libp2p dialing flow
  1. nodeA dials to nodeB
  2. nodeA does the multistream to secio and spdy/yamux handshakes
  3. nodeB runs the identify protocol. Then can open streams too on this conn
  4. nodeA opens as many streams as it wants

Issues with current design.

  • go-ipfs makes the dialer block on Identify, however, the dialer doesn't really require to run identify, because it is the only node in the connection that has the information of the other peer from the beginning.
  • lack of interop (main one)
  • protocols above are depending on the fact that Identify happened
  • go-ipfs never finishes its identify with js

Solution to mitigate this in the short term

Design changes to mitigate these issues completely.

  • add a .setPeerInfo() to the conn object, so that we can attach the Information we have about the peer in the other side
  • add a .getPeerInfo() to conn object that will retrieve the PeerInfo or execute the identify to figure it out. This will make it so that any other protocol that wants to learn its peerId, can execute it on demand, rather than hoping for it to be there. <- This is the main change that will make identify independent.
  • add a .setMuxer() to the conn object, so that the conn Object knows how to open a stream to run identify on it
  • Create a 'state' machine to signal the dialing state to a given peer
  • Extract identify to become its own module (while we are at it)

Other notes:

  • There was a decision to deprecate the protocols section on Identify, around last Summer, since it would be redundant to a multistream ls. Although it is a redundant operation, the fact is that identify is an operation that is 'almost' mandatory in the IPFS/libp2p context, which means that we can piggy back the protocols the other node supports in that round trip, so that we can save another round trip to figure out which protocols are supported. That being said, let's keep the protocols that being supported on the protobuf https://github.com/diasdavid/js-libp2p-swarm/blob/master/src/identify.proto#L24.

An in-range update of libp2p-swarm is breaking the build 🚨

Version 0.26.20 of libp2p-swarm just got published.

Branch Build failing 🚨
Dependency libp2p-swarm
Current Version 0.26.19
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As libp2p-swarm is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… ci/circleci Your tests passed on CircleCI! Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

[Cordova] Cordova + Phonegap TCP Transport

In the browser, we don't have access to TCP Sockets as we do with nodejs. However, when in cordova/phonegap environment, you have access to a webview for running JS but also a plugin architecture, where you can expose native functionality as a JS API. Hence, there could be a transport written for cordova/phonegap in Android/iOS that enables us to have a nodejs-like js-ipfs instance in a webview.

This would help with developing mobile applications for JS developers.

There are some prior art with this as well, https://www.npmjs.com/package/cordova-plugin-chrome-apps-sockets-tcp comes from Google and exposes a sockets API whose interface can be seen here: https://developer.chrome.com/apps/sockets_tcp

There is also https://github.com/blocshop/sockets-for-cordova

Ideally, the interface exposed by the plugin would be identical to the nodejs interface for sockets, and then https://github.com/libp2p/js-libp2p-tcp could be easily adapted to work.

Existing, similar issues:

Peer Routing and Content Routing (DHT)

Apologies if this is not the right place for this... still trying to wrap my head around the myriad repositories tied up with this project!

I'm just wondering if there is a roadmap (or similar) for the js-libp2p DHT functionality. I've had a bit of a poke around and discovered the -kad-routing and -kad-record-store modules, but these only provide a subset of the overall functionality described in the whitepaper, and the record store depends on the (seemingly deprecated) js-merkledag-store. Some cursory googling turns up the recently created js-libp2p-dht repo, which it seems natural to assume is the successor to these modules, but I've not found any sort of official indication that this is so.

Is this assumption correct? Will js-libp2p-kad-routing and js-libp2p-kad-record-store be superseded by js-libp2p-dht, and if so: is there a target timeframe in which to roll this out? And what areas (if any) would benefit from having more hands on deck?

Finally: just wanted to say that IPFS and libp2p are among the most exciting, and certainly the most potentially transformative pieces of emerging tech on my radar. Great stuff, everyone :)

🌟 Make stellar examples for libp2p fun! 🌟

With #94, it is now the perfect opportunity to improve libp2p examples.

We need:

An in-range update of libp2p-swarm is breaking the build 🚨

Version 0.26.17 of libp2p-swarm just got published.

Branch Build failing 🚨
Dependency libp2p-swarm
Current Version 0.26.16
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As libp2p-swarm is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… ci/circleci Your tests passed on CircleCI! Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 3 commits .

  • 4352c91 chore: release version v0.26.17
  • a7f5667 chore: update contributors
  • 4906ae3 fix: error if listener errors

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

[circuit-relay] Circuit features/functionality discussion

Here are some notes after my conversation with @diasdavid.

  1. We need a way to ask the relay for all its relayed peer connections (@diasdavid, I forgot why we needed this, can you please explain? Would this be related to point 2 in this list?)
    • After thinking about this a bit, I think what we discussed is:
      • When a peer connects to me, get its connected peers, and have it relay connection to those peers. That way we'll quickly form a mesh of peers over the same muxed channel.
      • One obvious use case I can see, for example, in orbit chat, getting peers that are trying to connect to the same channel to quickly interconnected over the already muxed channel. That should make accessing the same resource a lot quicker and reduce the number of physical connections.
  2. Enable/disable ls for available connections on relay nodes (see above ^^ @diasdavid)
  3. All peers are relays, but they can function in two modes:
    • active/proactive relays that dial into other nodes
      • this are explicitly enabled by config options
    • passive relays, which only relay over known connections, no explicit dialing. If no connection exists for the requested peer, the relay is refused.
  4. A peer can say that it's only available over a particular relay (can it be multiple relays?), by adding it to its swarm config - /p2p-circuit/< ma >
    • Useful in case of peers located in a private/slow network
    • What are the other use cases for this?
  5. Relays only relay connections from Peer A to Peer B, if there are more than one hop in the multiaddr (chaining/nesting), then its the dialer that initiates the connection to the next relay pair in the chain. This is needed so that we disclose the least possible amount of information to the network.

Here is an example of a possible circuit/relay config:

Swarm: {
  Addresses: [
    '/p2p-circuit/<multiaddr of the Relay>'
  ]
}
Relay: {
  Circuit: {
    Enabled: false,
    list-peers: false
    Proactive: false
  }
}

@lgierth @diasdavid @dignifiedquire

I'm going to start implementing some of this, in particular points 3, 4, 5, point 1 and 2 might need some discussion/clarification.

Also, lets use this issue for further discussion. :)

[switch] Filter out matching IP:PORT pairs in Identify

Once Identify is completed, before we update the info we have about one node, we have to filter out the IP:PORT pairs that are the same as ours (for example, when two nodes are in different networks but both announce 127.0.0.1:5002), this currently causes a bug because the nodes will try to dial to themselves and then the secio handshake fails, since the public key isn't going to hash to the same.

[switch] idea: multihandshake for 0-RTT handshakes

Right now, for each type of connection upgrade, we perform a multistream handshake in order to be able to support several protocols on top of the same transport. This adds a considerable amount of RTT's to the connection before it is ready, which might represent a problem for slow links.

0 handshake can bring considerable amounts performance for streaming scenarios. What if we take the multistream handshake and make a special case for a multihandshake such that we send: /multihandshake/all/the/protocols/that/will/be/stacked/ as one message, instead of handshaking each at all times. This adds the problem that by narrowing down the number of protocols + versions we are interested in talking (muxer1 vs muxer2 or encryptedChannel1 vs encryptedChannel2), we can miss a successful handshake, but for previous known peers, it should work like a charm.

Improve libp2p config

Right now, it is impossible to signal through the config if we want to use a transport just for dialing and not for listening, in fact, go-ipfs makes the hard decision of disabling any dialing from a transport from where we are not listening.

The issue is that with this design, we have to make something hacky/hard coded to enable the WebSockets transport within libp2p-swarm for dialing in the browser.

https://github.com/libp2p/js-libp2p/blob/master/src/index.js#L97-L102

Ideas:

  • Have a dialer multiaddr addr to signal that no listener should be started, but it should be considered to dial anyway
  • Have a more config option within the config.json that informs swarm to do that.

An in-range update of peer-id is breaking the build 🚨

Version 0.8.2 of peer-id just got published.

Branch Build failing 🚨
Dependency peer-id
Current Version 0.8.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As peer-id is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… ci/circleci Your tests passed on CircleCI! Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 3 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

[circuit-relay] Relay discovery

Currently we're sending only one dst address to the circuit-relay, however, the relay can discover other addresses for that peer, either through the dht or by checking it's peer-book and try all it's known addrs. Alternatively (I like this better) we can also send multiple dst addrs that the peer is reachable on, from the dialer.

Edits:
Reworded

Error in Test

Current test do not factor in changes in transport.add

transport: Β΅TP

transport: UDT

UDT is a reliable UDP based application level data transport protocol for distributed data intensive applications over wide area high-speed networks.

We want to support udt as one of the transports available to be used in libp2p.

Current endeavours:

How you can help:

  • By testing both implementations, filling issues, see if they are 'good enough to make it as a transport of libp2p already'

Reference links:

Checking for WebSockets constructor name fails under uglification

Currently to add the WebSockets transport index.js does a check for the constructor.name being 'WebSockets'. This fails under uglification unless 'WebSockets' is made a reserved word in the uglify config, as constructor names are one of the things uglify removes. I recommend that either this is documented, or a different solution is devised; there is already a TODO in the code suggesting that this is found. For example, we could standardise some kind of boolean flag in a transport class which tells libp2p to include it even if there are no listening addresses. That wouldn't be websocket-specific, and wouldn't require checking the name against a string.

WebCrypto

webcrypto

https://github.com/diasdavid/webcrypto

WebCryptoAPI polyfil to work in Node.js in the Browser (so that you don't have to be concerned about moving crypto code between a browser and server side app)

Context: nodejs/node#2833

How can you help

  • The module is still being made, if someone wants to take the lead, it would be great :)

For reference, here is the old issue: ipfs/js-ipfs#27

[switch] Prevent callback from being called more than once in LimitDialer

The callback in LimitDialer gets called more than once in certain circumstances which breaks some async artifacts such as waterfall or parallel. I have currently patched this in https://github.com/libp2p/js-libp2p-swarm/pull/224/files#diff-0e91f710aa050de15c82e5d320bb289cR41 by using once, however as @dignifiedquire pointed out, we need something smarter that cancels pending requests and does the proper clean up. This issue is here to keep track of that change.

Also, the reason not to have this as part of libp2p/js-libp2p-switch#224, is to keep it from holding that PR, tho we probably want this fixed before shipping it.

An in-range update of libp2p-ping is breaking the build 🚨

Version 0.3.2 of libp2p-ping just got published.

Branch Build failing 🚨
Dependency libp2p-ping
Current Version 0.3.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As libp2p-ping is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… ci/circleci Your tests passed on CircleCI! Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 5 commits .

  • 2a9b170 chore: release version v0.3.2
  • ee86659 chore: update contributors
  • 98e037b chore: update aegir
  • 437520a Merge pull request #41 from libp2p/greenkeeper-aegir-10.0.0
  • 6ecc650 chore(package): update aegir to version 10.0.0

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

DHTs and NATs

Hey @diasdavid,

With some of the advances we've made on Nomad, @ReidWilliams and I now have a couple specific questions regarding libp2p for our next steps / where we might contribute.

Relevant Background & State

We are almost wrapped up porting Nomad over to a js-only package (the pure-js branch is here). Our intent / end goal is for Nomad to run in the browser, connect to peers, receive messages and the like without reliance on anything outside of what IPFS / libp2p / nomad provides.

Our browser bundle builds, and as we're now looking to expose more folks to this ecosystem, one of the on-ramps is to use it as a rapid prototyping tool (been doing this already within IDEO). So to meet the goal mentioned above we're taking a couple of steps to shim the js-only module.

And this is where we have questions...

Question: DHT

Because the DHT is not yet implemented in js-land, we are adding dht-shim. Basically this is a simple server, store, and utils (only for use at this early stage) that take care of connecting peers.

I know the DHT has been on the roadmap and in the conversation for a while (also saw the recent question on it here). So with the above in mind, we're curious as to:

  • How far off it might be (I saw work started on the DHT here)?
  • Is this possibly an area where contribution is needed?

Question: Peers behind NATs

When it comes to peers behind NATs, it would be great to avoid reliance on a central signaling server (Note: the optionality of setting up your own signaling server is far better than not being able to participate). We were about to add the webrtc-star transport, but before we did this, we wanted to check in with you to see:

  • Are there any initiatives that we've missed in the community to help with connecting peers behind NATs?
  • Are there any libraries that you're aware of that might help with this? (E.g.: perhaps there's an interesting project you know of and you're awaiting someone to implement the transport)
  • Is the above-mentioned goal feasible?

Goal

Our goal is to keep moving things forward, and to continue learning by having people build :) Once we have a better understanding of the above areas, we'll get the next steps out for review!

Thanks in advance!

An in-range update of libp2p-swarm is breaking the build 🚨

Version 0.26.19 of libp2p-swarm just got published.

Branch Build failing 🚨
Dependency libp2p-swarm
Current Version 0.26.18
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As libp2p-swarm is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… ci/circleci Your tests passed on CircleCI! Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 4 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of peer-info is breaking the build 🚨

Version 0.8.3 of peer-info just got published.

Branch Build failing 🚨
Dependency peer-info
Current Version 0.8.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As peer-info is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… ci/circleci Your tests passed on CircleCI! Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 3 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

crypto channel: curveCP

CurveCP is similar to TCP but uses high-speed high-security elliptic-curve cryptography to protect every packet against espionage, corruption, and sabotage. The cryptographic tools used in CurveCP are the same as the cryptographic tools used in DNSCurve. CurveCP was announced at the 27th Chaos Communication Congress on 28 December 2010.

I've been researching and learning about CurveCP and I'm currently trying the actual state of the project. The Alpha was released on Fev 2011 and since then, I haven't find any more updates on it. Is there anyone watching very familiar with the state of the project and who is currently actively contributing to it?

Reference Links:

Event `peer:disconnect`

I need to detect the event of peers disconnecting on the DHT. Proposed api

libp2p.on('peer:disconnect', (peer) => {
})

[switch] [interop] Handle missing public key in identify

go-libp2p does not send the public key in the identify process, but rather expects secio to handle this part. To be interoperable we should

  • handle a missing public key in identify gracefully
  • expose the retrieved public key from the peer on secio
  • update the information in swarm after the retrieval of the key from secio

crypto channel: TLS 1.3

Transport Layer Security (TLS) is a protocol that ensures privacy between communicating applications and their users on the Internet. When a server and client communicate, TLS ensures that no third party may eavesdrop or tamper with any message. TLS is the successor to the Secure Sockets Layer (SSL).

Currently go-libp2p implements secio, an in house baked crypto channel library. However, IPFS will be moving to TLS eventually, which means that libp2p must offer it as a crypto channel upgrade to a connection.

Our current endeavour is to have a TLS library that is compatible and exposes an connection interface, so that we can upgrade any connection to another peer on demand. forge is a full JavaScript implementation of TLS made by the folks at Digital Bazaar.

NAT Traversal

Currently, the only mechanism to pierce through NATs in js-libp2p is the WebRTC transport. NAT Traversal is a feature that is hard to get 100% complete as there will be always more NAT implementations that will not work with the strategies we have in place. Ultimately the last resort is Relay (Circuit or Packet Switched).

There is plenty of work available for NAT Traversal, WebRTC is kind of a canon to solve this problem, but not every peer will have WebRTC neither we can trust WebRTC 100% of the times.

Here is a list of good resources to get started:

The next milestone for Relay is to support UPnP for TCP ports, the same way go-ipfs does.

An in-range update of peer-book is breaking the build 🚨

Version 0.3.1 of peer-book just got published.

Branch Build failing 🚨
Dependency peer-book
Current Version 0.3.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As peer-book is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… ci/circleci Your tests passed on CircleCI! Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Module not found: Can't resolve 'dgram'

I install some libp2p's packages on my Node.js project and I wrote some codes like below.

const libp2p = require('libp2p')
const TCP = require('libp2p-tcp')
const WS = require('libp2p-websockets')
const spdy = require('libp2p-spdy')
const secio = require('libp2p-secio')
const MulticastDNS = require('libp2p-mdns')
const DHT = require('libp2p-kad-dht')

But the multicast-dns module was occurs some error.

./~/multicast-dns/index.js
Module not found: Can't resolve 'dgram' in '/Users/sangwoojoo/Documents/work/clock-core/node_modules/multicast-dns'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.