Looking at fhevm-go, if you put the ciphertext in verifiedCiphertexts map[common.Hash]*verifiedCiphertext and return the key value for that value, the contract stores only the key value in storage.
verifiedCiphertexts map[common.Hash]*verifiedCiphertext
Since is a value stored in memory, wouldn’t it be lost when geth is restarted?
Is there separate logic for storing the ciphertext in storage?
Hello!
We store ciphertext in what we call the “protected storage”. For this, we catch the EVM opcode SSTORE and if the content is a verified ciphertext, we save it in the protected storage.
You can see the function which stores the value here: