Skip to content

fix(coprocessor): decompress all ciphertexts per operation#2035

Closed
Eikix wants to merge 8 commits intomainfrom
codex/minimal-compression-rerand-repro
Closed

fix(coprocessor): decompress all ciphertexts per operation#2035
Eikix wants to merge 8 commits intomainfrom
codex/minimal-compression-rerand-repro

Conversation

@Eikix
Copy link
Copy Markdown
Contributor

@Eikix Eikix commented Feb 28, 2026

Closes zama-ai/fhevm-internal#1086

Summary

Rebuild this fix from main with a single focused change:
force ciphertext dependencies through a compressed-at-hop path, and decompress only at operation execution.

This aligns with the updated consensus model:
compress/decompress and rerand are both representation-changing transforms and must be on the same deterministic path.

What changed

  • coprocessor/fhevm-engine/scheduler/src/dfg/scheduler.rs

    • remove transaction-wide pre-decompression path
    • when filling missing tx inputs from prior results, always propagate as DFGTxInput::Compressed
    • in try_execute_node, accept compressed task inputs and decompress right before rerand/compute
    • in run_computation, always compress operation outputs (not only allowed)
  • coprocessor/fhevm-engine/scheduler/src/dfg.rs

    • propagate outputs to dependents as compressed task inputs
    • store task results as (ct_type, compressed_ct) payload
  • coprocessor/fhevm-engine/scheduler/src/dfg/types.rs

    • simplify TaskResult to compressed payload only:
      • ct_type
      • compressed_ct
      • is_allowed
      • transaction_id

Deterministic path now

For ciphertext dependencies:
compressed -> decompress -> rerand -> compute -> compress

Validation

cd coprocessor/fhevm-engine
cargo check -p scheduler
SQLX_OFFLINE=true cargo test -p scheduler --lib

@cla-bot cla-bot bot added the cla-signed label Feb 28, 2026
@mergify
Copy link
Copy Markdown

mergify bot commented Feb 28, 2026

🧪 CI Insights

Here's what we observed from your CI run for ffa590d.

🟢 All jobs passed!

But CI Insights is watching 👀

@Eikix Eikix force-pushed the codex/minimal-compression-rerand-repro branch from 0133911 to db0435b Compare March 2, 2026 10:32
@Eikix Eikix changed the title test: minimal repro for compression/rerand divergence fix(coprocessor): decompress all ciphertexts per operation Mar 2, 2026
@Eikix Eikix closed this Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants