Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse precomputed ciphertexts from the EVM store #206

Open
goshawk-3 opened this issue Dec 20, 2024 · 0 comments · May be fixed by #208
Open

Reuse precomputed ciphertexts from the EVM store #206

goshawk-3 opened this issue Dec 20, 2024 · 0 comments · May be fixed by #208
Assignees
Labels
bug Something isn't working

Comments

@goshawk-3
Copy link
Contributor

goshawk-3 commented Dec 20, 2024

Problem

In fhEVM native upon re-executing runTrivialEncrypt, it was observed that the existing ciphertexts for previously computed handles are not reused. Instead, the Executor is retasked to recompute them again

 function runTrivialEncrypt() external virtual returns (uint256 result) {
        bytes1 toType = 0x03;
        for (uint256 i = 1; i <= 3; i++) {
            this.trivialEncrypt(i, toType);
        }
    }

Scenario

  1. Execute runTrivialEncrypt in BLOCK_N
  2. Wait until BLOCK_N + 5 for the handles to be persisted in EVM (materialized)
  3. Re-execute runTrivialEncrypt in BLOCK_N + 5 + 1

Expected result

As with fhevm-go-coproc, we should leverage precomputed ciphertexts. In fhevm-go-coproc, successfully computed handles are marked as done in SQLite storage.

@goshawk-3 goshawk-3 self-assigned this Dec 20, 2024
@goshawk-3 goshawk-3 changed the title native: reuse precomputed ciphertexts from the EVM store Reuse precomputed ciphertexts from the EVM store Dec 20, 2024
@goshawk-3 goshawk-3 added the bug Something isn't working label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant