Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

fix: add buffer, cleanup, reduce size #170

Merged
merged 5 commits into from
Mar 23, 2020
Merged

fix: add buffer, cleanup, reduce size #170

merged 5 commits into from
Mar 23, 2020

Conversation

hugomrdias
Copy link
Member

@hugomrdias hugomrdias commented Mar 15, 2020

  • add buffer related to Track: remove usage of node globals ipfs/js-ipfs#2924
  • remove unnecessary eslint ignore
  • remove tweelnacl and use node-forge
  • remove browserify-aes and use node-forge
  • use multibase to encode b58
  • require only sha256 from multihashing
  • reduce bundle size

after all the deps here ipfs/js-ipfs#2924 are merged, libp2p-crypto will be able to be bundle with node: false 🎉

- add buffer related to ipfs/js-ipfs#2924
- remove unnecessary eslint ignore
- remove tweelnacl and use node-forge
- remove browserify-aes  and use node-forge
- use multibase to encode b58
- require only sha256 from multihashing
- reduce bundle size

after all the deps here ipfs/js-ipfs#2924 are merged libp2p-crypto will be able to be bundle with `node: false` 🎉
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

This looks great! We need to test js-libp2p with this first

@jacobheun
Copy link
Contributor

jacobheun commented Mar 16, 2020

@hugomrdias have you done any downstream testing of this with libp2p or ipfs?

reduce bundle size

Do you have any numbers on the reduction? Looks like we should add bundlesize to CI.

@hugomrdias
Copy link
Member Author

hugomrdias commented Mar 16, 2020

ah yes will update bundle size in aegir.js

155KB -> 122.65KB

Would nice to merge this already with libp2p/js-libp2p-crypto-secp256k1#25 these numbers include this PR.

@hugomrdias have you done any downstream testing of this with libp2p or ipfs?

not yet but i will im following the path :) i will report here my findings

also you can track here ipfs/js-ipfs#2924 everything in there should work together in order.

@hugomrdias
Copy link
Member Author

also dont bother fixing the bundle size github check i will do it later.

package.json Outdated Show resolved Hide resolved
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

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

Tests are all passing in libp2p, libp2p interop and js-ipfs with this. Looks good!

@jacobheun jacobheun merged commit c956d1a into master Mar 23, 2020
@jacobheun jacobheun deleted the fix/add-buffer branch March 23, 2020 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants