Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Awesome Endeavour: Circuit Relay #830

Merged
merged 19 commits into from
Nov 8, 2017
Merged

Awesome Endeavour: Circuit Relay #830

merged 19 commits into from
Nov 8, 2017

Conversation

dryajov
Copy link
Member

@dryajov dryajov commented Apr 13, 2017

We're getting close to completing the JS circuit implementation, this issue is to track further progress. Main work is being done here - libp2p/js-libp2p-circuit#9 libp2p/js-libp2p-circuit#14.

Assumptions (needs validation)

  1. All addresses are encapsulated with p2p-circuit by default to make them dialable over circuit relay
  2. If an explicit relay address is present don't add defaults, use that as the address instead
  3. Out of all available transports relay is dialed last

Outstanding work (this will be kept up to date with specific tasks as they come up):

  • Complete the relay spec The Circuit Relay Specification: The first iteration libp2p/specs#15
  • Verify and complete integration points in js-ipfs and libp2p
    • Finalize integrating with libp2p
    • Finalize integrating with js-ipfs
  • More test coverage and integration tests (WIP)
    • this is the latest coverage report for unit tests, lots more is needed but we're getting there
=============================== Coverage summary ===============================
Statements   : 71.03% ( 255/359 )
Branches     : 54.96% ( 72/131 )
Functions    : 70.83% ( 17/24 )
Lines        : 71.23% ( 250/351 )
================================================================================
  • Cleanup implementation
    • cleanup pull stream read/write logic
    • cleanup relay.js
    • cleanup listener.js

Outstanding PRs:

Name Ready for Review Reviewed Merged Published
libp2p-tcp
libp2p-websockets
libp2p-webrtc-star
libp2p-webrtc-direct
libp2p-circuit
libp2p-swarm
libp2p
ipfs

@diasdavid @lgierth @whyrusleeping @dignifiedquire

NOTE: I'm currently bringing this issue up to date with all the latest developments - this is still in WIP.

EDIT: This issue is up to date!

@dryajov dryajov added the status/in-progress In progress label Apr 13, 2017
@dryajov dryajov changed the title feat: adding circuit relay [WIP] feat: adding circuit relay Apr 13, 2017
@daviddias daviddias mentioned this pull request Apr 13, 2017
53 tasks
@dryajov dryajov mentioned this pull request Apr 16, 2017
9 tasks
@daviddias daviddias changed the title [WIP] feat: adding circuit relay feat: adding circuit relay May 19, 2017
@daviddias daviddias added status/ready Ready to be worked and removed status/in-progress In progress labels Jun 16, 2017
@dryajov dryajov force-pushed the feat/add-relay branch 5 times, most recently from acb7174 to 420117f Compare July 4, 2017 05:37
@daviddias daviddias changed the title feat: adding circuit relay Awesome Endeavour: Circuit Relay Jul 8, 2017
@dryajov dryajov mentioned this pull request Aug 16, 2017
48 tasks
@dryajov dryajov requested a review from daviddias August 29, 2017 18:24
@dryajov dryajov changed the title Awesome Endeavour: Circuit Relay WIP: Circuit Relay Aug 29, 2017
@daviddias daviddias changed the title WIP: Circuit Relay Awesome Endeavour: Circuit Relay Sep 1, 2017
@dryajov
Copy link
Member Author

dryajov commented Sep 1, 2017

@diasdavid

Here are the action items discussed last week:

  • Clean up libp2p tests
  • Add swarm tests
  • Work on go-js interop tests
  • Prepare demo that showcases circuit
    • Use the files transfer example

@dryajov dryajov force-pushed the feat/add-relay branch 4 times, most recently from d603202 to 4ae47e6 Compare September 3, 2017 23:12
@daviddias daviddias mentioned this pull request Sep 4, 2017
16 tasks
@dryajov
Copy link
Member Author

dryajov commented Sep 5, 2017

A quick update on whats outstanding:

  • mafmt broke with the latest changes for webrtc addresses (mafmt master), I'm working on resolving it. The only address thats broken is the webrtc one, so it isn't really blocking the rest of the effort.
  • interop tests in js-ipfs. I've got some basic tests set up in test/core that work, but need to get additional interop tests set up:
test go-relay js-relay notes
go<->go
go<->js-cli
go<->js-browser
js-cli<->go
js-cli<->js-cli
js-cli<->js-browser
js-browser<->go
js-browser<->js-cli
js-browser<->js-browser

EDIT: I'll be adding the missing tests shortly. The reason they are not added yet, is because currently spawning nodes in browser runs is extremely cumbersome. Some of this has been captured in this issue - #1030.

@daviddias
Copy link
Member

daviddias commented Sep 11, 2017

As an update to everyone following this PR, check @dryajov demoing it on the IPFS All Hands! => https://youtu.be/chAXj_vsR2s?t=25m01s

@dryajov dryajov force-pushed the feat/add-relay branch 3 times, most recently from 6c9c23f to 1c3f0db Compare September 12, 2017 19:32
.aegir.js Outdated
(cb) => spawnGoNode([
`/ip4/127.0.0.1/tcp/10032`,
`/ip4/127.0.0.1/tcp/20032/ws`
], true, 33032, 44032, cb)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is spawning a ton of go nodes for the interop tests, but interop tests never run this script because they use mocha directly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but interop tests now rely nodes spawned within the tests them self, do we want to rework it in this PR?

package.json Outdated
"test:unit:node:http": "aegir test --target node -f test/http-api/index.js",
"test:unit:node:gateway": "aegir test --target node -f test/gateway/index.js",
"test:unit:node:cli": "aegir test --target node -f test/cli/index.js",
"test:unit:browser": "aegir test --target browser --no-cors",
"test:interop": "npm run test:interop:node",
"test:interop:node": "mocha -t 60000 test/interop/node.js",
"test:interop:browser": "mocha -t 60000 test/interop/browser.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll get those in.

.aegir.js Outdated
},
hooks: {
pre: pre,
post: stop
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dignifiedquire is there a way to select custom .aegir.js for different runs? Goal here is to have one for interop and another for unit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, we can have browser.hooks, but not sure if we can have custom tags.

daviddias
daviddias previously approved these changes Nov 8, 2017
@daviddias daviddias merged commit 104ef1e into master Nov 8, 2017
@ghost ghost removed the status/in-progress In progress label Nov 8, 2017
@daviddias daviddias deleted the feat/add-relay branch November 8, 2017 09:45
@daviddias
Copy link
Member

@dryajov please go ahead and create a PR enabling Circuit Relay interop tests

@daviddias
Copy link
Member

The work continues on #1063

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awesome endeavour P0 Critical: Tackled by core team ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants