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

Truffle does not properly look up EPM packages #378

Closed
skmgoldin opened this issue Mar 21, 2017 · 15 comments
Closed

Truffle does not properly look up EPM packages #378

skmgoldin opened this issue Mar 21, 2017 · 15 comments
Assignees

Comments

@skmgoldin
Copy link
Contributor

Issue

An EPM package which is ostensibly available, https://www.ethpm.com/registry/packages/15, and for which the listed IPFS hash resolves, seems not to be looked-up correctly by Truffle when using truffle install.

Steps to Reproduce

truffle install tokens produces the error message Error: Could not find object at hash 'QmSMdCxaH1H5TfyjKVtiPKnFabkQByciTBG6FTCAiCufX7' in 5000ms.

The hash QmSMdCxaH1H5TfyjKVtiPKnFabkQByciTBG6FTCAiCufX7 does not match the hash QmTixZiE9HBpgcB5UEncmZbu7M3grPUhsMCzEMhdJAKYV5 indexed in the package registry.

Expected Behavior

Truffle should try to resolve the hash QmTixZiE9HBpgcB5UEncmZbu7M3grPUhsMCzEMhdJAKYV5, which does contain a lockfile (at the time of this bug submission).

Actual Results

Truffle tries to resolve the hash QmSMdCxaH1H5TfyjKVtiPKnFabkQByciTBG6FTCAiCufX7, which is empty.

Environment

  • Operating System: OS X
  • Truffle version: v3.1.2
  • Ethereum client: testRPC
  • node version: 7.5.0
  • npm version: 4.2.0 🔥🌳
@tcoulter
Copy link
Contributor

So it looks like HumanStandardTokenFactory.sol is missing from IPFS.

Source: /Users/tim/Documents/workspace/Consensys/test3/installed_contracts/tokens/contracts/HumanStandardTokenFactory.sol 
URI ipfs://QmSMdCxaH1H5TfyjKVtiPKnFabkQByciTBG6FTCAiCufX7

The easiest way to fix this is to publish a new version of tokens to the registry. If Ropsten is dead and won’t let you do that, then the only way to fix it is to upload HumanStandardTokenFactory.sol back to IPFS in the exact state it was in when you originally published it (so it receives the same hash).

Unfortunately this isn't a bug in Truffle so much as it is an inherent problem with IPFS. IPFS needs to Swarmify or Swarm needs to get done. :(

Going to close this for now.

@skmgoldin
Copy link
Contributor Author

Thanks amigo!

@maraoz
Copy link

maraoz commented May 5, 2017

We're also having these problems with OpenZeppelin: OpenZeppelin/openzeppelin-contracts#209
There have also been reports on slack.

Is there anything we can do to prevent this from happening? We might have to move back to npm if this keeps being an issue :(

cc: @frangio

@tcoulter
Copy link
Contributor

tcoulter commented May 5, 2017

cc @pipermerriam

Once Ropsten got attacked, EthPM development slowed down a bit. We need to add extra support to IPFS since IPFS doesn't guarantee data persistence.

@maraoz Can you guys rerelease a version of Zeppelin on EthPM to refresh the data stored on IPFS?

@ProphetDaniel
Copy link

Same issue for us both Windows and Linux when trying to install zeppelin to a Truffle project.

@maraoz
Copy link

maraoz commented May 9, 2017

We just published a new version (v1.0.5) to ethpm. Let's see if this solves the problems @tcoulter.

@maraoz
Copy link

maraoz commented May 10, 2017

It didn't. We'll have to revert to npm :(

@tcoulter
Copy link
Contributor

tcoulter commented May 11, 2017 via email

@tcoulter
Copy link
Contributor

I closed this? Reopening.

@tcoulter tcoulter reopened this May 11, 2017
@tcoulter tcoulter self-assigned this May 11, 2017
@ProphetDaniel
Copy link

I'm very worried with the openZeppelin community without the lastest version working right now. So I think @maraoz we should switch to npm right away just to make sure there won't be unnecessary hurdles for the underlying community. In the meanwhile @tcoulter will be investigating and solving the issue as soon as possible if that can be solved within truffle or maybe we will have to escalate the issue to IPFS folks in the case that's their problem impacting on this issue.

@SirensOfTitan
Copy link

What's the swarm timeline for development use cases like this? This is a pretty basic use case that undoubtedly should be a good experience (installing standards-compliant token library) so that new developers don't shy away from the platform.

Happy to lend some SWE time if you guys direct me to what I can do to help! :)

@tcoulter
Copy link
Contributor

@ProphetDaniel Regarding Zeppelin, this issue has been fixed in Truffle 3.2.3 (latest version of Truffle as of this writing). For the tokens package, however, it looks like data is missing. @skmgoldin, if you want to release a new version of the tokens package, it should fix the issue.

In general though, there was data loss at the IPFS level, and I can't speak to why (I don't have enough information). At its heart, however, there's no guarantees that any data will remain on the network, so data loss is bound to happen again. IPFS is like bittorrent: if people stop seeding the data, it's gone. IPFS's Filecoin needs to get here fast, or SWARM needs to finish development.

@SirensOfTitan There's no work that can be done as of now, unless you want to somehow speed up SWARM development.

@tcoulter
Copy link
Contributor

@SirensOfTitan Meant to say: Appreciate the offer though, and if something comes up I'll let you know.

@skmgoldin
Copy link
Contributor Author

Hey y'all I'm going to re-upload the tokens contracts tomorrow! If I don't mess it up they should be available under the same name. I'll comment here again with an update.

@tcoulter
Copy link
Contributor

@skmgoldin If you run into any trouble tomorrow please contact me directly and we'll work through it. Would love to fix the issues as you find them for quick turnaround.

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

No branches or pull requests

5 participants