Skip to content

chafey/js-graphsync

Repository files navigation

js-graphsync

JavaScript Implementation of GraphSync

Status

js-graphsync is under active development and not yet ready for use, see high level development plan below for where things are at. Currently all work is being done in the examples/graphsync folder, the code in /src is currently dead.

Building

npm install

Running Examples

Initializing go-ipfs

NOTE: This only needs to be done once

cd integration/go-ipfs
./init.sh

Starting go-ipfs

cd integration/go-ipfs
./start.sh

Running go-ipfs graphsync-get test app against go-ipfs

cd integration/go-ipfs
./get-from-go-ipfs.sh

Running js-graphsync requester against go-ipfs

cd examples/requester
./get-from-go-ipfs.sh

Links

High Level Development Plan

  • Spike js-graphsync requester and verify against go-graphsync responder
  • Spike js-graphsync responder and verify against both js-graphsync requester and go-ipfs graphsync-get
  • API design for all intended features (in progress)
  • Refactor js-graphsync requester to new API design
  • Add CI to run unit tests
  • Add CI to run integration test of js-graphsync requester with go-graphsync responder
  • Refactor js-graphsync responder to new API design
  • Add CI to run integration test of js-graphsync responder with go-graphsync requester
  • Add block de-duplication to js-graphsync responder for single requests
  • Add block de-duplication to js-graphsync responder for multiple requests from same requester
  • Add support for canceling requests to js-graphsync
  • Add CID skip to js-graphsync requester and responder
  • Add pause/resume functionality to js-graphsync requester and responder
  • Add hook to responder to support resource consumption accounting
  • Add hook to responder to support DOS mitigation
  • Add hook to requester to validate and buffer received blocks

go-ipfs graphsync notes

  • Appears to respond to graphsync requests on swarm endpoints
    • /ip4/127.0.0.1/tcp/4001 works at least
    • UDP does not seem to work
  • Swarm endpoints appear to be configured as follows
    • Encryption:
      • TLS - highest priority / default encryption
      • NOISE - preferred over TLS but not always available so lower priority
    • Multiplex
      • YAMUX - highest priorty - used for communicating with go-ipfs nodes only
      • MPLEX - lower priority - used for communicating with all non go-ipfs apps

About

JavaScript Implementation of GraphSync

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published