Code Monkey home page Code Monkey logo

js-ipfs-bitswap's Introduction

ipfs.tech Discuss codecov CI

JavaScript implementation of the Bitswap data exchange protocol used by IPFS

Install

$ npm i ipfs-bitswap

Browser <script> tag

Loading this module through a script tag will make it's exports available as IpfsBitswap in the global namespace.

<script src="https://unpkg.com/ipfs-bitswap/dist/index.min.js"></script>

API Docs

License

Licensed under either of

Contribute

Contributions welcome! Please check out the issues.

Also see our contributing document for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

js-ipfs-bitswap's People

Contributors

achingbrain avatar alanshaw avatar daviddias avatar dependabot-preview[bot] avatar dependabot[bot] avatar dignifiedquire avatar dirkmc avatar dryajov avatar gozala avatar greenkeeper[bot] avatar greenkeeperio-bot avatar hacdias avatar hackergrrl avatar hsanjuan avatar hugomrdias avatar ipfs-mgmt-read-write[bot] avatar jacobheun avatar mkg20001 avatar npmcdn-to-unpkg-bot avatar pgte avatar richardlitt avatar richardschneider avatar semantic-release-bot avatar stensonb avatar vasco-santos avatar victorb avatar vmx avatar web-flow avatar web3-bot avatar wraithgar 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

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

js-ipfs-bitswap's Issues

Browser tests fail on my machine

Seems like the browser bundle somehow is messed up (click for log)
maciej@mkg-lenovo:~/js-ipfs-bitswap$ xvfb-run npm test

> [email protected] test /home/maciej/js-ipfs-bitswap
> aegir test -t node -t browser

Test Node.js


  bitswap without DHT
    ✓ connect 0 -> 1 && 1 -> 2 (89ms)
    ✓ put a block in 2, fail to get it in 0 (220ms)

  bitswap with DHT
    ✓ connect 0 -> 1 && 1 -> 2 (45ms)
    ✓ put a block in 2, get it in 0 (1461ms)

  bitswap with mocks
    receive message
      ✓ simple block message
      ✓ simple want message
      ✓ multi peer (23513ms)
    get
      ✓ fails on requesting empty block
      ✓ block exists locally
      ✓ blocks exist locally
      ✓ getMany
      ✓ block is added locally afterwards (216ms)
      ✓ block is sent after local add (1145ms)
      ✓ double get
    unwant
      ✓ removes blocks that are wanted multiple times

  bitswap stats
    ✓ has initial stats
    ✓ updates blocks received (508ms)
    ✓ updates duplicate blocks counters (499ms)
    connected to another bitswap
      ✓ updates stats on transfer (1035ms)
      ✓ has peer stats (359ms)

  Engine
    ✓ consistent accounting (623ms)
    ✓ peer is added to peers when message receiver or sent (1050ms)
    ✓ partner wants then cancels (14285ms)
    ✓ splits large block messages (896ms)

  network
    ✓ instantiate the network obj
    ✓ connectTo fail
    ✓ onPeerConnected success (195ms)
    ✓ connectTo success
    ✓ ._receiveMessage success from Bitswap 1.0.0 (234ms)
    ✓ ._receiveMessage success from Bitswap 1.1.0 (232ms)
    ✓ .sendMessage on Bitswap 1.1.0 (235ms)
    ✓ dial to peer on Bitswap 1.0.0 (197ms)
    ✓ .sendMessage on Bitswap 1.1.0 (324ms)

  gen Bitswap network
    ✓ retrieves local blocks (2835ms)
    distributed blocks
  time -- 801
      ✓ with 2 nodes (11191ms)

  swarms
    - 2 nodes, 2 blocks
    - 10 nodes, 2 blocks
    - 10 nodes, 10 blocks
    - 10 nodes, 20 blocks
    - 50 nodes, 2 blocks
    - 100 nodes, 2 blocks
    - 10 nodes, 100 blocks

  Ledger
    ✓ accounts

  Notifications
    ✓ hasBlock
    wantBlock
      ✓ receive block
      ✓ unwant block

  BitswapMessage
    ✓ .addEntry - want block
    ✓ .serializeToBitswap100
    ✓ .serializeToBitswap110
    ✓ .deserialize a Bitswap100 Message
    ✓ .deserialize a Bitswap110 Message
    ✓ duplicates
    ✓ .empty
    ✓ non full wantlist message
    .equals
      ✓ true, same message
      ✓ false, different entries
    BitswapMessageEntry
      ✓ exposes the wantlist entry properties
      ✓ allows setting properties on the wantlist entry
    go interop
      ✓ bitswap 1.0.0 message
      bitswap 1.1.0 message
        - full wantlist message
        - one block message

  Wantlist
    ✓ length
    ✓ entries
    ✓ sortedEntries
    ✓ contains
    ✓ with cidV1
    remove
      ✓ removes with a single ref
      ✓ removes with multiple refs
      ✓ ignores non existing removes

  WantManager
    ✓ sends wantlist to all connected peers (10254ms)

  MessageQueue
    ✓ connects and sends messages (205ms)


  62 passing (1m)
  9 pending

