Commit 974fe41
authored
chore(coprocessor): remove legacy tfhe-worker gRPC path (#1982)
* chore(coprocessor): remove legacy tfhe-worker grpc path
* fix(tfhe-worker): resolve clippy dead_code in bench/test utils
* refactor(tfhe-worker): remove unused computation module
* test(tfhe-worker): cap event operator coverage at uint64
* fix(coprocessor): address review noise and typos
* chore(tfhe-worker): reduce bench fmt churn in dex migration
* chore(tfhe-worker): revert formatting-only bench_id wraps
* chore(tfhe-worker): remove remaining bench format-only churn
* bench(tfhe-worker): restore dex workload parity with legacy grpc
* test(tfhe-worker): restore non-ignored coverage after grpc removal
* test(tfhe-worker): deduplicate operator event coverage
* test(tfhe-worker): harden event test stability
* test(tfhe-worker): run full event type matrix in CI
* test(tfhe-worker): default full event matrix with mode logging
* test(tfhe-worker): simplify event matrix selection
* docs(tfhe-worker): document event test matrix modes
* test(tfhe-worker): expand random event tests across types
* test(tfhe-worker): restore random type matrix parity
* test(tfhe-worker): use query! in invalid operation event test
* fix(bench): stabilize benchmark pipeline after grpc refactor
* fix(bench): allow dex setup trivial encrypt handles
* charts: bump coprocessor chart version
* tfhe-worker: propagate gpu feature to test-harness
* test(tfhe-worker): allow dependent schedule setup handle
* test(tfhe-worker): fix event test matrix CI regressions
* refactor(tfhe-worker): deduplicate test helpers and remove dead code
- Migrate operators_from_events.rs to use shared event_helpers
(setup_event_harness, next_handle, to_ty, tfhe_event, log_with_tx)
- Remove duplicate test_invalid_operation_marks_error (kept in errors.rs)
- Move wait_for_error to event_helpers for shared use
- Extract TEST_CHAIN_ID const, remove debug eprintln calls
- Remove 16 dead CoprocessorError variants from types.rs
* refactor(tfhe-worker): destructure EventHarness to reduce PR diff
Destructure setup_event_harness() return into {app, pool, listener_db}
so variable names match the original code, minimising the review diff.
* chore(tfhe-worker): remove dead deps and batch event test waits
Remove 6 Cargo dependencies that were only used by the deleted gRPC
server (sha3, lru, rayon, tfhe-zk-pok, regex, actix-web).
Restructure 4 event tests (unary, cast, if-then-else, rand) to use
batch-then-wait pattern: insert all events first, call
wait_until_all_allowed_handles_computed once, then verify. This
eliminates ~200 redundant waits in CI, saving ~10 minutes of sleep.
Also remove unnecessary pub(super) from test_fhe_rand_events.
* refactor(tfhe-worker): address PR review feedback
- Upgrade as_scalar_uint to accept &BigInt directly
- Deduplicate helpers in operators_from_events.rs (delete
insert_tfhe_event, allow_handle, as_scalar_uint copies; use
event_helpers versions)
- Delete redundant test_fhe_rand_events (subset of random.rs tests)
- Expand test_op_trivial_encrypt to cover all supported types with
edge-case values
- Add 5 error test scenarios: circular dependency, too many inputs,
scalar division by zero, binary boolean inputs, unary boolean inputs
* fix(tfhe-worker): replace validation-time error tests with execution-time ones
Remove 3 error tests (circular dependency, too many inputs, scalar div
by zero) that trigger validation-time errors in check_fhe_operand_types.
These errors propagate via ? without being persisted to the DB, causing
an infinite retry loop in event-driven mode.
Replace with test_type_mismatch_error (FheAdd on uint8 + uint16) which
passes validation but properly fails at execution time with
UnsupportedFheTypes.
The validation-path error propagation is tracked as a separate issue.
* docs: update FHE computation diagram to reflect event-driven architecture
Replace the obsolete AsyncCompute gRPC flow with the current
host-listener event-driven architecture in the sequence diagram.
* fix(tfhe-worker): fix GPU test failures in error and random bounded tests
test_coprocessor_computation_errors: Replace Cast-to-type-255 with
FheSub on mismatched types (uint32 + uint64). The old test panicked on
the GPU path during memory reservation in trivial_encrypt_be_bytes,
preventing the error from being persisted to the DB. Type-mismatch
errors return a proper Result::Err on both CPU and GPU.
test_fhe_random_bounded: Use per-type bounds from the old gRPC test
instead of upper_bound=1. The 0-random-bits edge case (bound=1)
behaves differently on GPU vs CPU. Also check bool results as
true/false rather than assuming a specific numeric value, since CPU
and GPU produce different deterministic outputs for the same seed.
* docs(tfhe-worker): fix stale README heading after gRPC removal
The server was removed; only the background worker remains.1 parent 2458fa9 commit 974fe41
File tree
33 files changed
+3422
-9479
lines changed- charts/coprocessor
- coprocessor
- docs
- fundamentals/fhevm/coprocessor
- getting_started/fhevm/coprocessor
- fhevm-engine
- .sqlx
- tfhe-worker
- benches
- src
- tests
- proto
33 files changed
+3422
-9479
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
539 | | - | |
| 538 | + | |
540 | 539 | | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | 540 | | |
548 | 541 | | |
549 | 542 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 79 | | |
86 | 80 | | |
87 | 81 | | |
88 | 82 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 83 | | |
94 | 84 | | |
95 | 85 | | |
96 | 86 | | |
97 | 87 | | |
98 | 88 | | |
99 | | - | |
100 | | - | |
101 | 89 | | |
102 | 90 | | |
103 | 91 | | |
104 | 92 | | |
105 | | - | |
106 | | - | |
107 | 93 | | |
108 | 94 | | |
109 | 95 | | |
| |||
Lines changed: 12 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
Lines changed: 0 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 18 | | |
25 | 19 | | |
26 | 20 | | |
27 | 21 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 22 | | |
33 | 23 | | |
34 | 24 | | |
35 | 25 | | |
36 | 26 | | |
37 | 27 | | |
38 | | - | |
39 | | - | |
40 | 28 | | |
41 | 29 | | |
42 | 30 | | |
43 | 31 | | |
44 | | - | |
45 | | - | |
46 | 32 | | |
47 | 33 | | |
48 | 34 | | |
| |||
61 | 47 | | |
62 | 48 | | |
63 | 49 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments