-
Notifications
You must be signed in to change notification settings - Fork 426
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
Compiling provableAPI.sol with Truffle yields 43 MB of JSON #95
Comments
Thanks for this report. We generally had used ganache cli / truffle so this was never an apparent issue to us. We'll probably have to discuss with the team working on the ganache UI if this is something they can rectify, as I don't know the likelihood of us being able to compress parts in the API without providing something akin to a lightweight version of it. |
Verified with truffle on Mac that it does generate all those fat ABIs. However you only deploy usingProvable.sol and your own contracts AFAIK.
Still it's monster. It would be, IMHO, better to split the functionality up like Open Zeppelin so that a person can pick and choose the bits they need and not have to deploy (and pay gas for) that monolithic contract. |
@zippoxer These are Truffle Artifacts and are something over which we have no control. The awesome guys over at Truffle are aware of this issue and are working on it. You can track it via this issue here.
@cliffhall Whilst the |
@gskapka Thanks for the speedy response. I verified that it's not actually necessary to deploy the usingProvable contract as is done in the TruffleStarter demo. And in that case, the EthPrice.json abi is only 109kb. So it seems we can safely disregard these ABI artifacts. |
@cliffhall IIRC even if you don't deploy it, you import it in |
@zippoxer EthPrice.json is only 109kb. The artifacts are generated, true, but you could probably make a watcher process that deletes them with gulp or something if you're concerned about that. I was only concerned that I didn't have to actually deploy (and pay gas for) a 7MB contract :) But no, it doesn't cause ganache any worries, because the artifacts are never deployed. EthPrice.json actually has all the stuff in it from the library that it uses. |
Issue
Compiling provableAPI.sol yields 43 MB of JSON (6 files weighing ~7mb each).
Implications
For those of us who love Ganache, those huge JSON files cause Ganache UI to freeze as it tries to parse the compiled contracts, making it completely unusable.
I really want to work with Provable, but I can't ;-(
Reproduce
truffle compile
build/contracts
directory:This bloat can be attributed to the
AST
andlegacyAST
attributes, which contain the same 7 million bytes in each of the 6 JSON files.My Environment
Note: Successfully reproduced in WSL (Ubuntu).
Is there another way to compile the Provable contract without getting this bloat?
The text was updated successfully, but these errors were encountered: