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

blockTime > 2 causes contract code not be stored; --allowUnlimitedContractSize has no effect; #134

Closed
deomaius opened this issue Jul 22, 2018 · 2 comments

Comments

@deomaius
Copy link

deomaius commented Jul 22, 2018

So I'm trying to deploy a relatively large contract, which does deploy if auto-mining is disabled or is less than or equal to 2. If the blockTime is increased any more than this it reverts in the following;

Note that smaller contracts work perfectly fine, I believe this is EIP170 which prevents contracts with more than 24KB from being created after reading some past issues and developments here.

Ganache version: Ganache CLI v6.1.6 (ganache-core: 2.1.5)

OS: Mac OSx High Sierra v10.13.2

Ganache settings: ganache-cli --allowUnlimitedContractSize true --blockTime 3 --verbose true -p 9545 -u 0 -u 1 --gasLimit 0x2FEFD800000 -a 100 --defaultBalanceEther 10000

Problem:

Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: The contract code couldn't be stored, please check your gas amount.
    at Object.callback (/Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/web3/lib/web3/contract.js:147:1)
    at /Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/web3/lib/web3/method.js:142:1
    at /Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:89:1
    at /Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/truffle-migrate/index.js:225:1
    at /Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/truffle-provider/wrapper.js:134:1
    at XMLHttpRequest.request.onreadystatechange (/Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
    at XMLHttpRequestEventTarget.dispatchEvent (/Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
    at XMLHttpRequest._setReadyState (/Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
    at XMLHttpRequest._onHttpResponseEnd (/Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
    at IncomingMessage.<anonymous> (/Users/admin/.config/yarn/global/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1)
    at IncomingMessage.emit (events.js:187:15)
    at IncomingMessage.EventEmitter.emit (domain.js:460:23)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)```
@mikeseese
Copy link
Contributor

@SamGos do you have the source of your contract(s) in which we can reproduce this? We do not have these issues with our current test cases.

Are you debugging with the Velma debugger? If not, you should not use the allowUnlimitedContractSize flag. You should be optimizing you compilation on you contacts.

See https://truffleframework.com/docs/advanced/configuration#solc for using Truffle. See http://solidity.readthedocs.io/en/develop/using-the-compiler.html#compiler-input-and-output-json-description otherwise

I would still like to see your contract(s) if possible as there behavior your describing shouldn't be happening.

Thanks for reporting this!

@balexander4
Copy link

Closing this issue due to inactivity. I was unable to reproduce this issue with a large contract and the given parameters. Let us know if you have this issue in the future! Thanks!

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

No branches or pull requests

4 participants