Skip to main content

Build the image

To create a prover enclave image, you must use the standard prover template. The prover template contains all the necessary tools that facilitate attestations once the enclave has been deployed.

  1. Clone the repo and switch to the prover template directory.

    git clone https://github.com/marlinprotocol/kalypso-enclave-setups
    cd kalypso-enclave-setups/base-prover-setup

    base-prover-setup contains the following files:

    ├── build.sh
    ├── Dockerfile
    ├── generator-client
    ├── kalypso-listener
    ├── refreshEnclave.sh
    ├── setup.sh
    └── supervisord.conf
  2. Copy the prover-executable created in the previous sub-section to the current repo.

    cp ../path_to/prover-executable .
  3. Add the prover-executable to Dockerfile.

    ./kalypso-enclave-setups/base-prover-setup/Dockerfile
    # ... existing commands
    COPY kalypso-listener ./
    RUN chmod +x kalypso-listener

    # your executables comes after this
    COPY prover-executable .

    # Don't change the entry point
    ENTRYPOINT [ "/app/setup.sh" ]
  4. Finally, build the image. You must have nitro-cli installed, as is explained in the section on building and running enclaves.

    ./build.sh

    This command will build the enclave and print the PCRs of the image. Note down the PCRs of image. They will be used later.

  5. Make sure you backup the enclave image file.

    cp nitro-enclave.eif ./path/to/backup_location
tip

It is recommended to host nitro-enclave.eif on a service like IPFS or S3 so that the image is available for Generators to participate in the Market