Proof Request
Proof Requests are fundamental to interacting with Kalypso. They tell the system exactly what kind of zero-knowledge (ZK) proof you need and your constraints or preferences for generating it.
Let's break down how this differs from traditional approaches before diving into making requests:
Traditional approach: In traditional setups, you generate the ZK proof entirely on your own device. This can be computationally demanding. Kalypso offloads this work to specialized solvers.
With Kalypso: On Kalypso, you submit a proof request with inputs which are encrypted if supposed to be private. A Proof Generator who satisfies specified constraints is chosen by the Matching Engine. After successful proof generation, the Generator puts the proof on-chain from where you can retrieve the proof. Detailed information is available in the section on Proof request and delivery lifecycle.
Request
The prover initiates a proof Request on-chain on the Kalypso contract. A Request has the following structure:
{
"market": "marketA",
"fees": "$X POND",
"time": "Y seconds",
"private_inputs": ["PvtInp1", "PvtInp2", ...],
"public_inputs": ["Input1", "Input2", ...],
"assignment_deadline" : 12323433,
"max_proof_generation_time": 5
}
- Market: Details about the specific market for which the proof is required, identified by a unique market ID.
- Budget: The maximum amount the prover is willing to spend for the proof generation service.
- Private Inputs: Inputs that need to remain confidential, encrypted using the public key of the Kalypso Matching Engine.
- Public Inputs: Public input parameters essential for proof generation.
- Assignment Deadline: The block number by which matching engine should assign the task to a Generator. That is, the assignment transaction by the Matching Engine should be smaller than or equal to the block mentioned in assignment_deadline.
- Max Proof Generation Time: The maximum number of blocks after assignment in which the Generator should confirm the proof on-chain. That is, the transaction containing the proof made by the Generator should be in a block smaller than or equal to max_proof_generation_time added to the blocknumber that contained the assignment transaction.