Test Browser


  bitswap with mocks
    1) "before all" hook
    2) "after all" hook

  Engine
    3) consistent accounting
    4) peer is added to peers when message receiver or sent
    5) partner wants then cancels
    6) splits large block messages

  Ledger
    ✓ accounts (2ms)

  Notifications
    ✓ hasBlock (2ms)
    wantBlock
      ✓ receive block (3ms)
      ✓ unwant block

  BitswapMessage
    ✓ .addEntry - want block (3ms)
    ✓ .serializeToBitswap100 (1ms)
    ✓ .serializeToBitswap110
    ✓ .deserialize a Bitswap100 Message (5ms)
    ✓ .deserialize a Bitswap110 Message (4ms)
    ✓ duplicates
    ✓ .empty
    ✓ non full wantlist message
    .equals
      ✓ true, same message (2ms)
      ✓ false, different entries
    BitswapMessageEntry
      ✓ exposes the wantlist entry properties
      ✓ allows setting properties on the wantlist entry (1ms)
    go interop
      ✓ bitswap 1.0.0 message (2ms)
      bitswap 1.1.0 message
        - full wantlist message
        - one block message

  Wantlist
    ✓ length
    ✓ entries
    ✓ sortedEntries (3ms)
    ✓ contains
    ✓ with cidV1 (3ms)
    remove
      ✓ removes with a single ref (1ms)
      ✓ removes with multiple refs
      ✓ ignores non existing removes

  WantManager
    ✓ sends wantlist to all connected peers (965ms)

  MessageQueue
    ✓ connects and sends messages (207ms)


  27 passing (12s)
  2 pending
  6 failing

  1) bitswap with mocks
       "before all" hook:
     WriteError: QuotaExceededError
    at node_modules/aegir/src/config/karma-webpack-bundle.js:120213:34
    at IDBTransaction.tx.onabort (node_modules/aegir/src/config/karma-webpack-bundle.js:37284:5)

  

  2) bitswap with mocks
       "after all" hook:
     TypeError: Cannot read property 'teardown' of undefined
    at Context.after (node_modules/aegir/src/config/karma-webpack-bundle.js:68644:10)

  

  3) Engine
       consistent accounting:
     Error: Uncaught AssertionError: expected {} to not exist (node_modules/aegir/src/config/karma-webpack-bundle.js:72269)

  

  4) Engine
       peer is added to peers when message receiver or sent:
     Error: Uncaught AssertionError: expected {} to not exist (node_modules/aegir/src/config/karma-webpack-bundle.js:72269)

  

  5) Engine
       partner wants then cancels:
     Error: Uncaught AssertionError: expected {} to not exist (node_modules/aegir/src/config/karma-webpack-bundle.js:72269)

  

  6) Engine
       splits large block messages:
     Error: Uncaught AssertionError: expected {} to not exist (node_modules/aegir/src/config/karma-webpack-bundle.js:72269)

  



