Nitro prover is a set of contracts in Solidity to verify attestations generated by AWS Nitro enclaves. The attestation verification is based on the attestation process specified in AWS docs. Nitro enclaves can use attestations to prove that a enclave image with specific measurements is running within the enclave. Measurements are sort of like hashes taken at various stages when enclave image is created. These can be used to uniquely identify the code running within an enclave. Attestation verification onchain helps enable usecases where compute can be performed offchain and the results can be proved onchain based on the attestation from the enclave.
Nitro prover verifies that the attestation document which contains the measurements of the code running along with other information about the enclave like the enclave key is signed with a certificate that originates from AWS Nitro root cerificate.
Foundry has to be installed to run the code in the repo.
Compile contracts using the following
forge install
forge build --via-ir
Run the tests using the following
forge test --via-ir
Setup the .env
similar to the fields mentioned in .env.example
. The contracts can then be deployed using the following
forge script script/IncrementalNitroProver.s.sol:NitroProverScript --via-ir --rpc-url arbitrum-sepolia --broadcast --verify