Giter VIP home page Giter VIP logo

Comments (32)

 avatar commented on August 29, 2024 1

I still don't get all this cryptocoin-stuff. I thought thought that a transfere takes some time (minutes to hours)... but the "lunch" is already available! Thanks a lot!

from truffle-core.

gitcoinbot avatar gitcoinbot commented on August 29, 2024

This issue now has a funding of 0.3 ETH (369.6 USD) attached to it.

  • If you would like to work on this issue you can claim it here.
  • If you've completed this issue and want to claim the bounty you can do so here
  • Questions? Get help on the Gitcoin Slack
  • $17919.44 more Funded OSS Work Available at: https://gitcoin.co/explorer

from truffle-core.

vs77bb avatar vs77bb commented on August 29, 2024

@nlaz Interested in this issue?

from truffle-core.

nlaz avatar nlaz commented on August 29, 2024

Yeah I'll claim it. Thanks @vs77bb

from truffle-core.

gnidan avatar gnidan commented on August 29, 2024

Thanks @nlaz!

Ideal solution would be to set up proper mocks for EthPM; let me know what approach you're thinking of before diving in. Appreciate it!

from truffle-core.

vs77bb avatar vs77bb commented on August 29, 2024

@nlaz @gnidan Sounds good, issue is in your hands Niko. @owocki Niko and I are working to get the issue formally claimed on Gitcoin... high gas prices causing a hold up. Told him it's his to run with, though!

from truffle-core.

nlaz avatar nlaz commented on August 29, 2024

Hey @gnidan thanks for the support. Can you give me an example of an instance where the CI failed because of these tests? This would be helpful to know how to repro the issue. I agree with you that mocking EthPM is the better approach. Disabling tests specifically for CI seems troublesome. After looking at the code, my approach would likely involve giving lib/package.js a small refactor to accept an optional EthPM object in order to mock it in the test. I would then test whether installDependency or install was called correctly for EthPM. Does this sound reasonable to you?

from truffle-core.

gnidan avatar gnidan commented on August 29, 2024

@nlaz it doesn't look like there are currently any failed CI jobs because of that test - your best bet might be to run that test repeatedly (locally). It's an intermittent failure, but I believe it occurs often enough that you should be able to catch it.

If you can't catch it, remove the retries logic in the test(s).

As far as that approach: it sounds good. I would be interested to see the ramifications outside lib/package.js, e.g. how the EthPM object is initialized and passed in, in the two environments (test / not test). Let me know once you start to make headway and/or if you have any questions!

Thanks!

from truffle-core.

nlaz avatar nlaz commented on August 29, 2024

@gnidan sadly I am going to back out of this ticket. It's going to take someone more familiar with the codebase than I to avoid accidentally introducing side effects into the code following the above approach. I would recommend either passing in an optional mocked EthPM object into Package.install or stubbing out a global EthPM object in the tests. Hopefully someone else has more luck than I tackling this ticket.

from truffle-core.

owocki avatar owocki commented on August 29, 2024

thanks for letting us know @nlaz :)

from truffle-core.

 avatar commented on August 29, 2024

@gnidan , can you please provide:

Reproduction

The steps (ideally command-line commands) to reproduce the error.

Additionally, its not clear: does the error occour during the tests of the truffle-core code itself, or when a project is created and tested?

Dev System Setup

Instructions on how to setup a development environment in order to contribute to truffle (in general, looks like this is generally missing in the overall project).

from truffle-core.

gnidan avatar gnidan commented on August 29, 2024

@lazaridiscom:

Thanks for looking to take this on! To address your points:

Dev System Setup: Please see the Truffle project's CONTRIBUTING guide, which should outline the steps you need to get a working local copy of Truffle for development.

Reproduce Steps: Although this won't reliably reproduce the issue every time, you can increase the failure rate of the test by removing this line: https://github.com/trufflesuite/truffle-core/blob/develop/test/ethpm.js#L121. The error occurs in truffle-core, as part of the Package.install() operation, caused by intermittent network problems.

Obtaining more reliable reproduce steps can be considered part of the work if it helps you achieve the goal, but it may not be necessary—mocking EthPM in this test would be sufficient to meet the terms of the bounty, since removing the test's dependency on the network would also remove this intermittent failure.

Let me know if there's anything else I can help with. Thank you!

from truffle-core.

 avatar commented on August 29, 2024

Thanks for all the info. The contributing guide gives good instructions, project setup is quite easy.

As for the issue, the expected Time-frame: 7 to 14 days (I will dive-in in tiny daily increments, in parallel to other tasks).

For now all fine from my side.

from truffle-core.

 avatar commented on August 29, 2024

Note that I'm running into WinOS related problems (#105, #106, #107).

As the Truffle website states "Requires NodeJS 5.0+. Works on Linux, macOS, or Windows.", those must be fixed anyway before working on the main problem.

from truffle-core.

 avatar commented on August 29, 2024

I've isolated the first problem-root, which is surprisingly the sandbox-creation. The reliance on github repos (not git but github) should be reduced, ideally to zero. The problems with http://raw.githubusercontent.com/ seem to be even worser, so this one should be avoided, too (coming to this next days).

from truffle-core.

 avatar commented on August 29, 2024

TruffleBox.sandbox() works now from local data (on my machine, quick-n-dirty workaround). The related sporadic (or intermittent) errors are gone.

I am now at the point where the sporadic test-error related to EthPM happens. Mocking EthPM will not be necessary, just the GithubExamples functionality of EthPM must be relayed to a local source (away from raw.githubusercontent.com).

For today I take a break to overthink all this, possibly to come up with a conceptually clean concept to avoid such errors in future completely.

from truffle-core.

 avatar commented on August 29, 2024

GithubExamples.initialize() works now on local data.

After fixing/working around #105, #106, #107, #108, #109, the tests run now off-line on my side.

Now the 2 surprises:

a) Essentially, a EthPM Mock is already available ("Create a fake EthPM host and memory registry").
b) The sporadic test failure is still there.

Further Tasks/Issues

  • Debug the sporadic EthPM test-failure in off-line mode
  • Provide a unified method to work on local data
  • Document Source Code

Those tasks/issues would be in essence new 'bounties', as they are quite important.

(I will continue at this point with the debugging anyway, but i expect that i will hit on more and more issues)

from truffle-core.

 avatar commented on August 29, 2024

Further Isolation: The sporadic error (causing a timeout, even off-line) is caused here:

https://github.com/trufflesuite/truffle-core/blob/develop/lib/package.js#L69

and goes further into:

https://github.com/trufflesuite/ethpm-js/blob/master/lib/installer.js#L51

I don't think that this should be in any way "mocked away" (thats why I didn't went this path). It should be pinpointed and fixed at all cost, cause such deeply hidden sporadic errors can bring up more trouble, possibly at customer installations.

(giving up for today, headaches...)

from truffle-core.

 avatar commented on August 29, 2024

The final cause: https://github.com/trufflesuite/ethpm-js/blob/master/lib/preflight.js#L9

from truffle-core.

gnidan avatar gnidan commented on August 29, 2024

@lazaridiscom: This is quite excellent. Thank you very much for all the research on this, it's extremely helpful. I'm out of town this week, but I will review your efforts in more detail when I get back.

If you get to a point where you can open a PR with your discovered fixes up to this point, we can get that merged and get you the bounty. It looks like the follow-up work is substantial, so let's plan on getting an additional bounty up for all the effort you've put in. (cc @owocki @vs77bb)

from truffle-core.

 avatar commented on August 29, 2024

@gnidan, you're welcome, and I have to thank you for having this opportunity here. I simply continue here, filing new issues that pop up. As for the bounty stuff, I trust you.

I'll see to it to get everything into PRs, just please be aware that in some cases its not the the PR that is relevant, but the message "that's the solution" or "there's the bug" (leaving the implementation to the core-developers who know the code/architecture best). This could be relevant for your Gitcoin system, too.

from truffle-core.

 avatar commented on August 29, 2024

The wget.request within ipfshost causes the timeout (http.request internally). Setting a timeout: 10000 a few lines above wget confirms this.

IPFS server: problem is not with the IPFS local server, as the relevant URI gives a normal response from a browser (during the timeout period).

