The zeppelin tests running the new testrpc are running out of gas when they new their crowdsale contracts. Debugging this. . .
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
@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?
I had similar problems with SC 0.3.0 but 0.3.2 fixed the OOG for me. Thanks again for the swift fix!
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
@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.
@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.
@Adrion Also, try increasing the gas in your config and coverage network from 0x666C46 to 0xfffffffffff
@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.
@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.
@cgewecke 0.4.0 fixed the issues for me. thanks
@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() 馃帀
@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
Most helpful comment
@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