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.
-
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-setupbase-prover-setup contains the following files:
├── build.sh
├── Dockerfile
├── generator-client
├── kalypso-listener
├── refreshEnclave.sh
├── setup.sh
└── supervisord.conf -
Copy the prover-executable created in the previous sub-section to the current repo.
cp ../path_to/prover-executable .
-
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" ] -
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.
-
Make sure you backup the enclave image file.
cp nitro-enclave.eif ./path/to/backup_location
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