Skip to main content

Build the image

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

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

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

    base-ivs-setup contains the following files:

    ├── build.sh
    ├── Dockerfile
    ├── setup.sh
    └── supervisord.conf
  2. Copy the input-verification-executable created in the previous sub-section to the current repo.

    cp ../path_to/input-verification-executable .
  3. Add the input-verification-executable to Dockerfile.

    ./kalypso-enclave-setups/base-ivs-setup/Dockerfile
    # ... existing commands

    # your executables comes after this
    COPY input-verification-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