ScopeLift / endaoment

🍶An Interest Earning, Money Streaming, DeFi Enabled DAO
https://endaoment-app.web.app/
MIT License
15 stars 8 forks source link

Remove need for allowUnlimitedContractSize flag #16

Open mds1 opened 4 years ago

mds1 commented 4 years ago

In test-environment.config.js we currently set allowUnlimitedContractSize: true. Without this flag, deployment of EndaomentFactory fails with an out of gas error.

Investigate why and make the required changes so this is not needed.

Relevant portions of the docs from the ganache README are below:

"allowUnlimitedContractSize": boolean - Allows unlimited contract sizes while debugging (NOTE: this setting is often used in conjuction with an increased gasLimit). By setting this to true, the check within the EVM for contract size limit of 24KB (see EIP-170) is bypassed. Setting this to true will cause ganache-core to behave differently than production environments. (default: false; ONLY set to true during debugging).

apbendi commented 4 years ago

One possibility is we're genuinely over the 24 KB limit, but this would be surprising to me. Another possibility is we're hitting some kind of pathological compiler case that's producing bytecode way bigger than it needs to be. Maybe running with the optimizer would help. Will investigate.