Circuit Config File

The configuration is a file that CircomJS takes to configure itself. Very similar to how hardhat uses a harhat.config.json file or typescript that uses a tsconfig.json.

The default path for this file is circuit.config.json in the current working directory of the node program.

Below is a description of the fields found inside this configuration file:

  • projectName: name of the project.

  • outputDir: path to the directory where the builds of the circuits should be kept. Build refers to the compiled circuits and associated files.

  • build: build related config for the circuits.

    • inputDir: directory where CircomJS should look for Circom files.

    • circuits: an array of circuit configurations for all individual circuits that need to be built.

      • cID: every circuit is tagged with a unique ID so that it can be fetched via CircomJS, this field needs to be unique for all circuits declared inside this array.

      • fileName: name of the Circom file to build, here for fileName multiply.circom, Circomjs will look for a file by this name inside the inputDir.

      • proofType:

        • optional field

        • the proving system you want to use, currently supports groth16 and plonk.

        • default value: Groth16

      • powerOfTauFp:

        • optional field

        • file path to the powers of tau file to be used for compiling this circuit.

        • default behavior: automatically download the ideal powers of the tau file, for now, we use powers of tau files from iden3. The default behavior will work for circuits with up to upto 256 million constraints.

        • The default behavior is something that should only be used during the testing phase and we would strongly suggest using MPC to generate these files for circuits in production.

Last updated