IPFS host: possibly the ipfs client/host code is responsible (hidden errors like connection-resets etc.)

from truffle-core.

 avatar commented on August 29, 2024

FINAL ERROR

The sporadic error is caused by the parallel read-operations within ethpm/lib/indexes/github-examples.js, which disrupted the order of the examples. Whenever package transferable was before owner, transferable got a wrong package_name assigned, causing the system to hang (no error message).

FIX

The solution is simple: ensure that the order of the examples is kept:

https://github.com/trufflesuite/ethpm-js/blob/master/lib/indexes/github-examples.js#L55

change:

Object.keys(results).forEach(function(package_name) {

to

examples.forEach(function(package_name) {

Thus the original package-name order is kept.

RESUME

The initial happiness is gone, now comes the bitterness of the so so many time spend on this tiny thing.

All raised issues should be solved, and of course new test-cases should be implemented, in order to catch this bug within the the EthPM test-suite (for the case of future regression).

from truffle-core.

 avatar commented on August 29, 2024

@gnidan , this gitcoin process kills my creativity/productivity. Possibly you can just use this address here for a manual transfer: 0x61cbbb74a5d61a218c9d39ca270b3232de6a9ebd - thank you!

Edit: or drop me the necessary fees 0xcAB13E6D9a85296e332dBE0ACDfbB917Ae86f111 (that's my MetaMask account).

from truffle-core.

gnidan avatar gnidan commented on August 29, 2024

@owocki could we get @lazaridiscom this bounty?

@lazaridiscom - sorry that this process has been stressful. I know there is a budget and smart contract functionality for "tipping", but I'll have to sync up with @owocki about how I can do that. definitely want to get you something more than the 0.3 ETH for all the work you've put in. it's been enormously helpful. just please, bear with us as this collaborative effort between Truffle and Gitcoin becomes more fluid. no need to stress about whether you will be paid - you've gone far and above what was expected here, and I will personally make sure you are rewarded accordingly.

from truffle-core.

 avatar commented on August 29, 2024

@gnidan , no worries, I trust you folks 100%-ly. I was "ranting" (or "communicating unfiltered") a little bit, simply because I really like this gitcoin thing, and I would like the folks there to feel my ( a new users) pain a little bit, thus they fix things.

From you, at this point I would just need the "necessary fees" (the gas, $5 or so) on my MetaMask 0xcAB13E6D9a85296e332dBE0ACDfbB917Ae86f111, so I can continue the usual process on gitcoin (yeah, I fixed this hellish sporadic bug, but I failed to purchase Ether on the exchanges... well...).

(You can place new bounties on the issues I've opened. The workarounds need some work to be converted to real patches.)

from truffle-core.

gnidan avatar gnidan commented on August 29, 2024

@lazaridiscom sent you some ether from my personal account. consider it the equivalent of me buying you lunch :)

from truffle-core.

gitcoinbot avatar gitcoinbot commented on August 29, 2024

Work for 0.3 ETH (261.08 USD) has been submitted by @lazaridiscom.

@lazaridiscom, please leave a comment to let the funder (@owocki) (and the other parties involved) that you've submitted you work. If you don't leave a comment, the funder may expire your submission at their discretion.

from truffle-core.

owocki avatar owocki commented on August 29, 2024

@owocki could we get @lazaridiscom this bounty?

paying out now

@lazaridiscom - sorry that this process has been stressful. I know there is a budget and smart contract functionality for "tipping", but I'll have to sync up with @owocki about how I can do that. definitely want to get you something more than the 0.3 ETH for all the work you've put in.

@gnidan hit me up on slack and we can work it out

from truffle-core.

gitcoinbot avatar gitcoinbot commented on August 29, 2024

The funding of 0.3 ETH (259.05 USD) attached to this issue has been approved & issued to @lazaridiscom.

from truffle-core.

 avatar commented on August 29, 2024

@owocki , @gnidan , thanks a lot!

from truffle-core.

 avatar commented on August 29, 2024

@gnidan , this fix is still not applied. I can bet that this causes some other hidded errors somewhere else (caused by ethpm-js):

trufflesuite/ethpm-js#6

from truffle-core.

Related Issues (20)

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.