feat(gateway-contracts): extend keygen EIP712 with extra data#2056
feat(gateway-contracts): extend keygen EIP712 with extra data#2056isaacdecoded wants to merge 7 commits intofeat/kms-context-switchfrom
Conversation
* 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.
#2029) Error tests now assert the specific error message instead of only checking is_error == true. The bounded random test now generates two samples per type with different seeds and asserts they differ, catching any constant-output RNG implementation including always-zero. Closes zama-ai/fhevm-internal#1077
🧪 CI InsightsHere's what we observed from your CI run for 73c6d91. 🟢 All jobs passed!But CI Insights is watching 👀 |
|
@claude /pr-review |
|
Claude finished @isaacdecoded's task in 11m 31s —— View job PR Review: feat(gateway-contracts): extend keygen EIP712 with extra data
Code Review[AUTOMATED] SummaryThis PR makes two key changes to the
Net result: +1123/-2658 lines, which is a healthy reduction in code complexity. Detailed Analysis✅ EIP-712 Implementation (Correct)The EIP-712 type strings and hash encodings are implemented correctly:
✅ Storage Layout Compatibility (Correct)The ✅ Upgrade Mechanism (Correct)
✅ Event Consistency (Correct)
✅ Test Coverage (Good)
✅ Scoping Block in
|
Closes https://github.com/zama-ai/fhevm-internal/issues/1125