Skip to content

Compiling provableAPI.sol with Truffle yields 43 MB of JSON #95

@zippoxer

Description

@zippoxer

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

  1. Unbox truffle-starter
  2. Run truffle compile
  3. See these 6 fat JSON files in the build/contracts directory:
7.2M    build/contracts/Buffer.json
7.2M    build/contracts/CBOR.json
7.2M    build/contracts/OracleAddrResolverI.json
7.2M    build/contracts/ProvableI.json
7.2M    build/contracts/solcChecker.json
7.2M    build/contracts/usingProvable.json

This bloat can be attributed to the AST and legacyAST attributes, which contain the same 7 million bytes in each of the 6 JSON files.

My Environment

  • Truffle v5.0.27
  • Windows 10 64-bit

Note: Successfully reproduced in WSL (Ubuntu).


Is there another way to compile the Provable contract without getting this bloat?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions