What Ciphertexts Must Be Submitted via AddCiphertextMaterial in FHEVM?

In the FHEVM architecture, when the coprocessor submits ciphertexts to the gateway via the AddCiphertextMaterial call in order to establish consensus, I have a question regarding the scope of ciphertexts involved in this process:

Which ciphertexts are actually required to be included in the consensus workflow?

  • Does this only include the initial ciphertexts directly generated by the user and provided as transaction inputs?
  • Or does it encompass all ciphertexts produced throughout the entire FHE computation pipeline, including:
    • intermediate ciphertexts generated during computation, and
    • final ciphertexts that are persisted as encrypted contract state variables?

In other words, is AddCiphertextMaterial intended solely to anchor consensus on user-submitted input ciphertexts, or is it designed to cover all ciphertext materials generated along the FHE execution path, including both intermediate and final results?

In the FHEVM protocol, the AddCiphertextMaterial process is triggered by Allowed and AllowedForDecryption events. It includes all ciphertexts that the coprocessors have been instructed to prepare for possible decryption or future access. These are final ciphertexts (e.g., encrypted balances or variables stored on-chain) that are granted access through FHE.allow or FHE.makePubliclyDecryptable.

Regarding inputs, consensus is reached when the coprocessors verify the ZK proof. There is no need to make the input decryptable if it is only used as an intermediate value in the on-chain computation graph.

Thank you for your response.
I’m curious about why the Coprocessor source code doesn’t seem to include calls to the AddCiphertextMaterial contract. Isn’t it supposed to be invoked via the Coprocessor Tx Sender?

It does

1 Like