Some tests are failing
Error: Some tests are failing
    at Server (/home/maciej/js-ipfs-bitswap/node_modules/aegir/src/test/browser.js:12:16)
    at removeAllListeners (/home/maciej/js-ipfs-bitswap/node_modules/karma/lib/server.js:380:7)
    at Server.<anonymous> (/home/maciej/js-ipfs-bitswap/node_modules/karma/lib/server.js:391:9)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at Server.emit (events.js:208:7)
    at emitCloseNT (net.js:1671:8)
    at _combinedTickCallback (internal/process/next_tick.js:135:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! Test failed.  See above for more details.

rebroadcast want list (should we?)

go-ipfs seams to rebroadcast the want list on a fixed interval.
In JS, there is a rebroadcastDelay defined in src/constants.js, but it's not being used.

Should we implement a rebroadcast?
If all the changes in the waitlist get broadcasted, why would a node get out of sync (unless the transport is somehow unreliable, which would be a more troubling issue...)?

@whyrusleeping do you have any insight on this?

Make CI green again

Due to CI being suuuper slow the browser tests time out while cleaning up databases. Resulting in a browser restart, making CI report red :( .Need to figure out how to fix this :(

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 devDependency

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

As peer-id is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a 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 failed Details

  • coverage/coveralls First build on greenkeeper/peer-id-0.8.2 at 92.881% 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 🌴

An in-range update of multiaddr is breaking the build 🚨

Version 2.2.3 of multiaddr just got published.

Branch Build failing 🚨
Dependency multiaddr
Current Version 2.2.2
Type devDependency

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

As multiaddr is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


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

  • coverage/coveralls Coverage pending from Coveralls.io Details

  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 5 commits .

  • d632745 chore: release version v2.2.3
  • 1939b35 chore: update contributors
  • cbfcbdb chore: update deps
  • 08d5d5d [WIP] feat: adding p2p-circuit proto (#41)
  • e7e53b9 test: use dirty-chai

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 🌴

Reconsider the MessageQueue per peer approach

As asked here: #76

Is a MessageQueue per peer the best approach? Why not piggyback on want list updates and just check what the peer wants and attach the blocks necessary?

It might be tad expensive to have a message queue for each peer, especially with a lot of Peer Churn

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

Version 0.17.9 of libp2p-ipfs-nodejs just got published.

Branch Build failing 🚨
Dependency libp2p-ipfs-nodejs
Current Version 0.17.8
Type devDependency

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

As libp2p-ipfs-nodejs is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a 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

Release Notes v0.17.9

Features

  • enable bootstrap to be an option (179021f)
Commits

The new version differs by 4 commits .

  • 6d1aefb chore: release version v0.17.9
  • 775db4c chore: update contributors
  • 2862e35 Merge pull request #64 from ipfs/feat/option-bootstrap
  • 179021f feat: enable bootstrap to be an option

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 benchmark is breaking the build 🚨

Version 2.1.4 of benchmark just got published.

Branch Build failing 🚨
Dependency benchmark
Current Version 2.1.3
Type devDependency

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

As benchmark is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a 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 failed Details

  • coverage/coveralls First build on greenkeeper/benchmark-2.1.4 at 91.722% 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 🌴

Bitswap stats

stats (exchanged byteCount and so on) kind of don't have any self-guards to overflowing

I believe that we should have a way for stats to be disabled and at the same time, make it so they are updated asynchronously, these are just shared values that are mutated with incrementations, which makes it very safe to defer.

Another things is to use a bignum library, otherwise it will get weird in long-running nodes.

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 devDependency

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

As peer-book is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


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

  • coverage/coveralls First build on greenkeeper/peer-book-0.3.1 at 92.881% Details

  • continuous-integration/travis-ci/push The Travis CI build failed 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 🌴

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

Version 0.17.10 of libp2p-ipfs-nodejs just got published.

Branch Build failing 🚨
Dependency libp2p-ipfs-nodejs
Current Version 0.17.9
Type devDependency

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

As libp2p-ipfs-nodejs is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a 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 🌴

Use modular async

  • parallel and each => run-parallel
  • series and eachSeries => run-series
  • parallelLimit and eachLimit => run-parallelLimit
  • setImmediate => global.setImmediate (shimmed through core-js already)
  • queue => need more research

An in-range update of multiaddr is breaking the build 🚨

Version 2.3.0 of multiaddr just got published.

Branch Build failing 🚨
Dependency multiaddr
Current Version 2.2.3
Type devDependency

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

As multiaddr is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a 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 failed Details

Commits

The new version differs by 3 commits .

  • 1ff2328 chore: release version v2.3.0
  • d0b6174 chore: update contributors
  • ec23f14 feat: don't throw on invalid b58 string in getPeerId (#43)

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 aegir is breaking the build 🚨

Version 11.0.1 of aegir just got published.

Branch Build failing 🚨
Dependency aegir
Current Version 11.0.0
Type devDependency

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

As aegir is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


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

  • coverage/coveralls Coverage pending from Coveralls.io Details

  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v11.0.1

Bug Fixes

  • config: update webpack.js to be compatible with webpack@2.3.0 (e82ae5f)
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-book is breaking the build 🚨

Version 0.3.2 of peer-book just got published.

Branch Build failing 🚨
Dependency peer-book
Current Version 0.3.1
Type devDependency

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

As peer-book is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • ci/circleci Your tests failed on CircleCI 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 🌴

An in-range update of async is breaking the build 🚨

Version 2.1.5 of async just got published.

Branch Build failing 🚨
Dependency async
Current Version 2.1.4
Type dependency

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

As async 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

  • coverage/coveralls Coverage pending from Coveralls.io 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 🌴

An in-range update of cids is breaking the build 🚨

Version 0.4.1 of cids just got published.

Branch Build failing 🚨
Dependency cids
Current Version 0.4.0
Type dependency

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

As cids 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 .

  • 1a8e4e5 chore: release version v0.4.1
  • aa43141 chore: update contributors
  • dceaaee chore: ^ to ~
  • 401ee20 Merge pull request #18 from ipld/greenkeeper/multihashing-async-0.4.0
  • 97c461f chore(package): update multihashing-async to version 0.4.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 🌴

Reuse WantListEntry

Ref: #76

Why have two classes for WantListEntry? The BitSwapMessage Entry only has one more property cancel, can't we just extend the other and add that property?

An in-range update of async is breaking the build 🚨

Version 2.3.0 of async just got published.

Branch Build failing 🚨
Dependency async
Current Version 2.2.0
Type dependency

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

As async 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 failed on CircleCI Details

  • continuous-integration/travis-ci/push The Travis CI build passed Details

  • coverage/coveralls First build on greenkeeper/async-2.3.0 at 91.708% 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 🌴

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

Version 0.8.5 of peer-info just got published.

Branch Build failing 🚨
Dependency peer-info
Current Version 0.8.4
Type devDependency

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

As peer-info is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a 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 failed Details

  • coverage/coveralls First build on greenkeeper/peer-info-0.8.5 at 91.722% Details

Commits

The new version differs by 5 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 ipfs-block is breaking the build 🚨

Version 0.5.5 of ipfs-block just got published.

Branch Build failing 🚨
Dependency ipfs-block
Current Version 0.5.4
Type dependency

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

As ipfs-block 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 .

  • e05695f chore: release version v0.5.5
  • d7c1d17 chore: update contributors
  • 5daf7c6 chore: ^ to ~
  • 18a7d28 fix(package): update multihashing-async to version 0.4.0 (#27)
  • ca1db3b docs(api): add it

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 multihashing-async is breaking the build 🚨

Version 0.4.5 of multihashing-async just got published.

Branch Build failing 🚨
Dependency multihashing-async
Current Version 0.4.4
Type dependency

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

As multihashing-async 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

  • coverage/coveralls Coverage pending from Coveralls.io Details

  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 5 commits .

  • 8ebf348 chore: release version v0.4.5
  • 6f10df7 chore: update contributors
  • c3ea0b8 chore: update deps
  • 3efb676 murmur3 should output 128 bit instead of 32 (#21)
  • 71aa4d3 chore: use dirty-chai

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 🌴

performance tests: define a baseline

I think we should define some performance requirements for bitswap (like, for example: "for 10 bitswaps exchanging 1000 blocks between themselves, they must execute this in X seconds or less"), and then apply these to the already existing test/benchmarks.

This is almost done (test/benchmarks already can be parametrised to spawn a network of x nodes exchanging y blocks), so I think this is just a matter of defining the baseline to:

a) prevent performance regressions
b) incorporate improvements

@victorbjelkholm @vmx Thoughts on this?

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

Version 0.21.1 of libp2p-ipfs-nodejs just got published.

Branch Build failing 🚨
Dependency libp2p-ipfs-nodejs
Current Version 0.21.0
Type devDependency

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

As libp2p-ipfs-nodejs is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • ci/circleci Your tests failed on CircleCI 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 libp2p-ipfs-nodejs is breaking the build 🚨

Version 0.18.2 of libp2p-ipfs-nodejs just got published.

Branch Build failing 🚨
Dependency libp2p-ipfs-nodejs
Current Version 0.18.1
Type devDependency

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

As libp2p-ipfs-nodejs is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


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

  • coverage/coveralls First build on greenkeeper/libp2p-ipfs-nodejs-0.18.2 at 92.881% Details

  • continuous-integration/travis-ci/push The Travis CI build failed 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 🌴

Document bitswap

Hey @dignifiedquire i have some questions re impl. Forgive silliness, first time i look at it.

  1. why is bitswap block key going to hex in the proto msg? it should be straight binary -- https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/message/index.js#L48
  2. why bitswap.stop has this.network.start() https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/index.js#L276
  3. why bitswap.network uses bl? isnt this wasteful? is it caching all buffers? (i've only glanced at bl, havent used it) https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/network/index.js#L40
  4. provierRequestTimeout spelling - https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/constants.js#L7

Notifications: More Generic events

Hey @diasdavid and the IPFS team, I'm building something that requires getting a notification from bitswap._notification and noticed that it doesn't have more generic events, events are triggered with a string that includes the block.cid usually. so creating a listener that listens to all block:* isn't that straightforward.

What if instead of using something like eventemitter2 that adds wildcard and other functionalities , we can just trigger a more generic event like so

// current implementation (notification.js)
hasBlock (block) {
    const str = `block:${block.cid.buffer.toString()}`
    this._log(str)
    this.emit(str, block)
 }

// proposed change
hasBlock (block) {
    const str = `block:${block.cid.buffer.toString()}`
    this._log(str)
    this.emit(str, block)
    // generic event
    this.emit('block', block)
}

What do you think?? Is this something you'd be interested in adding or not?

An in-range update of multiaddr is breaking the build 🚨

Version 2.2.1 of multiaddr just got published.

Branch Build failing 🚨
Dependency multiaddr
Current Version 2.2.0
Type devDependency

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

As multiaddr is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


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

  • coverage/coveralls Coverage pending from Coveralls.io 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 🌴

Limit message size to 4MB

Need to

  • check limit on incoming messages.
  • split outgoing messages into multiple if they are large.

Continue to refactor until we get something really simple

I feel that it requires a huge cognitive investment to dial into bitswap, before #76 there was not documentation making it hard to understand what is what. Also, there are a lot of design decisions that simply aren't clear from reading the code and once you start describing them, you realise that it can be so much more improved (as also noted in #76).

I would like for bitswap to reach a state where it is just obvious to understand how it works, how to improve it and how to use different bitswap strategies. I know there is some interest in the community to experiment with variations of bitswap.

I know this is a very abstract request, but there are some action items that we can start with:

  • Make code more modular (reduce size of files, right now it requires a lot of scrolling)
  • Improve documentation even further (graphs, more graphs :))
  • Explain design rationale and reference material for contributors to get a good grasp of 'why it is this way'
  • Have a way to visualise (like this http://mg8.org/processing/bt.html but better)

Reduce the number of messages sent by coalescing the ones queue

As noted in #76 (comment)

I don't see any code to coalesce messages in the messages queues, which means the more peers we have, the more buffering it will happen, to the point where the message to reset the wantlist might be added even before the previous having been sent and nothing is clearing the message queue.

This will improve performance and reduce the memory usage by a lot

An in-range update of debug is breaking the build 🚨

Version 2.6.2 of debug just got published.

Branch Build failing 🚨
Dependency debug
Current Version 2.6.1
Type dependency

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

As debug 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

  • coverage/coveralls First build on greenkeeper/debug-2.6.2 at 89.281% Details

  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 7 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 🌴

Don't pass blocks around, pass CIDs instead

As noted in: #76

The decision engine buffers the blocks in memory when it informs the message queue that there is one more block to send, this means that if thousands of transfers are being performed, every block will stay in memory till the message gets sent. A better approach would be to only read from disk when the message is going to be sent.

With this, we might loose some perf by having to go read from disk, but that is why I created this issue ipfs/js-ipfs-repo#110 to add a LRU cache on the repo.

An in-range update of ipfs-repo is breaking the build 🚨

Version 0.11.3 of ipfs-repo just got published.

Branch Build failing 🚨
Dependency ipfs-repo
Current Version 0.11.2
Type devDependency

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

As ipfs-repo is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a 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 .

  • ea308a8 chore: release version v0.11.3
  • 96c94a1 chore: update contributors
  • c5162af chore: ^ to ~
  • 0f0d686 feat: change window to self for webworker support

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 🌴

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.