Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Remove dependency on ethereumjs-util #10

Closed
axic opened this issue Jan 5, 2016 · 6 comments · Fixed by #111
Closed

Remove dependency on ethereumjs-util #10

axic opened this issue Jan 5, 2016 · 6 comments · Fixed by #111

Comments

@axic
Copy link
Member

axic commented Jan 5, 2016

It might make sense to remove the dependency on ethereumjs-util as it is only using sha3 and toBuffer.

Not entirely sure about it.

@kumavis
Copy link
Member

kumavis commented May 2, 2016

relevant ethereumjs/ethereumjs-util#38

@axic
Copy link
Member Author

axic commented Jun 13, 2016

I think toBuffer shouldn't be used here as that is very permissive, while according to the code documentation, the trie only accepts Buffer or String for keys and values. I would go as far as saying it should only work with Buffer and reject anything else (as it is a low-level library).

As regarding to sha3, perhaps it should use keccakjs directly.

@wanderer
Copy link
Member

yeah i'm happy limiting the api to only buffers.

@tuler
Copy link

tuler commented Dec 19, 2019

If ethereumjs-util is not being removed I'd appreciate a new release (3.1.0?) to include the version update you already did here

This is affecting truffle build

@4vadim4
Copy link

4vadim4 commented Apr 18, 2020

@tuler , what about solution ? i have same problem:

npm ERR! keccak@1.4.0 rebuild: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keccak@1.4.0 rebuild script.

this is my dependency-tree:

├─┬ ganache-cli@6.7.0
│ └─┬ ethereumjs-util@6.1.0
│   └── keccak@1.4.0 
└─┬ web3@1.2.4
  └─┬ web3-eth@1.2.4
    └─┬ web3-eth-accounts@1.2.4
      └─┬ ethereumjs-tx@2.1.2
        └─┬ ethereumjs-util@6.2.0
          └── keccak@2.1.0 

@ryanio
Copy link
Contributor

ryanio commented May 7, 2020

I believe we've reduced our usage of ethereumjs-util as much as makes sense. See #111 (comment). toBuffer is no longer used, and keccak is used appropriately.

@4vadim4 The keccak dependency of ethereumjs-util 7.0.0 was updated from 2.1.0 to 3.0.0, which comes with prebuilds for Linux, MacOS and Windows so hopefully you won't need to run node-gyp on installation anymore with mpt v4.0.0 (#111). cc @tuler

I'll link the release to close this issue when merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants