Infernet
General
Proofs

Proofs

The verification flow is similar to payments. However, there are some additional steps involved.

Setup

  • Both the node & the subscriber create wallets from the WalletFactory contract.
  • When a consumer creates their subscription request, they will also provide an address of a Verifier contract that will be used to verify the computation.

Subscription Processing

  • Subscription gets delivered to the node. Node checks through its list of containers to see if any of them can provide proofs alongside the computation.
  • If so, the node will dispatch the job to its container, receive results alongside with the proof, and delivers to the Coordinator contract.

Verification Being Requested

  • The Coordinator contract will collect the payment from the subscriber. It will also deduct network fees at this stage.
  • The Coordinator will check if the subscription requires some proof. If so, it will lock some amount of tokens (the same amount as the subscription) from the Node's wallet.
  • The Coordinator kick off the verification process. It does so by calling the requestProofValidation() method on the Verifier contract.

Verification can happen in one of two ways:

  1. Eager Verification
  2. Lazy Verification

Eager Verification

The Verifier contract immediately computes the verification for the proof, and calls the finalizeProofValidation() method on the Coordinator contract, delivering the results. In eager verification, the computation results are delivered in the same block as the proof settlement.

Lazy Verification

Alternatively, the Verifier contract can raise an event or store the verification request in its state, to be verified later. In this case, the computation results are delivered first, while the verification results can be delivered in a later block by the Verifier's operator. The proof will expire after a week.