Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of gas on 0.3.0 #141

Closed
cgewecke opened this issue Nov 6, 2017 · 12 comments
Closed

Out of gas on 0.3.0 #141

cgewecke opened this issue Nov 6, 2017 · 12 comments
Assignees
Labels

Comments

@cgewecke
Copy link
Member

cgewecke commented Nov 6, 2017

The zeppelin tests running the new testrpc are running out of gas when they new their crowdsale contracts. Debugging this. . .

@Adrion
Copy link

Adrion commented Nov 6, 2017

I upgraded my testrpc and truffle 2 days ago and it's now a total nightmare with all my tests.
And even more with the coverage.
Their new version comes with breaking changes

@cgewecke
Copy link
Member Author

cgewecke commented Nov 6, 2017

@Adrion Hi, yep. It's a fork!

There's a PR open at Zeppelin getting all their tests running clean which might be a good resource for non-coverage fixes. And I'm working on the problems here this morning.

If you are interested in a debugging session for coverage on your project if there continue to be issues after the Zeppelin suite passes I'd be happy to do that. Are you writing in the open?

@elenadimitrova
Copy link

I had similar problems with SC 0.3.0 but 0.3.2 fixed the OOG for me. Thanks again for the swift fix!

@Adrion
Copy link

Adrion commented Nov 7, 2017

Unfortunately the project is not open yet. It should be in a few weeks.
But yes I managed to make them pass with basic truffle test.

But SC crash a lot. I will check the progress and report you any issues about this :)

With SC I managed to get some to work by setting in the .solcover file --gasLimit=0x666C46
and set this profile into my truffle.js

coverage: {
      host: "localhost",
      network_id: "*",
      port: 8555,        
      gas: 0x666C46, // <-- Change here for gasLimit
      gasPrice: 0x01     
    }

But I have crashes and not every time on the same test

@cgewecke
Copy link
Member Author

cgewecke commented Nov 7, 2017

@elenadimitrova @Adrion Thank you so much. Zeppelin is also still crashing unfortunately. . .their instrumented crowd sale definitely needs more gas than the current block limit. It seems like there must be some problem with how we're modifying that.

@cgewecke
Copy link
Member Author

cgewecke commented Nov 8, 2017

@elenadimitrova @Adrion Zeppelin is running clean with 0.3.5. There are some serious issues however.

  • solidity-coverage is trapped at / below pragma 0.4.17 because above that there is rigorous enforcement of the non-state-changing character of constant, view and pure.
  • pure returns a transaction object rather than a value, making it unusable.

Let me know if you have additional bugs or recommendations. Leaving this open for the time being.

@cgewecke
Copy link
Member Author

cgewecke commented Nov 8, 2017

@Adrion Also, try increasing the gas in your config and coverage network from 0x666C46 to 0xfffffffffff

@elenadimitrova
Copy link

elenadimitrova commented Nov 8, 2017

@cgewecke Just tested 0.3.5 and that fails just after compilation with

TypeError: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.

On another hand I have a branch I'm working on which fails with OOG with SC 0.3.3. Investigating now as to the cause.

@cgewecke
Copy link
Member Author

cgewecke commented Nov 8, 2017

@elenadimitrova 0.3.3 will OOG because there is now a strict limit on the size of contracts in addition to their cost. That's fixed in 0.3.5 and Alex opened a PR earlier today which might resolve your other issues as long as you are using .call to retrieve values from view methods.

@elenadimitrova
Copy link

@cgewecke 0.4.0 fixed the issues for me. thanks

@Adrion
Copy link

Adrion commented Nov 9, 2017

@cgewecke I updated everything and yes almost all of my tests worked. Good work ! 👍

i updated my code to 0.4.18 with pure and view modifiers and yes all tests using these functions failed.

EDIT: fixed by adding .call() 🎉

@cgewecke
Copy link
Member Author

cgewecke commented Nov 9, 2017

@Adrion Starting with 0.4.0 we have a breaking change for those modifiers. They must be invoked using the .call postfix, something Truffle allows you to omit as a convenience. See #146 for more discussion of this. Sorry and thanks for helping debug this upgrade.

Oh good and thanks for your help @elenadimitrova

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

No branches or pull requests

3 participants