feat(test-suite): local multi coprocessor deploy + e2e debug mode#1959
feat(test-suite): local multi coprocessor deploy + e2e debug mode#1959mergify[bot] merged 17 commits intomainfrom
Conversation
🧪 CI InsightsHere's what we observed from your CI run for e4949a0. 🟢 All jobs passed!But CI Insights is watching 👀 |
|
Ran local 2-coprocessor validation end-to-end in this branch. What I ran:
Observed behavior:
Commits added after initial PR draft:
|
|
Update: I ran local What I changed
Validation I ran
Note
|
|
Follow-up update after implementing next steps: What I added
Validation I ran locally
Investigation follow-up
|
|
Addressed your self-review comments in the latest push (
Files touched:
|
|
@claude /pr-review |
|
Claude finished @antoniupop's task in 3m 52s —— View job PR Review Complete ✅PR: feat(test-suite): local 2-coprocessor deploy + e2e debug mode SummaryThis PR adds local multi-coprocessor deployment support to the fhevm-cli testing tool, enabling local validation of n-of-m coprocessor topologies. The changes are well-structured and the author has done thorough local validation. Key additions:
Bug AnalysisNo critical runtime bugs found. The code is well-structured for its stated purpose (local debugging/validation workflow). Error Handling ReviewThe review identified several Observations (Non-Blocking)
Nit: The # Current
cp_address=$(cast wallet address --mnemonic "$gateway_mnemonic" --mnemonic-index "$account_index")
# Suggested (optional improvement)
if ! cp_address=$(cast wallet address --mnemonic "$gateway_mnemonic" --mnemonic-index "$account_index"); then
log_error "Failed to derive coprocessor address for index $account_index"
exit 1
fiPositive Observations
Minor Notes
VerdictApproved ✅ This is a well-implemented feature for local multi-coprocessor testing. The author has clearly done extensive local validation (documented in PR comments), and the code follows sensible patterns for a debugging workflow. The scope is appropriately limited to local use only. |
|
at some point we should really re-write this entire local deployment stack in non-bash |
|
Superseding my earlier progress comments with current status:
Please use PR body + this comment as the up-to-date source of truth. |
|
Adding two concrete local runbooks to validate consensus behavior on compute path. 1) Happy path (2/2, all honest)cd /Users/work/.codex/worktrees/2d79/fhevm/test-suite/fhevm
./fhevm-cli clean
./fhevm-cli deploy --local --coprocessors 2 --coprocessor-threshold 2
./fhevm-cli test input-proof-compute-decryptThen verify on-chain (gateway chain,
Example commands: # 1) list AddCiphertextMaterial logs
cast logs --json --rpc-url http://localhost:8546 \
--address 0xF0bFB159C7381F7CB332586004d8247252C5b816 \
"AddCiphertextMaterial(bytes32,uint256,bytes32,bytes32,address)" \
| jq -r '.[] | [.topics[1], ("0x"+(.data[66:130])), ("0x"+(.data[130:194])), ("0x"+(.data[218:258]))] | @tsv'
# 2) consensus events
cast logs --rpc-url http://localhost:8546 \
--address 0xF0bFB159C7381F7CB332586004d8247252C5b816 \
"AddCiphertextMaterialConsensus(bytes32,uint256,bytes32,bytes32,address[])"
# 3) sender set for a given handle
cast call --rpc-url http://localhost:8546 \
0xF0bFB159C7381F7CB332586004d8247252C5b816 \
"getAddCiphertextMaterialConsensusTxSenders(bytes32)(address[])" \
<HANDLE>2) Corrupted path (2/2 with 1 honest + 1 corrupted image)Start from the same normal 2/2 deploy above, then replace only cd /Users/work/.codex/worktrees/2d79/fhevm/test-suite/fhevm
docker compose -p fhevm -f docker-compose/coprocessor-docker-compose.yml \
--env-file env/staging/.env.coprocessor.local \
stop coprocessor1-host-listener coprocessor1-gw-listener coprocessor1-tfhe-worker coprocessor1-sns-worker coprocessor1-transaction-sender
COPROCESSOR_HOST_LISTENER_VERSION=a1179b6 \
COPROCESSOR_GW_LISTENER_VERSION=a1179b6 \
COPROCESSOR_TFHE_WORKER_VERSION=a1179b6 \
COPROCESSOR_SNS_WORKER_VERSION=a1179b6 \
COPROCESSOR_TX_SENDER_VERSION=a1179b6 \
docker compose -p fhevm -f docker-compose/coprocessor-docker-compose.yml \
--env-file env/staging/.env.coprocessor.local \
up -d coprocessor1-host-listener coprocessor1-gw-listener coprocessor1-tfhe-worker coprocessor1-sns-worker coprocessor1-transaction-sender
./fhevm-cli test input-proof-compute-decryptExpected behavior for corrupted case:
This gives a positive proof (happy path) and a negative proof (consensus break) on the same compute flow. |
|
@mergify queue |
Merge Queue StatusRule:
This pull request spent 1 hour 2 minutes 36 seconds in the queue, including 2 minutes 20 seconds running CI. Required conditions to merge
ReasonThe merge conditions cannot be satisfied due to failing checks Failing checks: HintYou may have to fix your CI before adding the pull request to the queue again. |
|
@Mergifyio requeue |
Merge Queue StatusRule:
This pull request spent 43 minutes 52 seconds in the queue, including 36 minutes 25 seconds running CI. Required conditions to merge
ReasonThe merge conditions cannot be satisfied due to failing checks Failing checks: HintYou may have to fix your CI before adding the pull request to the queue again. |
7a8a4bd to
0254d91
Compare
|
@Mergifyio requeue |
☑️ This pull request is already queued |
|
@mergify queue |
☑️ Command
|
Summary
fhevm-cli:--coprocessors N--coprocessor-threshold TNUM_COPROCESSORSandCOPROCESSOR_THRESHOLDcoprocessor1-*,coprocessor2-*, ...) with per-instance env and DB-migration-first startup./fhevm-cli test input-proofas the single input-proof path for both1/1andn/ttopologiesmulti-2-2multi-3-5test-suite/README.mdWhy
We need a concrete local mode to validate e2e flow with
NUM_COPROCESSORS > 1and inspect where topology/consensus-adjacent flows break.Scope
Local runbook
Validation done
bash -n test-suite/fhevm/fhevm-clibash -n test-suite/fhevm/scripts/deploy-fhevm-stack.sh./fhevm-cli clean./fhevm-cli deploy --local --build./fhevm-cli test input-proof./fhevm-cli deploy --local --build --coprocessors 2 --coprocessor-threshold 2./fhevm-cli test input-proof./fhevm-cli deploy --local --coprocessors 5 --coprocessor-threshold 3./fhevm-cli test input-proof