Skip to content
Draft
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
611c9d3
feat(test-suite): replace bash CLI with Bun-based fhevm-cli
Eikix Mar 9, 2026
ceb6068
fix(coprocessor): pass BUILD_ID as build arg instead of copying .git/…
Eikix Mar 9, 2026
055a633
docs(test-suite): add CLI architecture guide and update readmes
Eikix Mar 9, 2026
82ce397
ci(test-suite): update e2e workflows for Bun CLI
Eikix Mar 9, 2026
cc6d0aa
test(test-suite): add comprehensive unit tests for Bun CLI
Eikix Mar 10, 2026
254c33c
chore(test-suite): remove legacy bash CLI scripts
Eikix Mar 10, 2026
63f3b90
docs(test-suite): document lock file usage for pinning version bundles
Eikix Mar 10, 2026
bfa0748
feat(test-suite): add per-service override support to fhevm-cli (#2075)
PanGan21 Mar 10, 2026
d93a7a8
fix(test-suite): stabilize Bun fhevm-cli
Eikix Mar 10, 2026
89737c7
test-suite: drop override build profiles
Eikix Mar 10, 2026
ce64736
feat(test-suite): add exact sha target
Eikix Mar 10, 2026
676bd05
feat(test-suite): add deploy alias for up
Eikix Mar 10, 2026
8721db2
docs(test-suite): refresh CLI readmes
Eikix Mar 10, 2026
634508b
fix(test-suite): harden github resolution errors
Eikix Mar 10, 2026
85e6ce5
fix(test-suite): tighten bootstrap retries
Eikix Mar 10, 2026
15a7a69
fix(test-suite): restore runtime artifacts on resume
Eikix Mar 10, 2026
fa3f78d
fix(test-suite): fail clean on teardown errors
Eikix Mar 10, 2026
9cda78b
fix(test-suite): harden env and wallet handling
Eikix Mar 10, 2026
4376ba9
fix(test-suite): guard partial overrides on schema drift
Eikix Mar 10, 2026
38b2beb
fix(test-suite): tighten rpc errors and env template
Eikix Mar 10, 2026
2c5f473
fix(test-suite): catch untracked schema drift
Eikix Mar 10, 2026
deb3f2f
feat(test-suite): add workspace e2e dispatch mode
Eikix Mar 10, 2026
ced6347
ci(test-suite): make merge-queue e2e mode explicit
Eikix Mar 10, 2026
8269071
fix(test-suite): restore fhevm-cli execute bit
Eikix Mar 10, 2026
162f839
fix(test-suite): restore writable address mounts
Eikix Mar 10, 2026
afd9913
feat(test-suite): add override all alias
Eikix Mar 10, 2026
ec81e59
fix(test-suite): pass host url to tx sender
Eikix Mar 10, 2026
45278d8
fix(test-suite): serialize local coprocessor builds
Eikix Mar 10, 2026
43a4eae
fix(test-suite): gate tx-sender host-chain flag
Eikix Mar 10, 2026
fcff473
fix(test-suite): skip migrations during upgrade
Eikix Mar 10, 2026
443764d
fix(ci): snapshot logs on failure
Eikix Mar 11, 2026
4270ef8
refactor(test-suite): drop dead cargo profile args
Eikix Mar 11, 2026
8a9f40e
Merge origin/main into codex/bun-fhevm-cli
Eikix Mar 11, 2026
debfd54
fix(test-suite): hard-cut main targets at simple acl
Eikix Mar 11, 2026
6b44c2b
fix(test-suite): restore simple acl workflow compat
Eikix Mar 11, 2026
745b4d2
fix(ci): pin relayer for simple acl e2e
Eikix Mar 11, 2026
1700b4a
fix(ci): fetch history for relayer cutover
Eikix Mar 11, 2026
9c803af
fix(ci): use 7-char image tags
Eikix Mar 11, 2026
0dbf663
fix(test-suite): approve mocked payment after deploy
Eikix Mar 11, 2026
bb78ce0
fix(ci): use modern relayer for override all
Eikix Mar 12, 2026
7854605
fix(test-suite): harden compat and workflow semantics
Eikix Mar 12, 2026
5d4f4dc
fix(test-suite): initialize workspace override mode in e2e workflow
Eikix Mar 12, 2026
035ef7e
fix(fhevm-cli): atomic writeJson via tmp+rename
Eikix Mar 12, 2026
11241ca
fix(fhevm-cli): fail fast on permanent bootstrap material failures
Eikix Mar 12, 2026
164c52b
refactor(fhevm-cli): simplify runtime after review
Eikix Mar 12, 2026
8242fd4
fix(e2e): poll for ciphertext readiness in delegated decrypt test
Eikix Mar 12, 2026
b5d0239
fix(fhevm-cli): retry discoverSigner fetch and log ensureMaterialUrl …
Eikix Mar 12, 2026
2e96f04
fix(fhevm-cli): bump release preset relayer to modern version
Eikix Mar 12, 2026
25e2ce4
fix(fhevm-cli): use v0.10.0-rc.1 relayer in release preset
Eikix Mar 13, 2026
998035b
Merge remote-tracking branch 'origin/main' into codex/bun-fhevm-cli
Eikix Mar 13, 2026
df8f95c
fix(fhevm-cli): restore Bun wrapper after merge conflict
Eikix Mar 13, 2026
57efe28
fix(fhevm-cli): auto-detect MinIO key prefix and treat unparseable ve…
Eikix Mar 13, 2026
559d55b
fix(fhevm-cli): version-aware RELAYER_URL for old test-suite SDKs
Eikix Mar 13, 2026
477d83c
fix(fhevm-cli): warn when overriding on a network target
Eikix Mar 13, 2026
6a5706b
fix(fhevm-cli): use optimistic SHA handling for destructive compat rules
Eikix Mar 13, 2026
9836aa4
refactor(fhevm-cli): simplify compat, endpoints, and dead code
Eikix Mar 13, 2026
73df056
fix(fhevm-cli): treat SHA versions as modern for multichain ACL check
Eikix Mar 13, 2026
e89dfc3
fix(fhevm-cli): treat SHA versions as modern in all compat rules
Eikix Mar 13, 2026
05b58be
refactor(fhevm-cli): remove dead code and simplify error handling
Eikix Mar 13, 2026
28b8ec8
fix(fhevm-cli): make compat policy override-aware for SHA versions
Eikix Mar 13, 2026
26f5187
fix(fhevm-cli): treat SHA versions as modern in compat policy
Eikix Mar 13, 2026
9ae024f
feat(fhevm-cli): cross-version compat check and post-boot health gate
Eikix Mar 16, 2026
4a7c03a
refactor(fhevm-cli): consolidate compat logic into COMPAT_MATRIX sing…
Eikix Mar 16, 2026
7840851
chore(fhevm-cli): add effect dependency
Eikix Mar 16, 2026
8e5aa50
feat(fhevm-cli): add Effect tagged error types
Eikix Mar 16, 2026
600d68a
feat(fhevm-cli): add command option types to types.ts
Eikix Mar 16, 2026
8db2027
feat(fhevm-cli): add CommandRunner Effect service
Eikix Mar 16, 2026
bb9ba60
feat(fhevm-cli): add ContainerRunner Effect service
Eikix Mar 16, 2026
3cb8c60
feat(fhevm-cli): add ContainerProbe Effect service with retry schedules
Eikix Mar 16, 2026
c726f00
feat(fhevm-cli): add RpcClient Effect service
Eikix Mar 16, 2026
a18181a
feat(fhevm-cli): add MinioClient Effect service
Eikix Mar 16, 2026
9fe05c4
feat(fhevm-cli): add GitHubClient Effect service
Eikix Mar 16, 2026
86e3e22
feat(fhevm-cli): add StateManager Effect service
Eikix Mar 16, 2026
cf0edbe
feat(fhevm-cli): add EnvWriter Effect service
Eikix Mar 16, 2026
e64f6dd
feat(fhevm-cli): add ImageBuilder Effect service
Eikix Mar 16, 2026
7099bf9
feat(fhevm-cli): compose all Effect service layers
Eikix Mar 16, 2026
6c9ff59
feat(fhevm-cli): add resolve.ts and cache.ts Effect modules
Eikix Mar 16, 2026
8cb147e
fix(fhevm-cli): improve cache.test.ts reliability
Eikix Mar 16, 2026
72f4408
feat(fhevm-cli): add codegen module for compose YAML generation
Eikix Mar 16, 2026
9891ff3
refactor(fhevm-cli): remove dead HAS_PLACEHOLDER export from codegen
Eikix Mar 16, 2026
4730012
feat(fhevm-cli): add pipeline, command handlers, and CLI entry point
Eikix Mar 16, 2026
793a607
refactor(fhevm-cli): extract shared runContractTask and fix dynamic i…
Eikix Mar 16, 2026
6bc8d7c
refactor(fhevm-cli): remove old modules, port tests to Effect style
Eikix Mar 16, 2026
a466732
fix(fhevm-cli): address code review issues I-1 through I-4
Eikix Mar 16, 2026
f164b19
refactor(fhevm-cli): simplify and deduplicate across Effect rewrite
Eikix Mar 16, 2026
512978d
test(fhevm-cli): remove 47 overkill tests (-967 lines)
Eikix Mar 16, 2026
f656248
fix(fhevm-cli): address code review findings
Eikix Mar 16, 2026
2390f00
chore(fhevm-cli): remove unrelated delegated-decrypt test fix
Eikix Mar 16, 2026
fbf14a4
docs(fhevm-cli): document --no-follow, --parallel, pause/unpause
Eikix Mar 16, 2026
3260205
docs(fhevm-cli): fix architecture diagram to match actual step order
Eikix Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 30 additions & 21 deletions .github/workflows/test-suite-e2e-operators-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ jobs:
contents: 'read' # Required to checkout repository code
id-token: 'write' # Required for OIDC authentication
packages: 'read' # Required to read GitHub packages/container registry
env:
GH_TOKEN: ${{ secrets.GHCR_READ_TOKEN || github.token }}
CONNECTOR_DB_MIGRATION_VERSION: ${{ inputs.connector_version }}
CONNECTOR_GW_LISTENER_VERSION: ${{ inputs.connector_version }}
CONNECTOR_KMS_WORKER_VERSION: ${{ inputs.connector_version }}
CONNECTOR_TX_SENDER_VERSION: ${{ inputs.connector_version }}
COPROCESSOR_DB_MIGRATION_VERSION: ${{ inputs.db_migration_version }}
HOST_VERSION: ${{ inputs.host_version }}
GATEWAY_VERSION: ${{ inputs.gateway_version }}
COPROCESSOR_HOST_LISTENER_VERSION: ${{ inputs.host_listener_version }}
COPROCESSOR_GW_LISTENER_VERSION: ${{ inputs.gateway_listener_version }}
COPROCESSOR_TX_SENDER_VERSION: ${{ inputs.tx_sender_version }}
COPROCESSOR_TFHE_WORKER_VERSION: ${{ inputs.tfhe_worker_version }}
COPROCESSOR_SNS_WORKER_VERSION: ${{ inputs.sns_worker_version }}
COPROCESSOR_ZKPROOF_WORKER_VERSION: ${{ inputs.zkproof_worker_version }}
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
needs: setup-instance
timeout-minutes: 1440
Expand All @@ -94,7 +109,10 @@ jobs:
- name: Setup Docker
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- name: Install Foundry
- name: Setup Bun
uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2

Check warning

Code scanning / zizmor

detects commit SHAs that don't match their version comment tags Warning test

detects commit SHAs that don't match their version comment tags

- name: Install foundry
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0

- name: Login to GitHub Container Registry
Expand All @@ -111,24 +129,15 @@ jobs:
username: ${{ secrets.CGR_USERNAME }}
password: ${{ secrets.CGR_PASSWORD }}

- name: Install CLI deps
working-directory: test-suite/fhevm
run: |
bun install --frozen-lockfile

- name: Deploy fhevm Stack
working-directory: test-suite/fhevm
env:
CONNECTOR_DB_MIGRATION_VERSION: ${{ inputs.connector_version }}
CONNECTOR_GW_LISTENER_VERSION: ${{ inputs.connector_version }}
CONNECTOR_KMS_WORKER_VERSION: ${{ inputs.connector_version }}
CONNECTOR_TX_SENDER_VERSION: ${{ inputs.connector_version }}
DB_MIGRATION_VERSION: ${{ inputs.db_migration_version }}
HOST_VERSION: ${{ inputs.host_version }}
GATEWAY_VERSION: ${{ inputs.gateway_version }}
HOST_LISTENER_VERSION: ${{ inputs.host_listener_version }}
GW_LISTENER_VERSION: ${{ inputs.gateway_listener_version }}
TX_SENDER_VERSION: ${{ inputs.tx_sender_version }}
TFHE_WORKER_VERSION: ${{ inputs.tfhe_worker_version }}
SNS_WORKER_VERSION: ${{ inputs.sns_worker_version }}
ZKPROOF_WORKER_VERSION: ${{ inputs.zkproof_worker_version }}
run: |
./fhevm-cli deploy --coprocessors 2 --coprocessor-threshold 2
./fhevm-cli up --target latest-release --coprocessors 2 --threshold 2

- name: All operators tests
working-directory: test-suite/fhevm
Expand All @@ -142,16 +151,16 @@ jobs:

- name: Show logs on test failure
working-directory: test-suite/fhevm
if: always()
if: failure()
run: |
echo "::group::Relayer Logs"
./fhevm-cli logs relayer
timeout 20 ./fhevm-cli logs relayer || true
echo "::endgroup::"
echo "::group::SNS Worker Logs"
./fhevm-cli logs sns-worker | grep -v "Selected 0 rows to process"
timeout 20 ./fhevm-cli logs sns-worker | grep -v "Selected 0 rows to process" || true
echo "::endgroup::"
echo "::group::Transaction Sender Logs (filtered)"
./fhevm-cli logs transaction-sender | grep -v "Selected 0 rows to process"
timeout 20 ./fhevm-cli logs transaction-sender | grep -v "Selected 0 rows to process" || true
echo "::endgroup::"
echo "::group::Coprocessor 2 - SNS Worker"
./fhevm-cli logs coprocessor-2-sns-worker 2>/dev/null | grep -v "Selected 0 rows to process" || true
Expand All @@ -167,7 +176,7 @@ jobs:
working-directory: test-suite/fhevm
if: always()
run: |
./fhevm-cli clean
./fhevm-cli clean --images

teardown-instance:
name: test-suite-e2e-operators-tests/teardown
Expand Down
98 changes: 72 additions & 26 deletions .github/workflows/test-suite-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ name: test-suite-e2e-tests
on:
workflow_dispatch:
inputs: &workflow_inputs
image_mode:
description: "Use registry images or build workspace overrides on the runner"
default: "registry"
type: string
override:
description: "Comma-separated override values for workspace mode (for example: all, coprocessor, or coprocessor:host-listener)"
default: ""
type: string
coprocessor-db-migration-version:
description: "Coprocessor DB Migration Image Version"
default: ""
Expand Down Expand Up @@ -67,10 +75,6 @@ on:
description: "KMS Core version"
default: ""
type: string
deploy-build:
description: "Build local Docker images from the checked out repository before deploy"
default: false
type: boolean
workflow_call:
secrets:
GHCR_READ_TOKEN:
Expand All @@ -95,6 +99,9 @@ jobs:
id-token: 'write' # Required for OIDC authentication
packages: 'read' # Required to read GitHub packages/container registry
env:
GH_TOKEN: ${{ secrets.GHCR_READ_TOKEN || github.token }}
IMAGE_MODE: ${{ inputs.image_mode || 'registry' }}
WORKSPACE_OVERRIDE: ${{ inputs.override || '' }}
COPROCESSOR_DB_MIGRATION_VERSION: ${{ inputs.coprocessor-db-migration-version }}
COPROCESSOR_HOST_LISTENER_VERSION: ${{ inputs.coprocessor-host-listener-version }}
COPROCESSOR_GW_LISTENER_VERSION: ${{ inputs.coprocessor-gw-listener-version }}
Expand All @@ -121,7 +128,10 @@ jobs:
- name: Setup Docker
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- name: Install Foundry
- name: Setup Bun
uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2

Check warning

Code scanning / zizmor

detects commit SHAs that don't match their version comment tags Warning test

detects commit SHAs that don't match their version comment tags

- name: Install foundry
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0

- name: Login to GitHub Container Registry
Expand All @@ -138,22 +148,58 @@ jobs:
username: ${{ secrets.CGR_USERNAME }}
password: ${{ secrets.CGR_PASSWORD }}

- name: Display component versions
env:
JSON_INPUT: ${{ toJSON(inputs) }}
- name: Install CLI deps
working-directory: test-suite/fhevm
run: bun install --frozen-lockfile

- name: Resolve CLI up args
working-directory: test-suite/fhevm
run: |
echo "Component versions: $JSON_INPUT"
set -euo pipefail
args_file="$RUNNER_TEMP/fhevm-up-args"
printf '%s\n%s\n' --target latest-release > "$args_file"
case "$IMAGE_MODE" in
registry)
if [ -n "$WORKSPACE_OVERRIDE" ]; then
echo "::error::override requires image_mode=workspace"
exit 1
fi
;;
workspace)
if [ -z "$WORKSPACE_OVERRIDE" ]; then
echo "::error::image_mode=workspace requires override"
exit 1
fi
IFS=',' read -r -a overrides <<< "$WORKSPACE_OVERRIDE"
for raw in "${overrides[@]}"; do
override="${raw#"${raw%%[![:space:]]*}"}"
override="${override%"${override##*[![:space:]]}"}"
[ -n "$override" ] || continue
printf '%s\n%s\n' --override "$override" >> "$args_file"
done
if ! grep -qx -- --override "$args_file"; then
echo "::error::override did not contain any usable values"
exit 1
fi
;;
*)
echo "::error::image_mode must be registry or workspace"
exit 1
;;
esac
echo "UP_ARGS_FILE=$args_file" >> "$GITHUB_ENV"

- name: Deploy fhevm Stack
- name: Dry run
working-directory: test-suite/fhevm
env:
DEPLOY_BUILD: ${{ inputs.deploy-build }}
run: |
if [[ "$DEPLOY_BUILD" == 'true' ]]; then
./fhevm-cli deploy --build --coprocessors 2 --coprocessor-threshold 2
else
./fhevm-cli deploy --coprocessors 2 --coprocessor-threshold 2
fi
mapfile -t up_args < "$UP_ARGS_FILE"
./fhevm-cli up "${up_args[@]}" --dry-run

- name: Boot fhevm Stack
working-directory: test-suite/fhevm
run: |
mapfile -t up_args < "$UP_ARGS_FILE"
./fhevm-cli up "${up_args[@]}"

# E2E tests on pausing the Host contracts
- name: Pause Host Contracts
Expand Down Expand Up @@ -242,28 +288,28 @@ jobs:

- name: Show logs on test failure
working-directory: test-suite/fhevm
if: always()
if: failure()
run: |
echo "::group::Relayer Logs"
./fhevm-cli logs fhevm-relayer
timeout 20 ./fhevm-cli logs fhevm-relayer || true
echo "::endgroup::"
echo "::group::SNS Worker Logs"
./fhevm-cli logs coprocessor-sns-worker | grep -v "Selected 0 rows to process"
timeout 20 ./fhevm-cli logs coprocessor-sns-worker | grep -v "Selected 0 rows to process" || true
echo "::endgroup::"
echo "::group::Transaction Sender Logs (filtered)"
./fhevm-cli logs coprocessor-transaction-sender | grep -v "Selected 0 rows to process"
timeout 20 ./fhevm-cli logs coprocessor-transaction-sender | grep -v "Selected 0 rows to process" || true
echo "::endgroup::"
echo "::group::Host Listener"
./fhevm-cli logs coprocessor-host-listener
timeout 20 ./fhevm-cli logs coprocessor-host-listener || true
echo "::endgroup::"
echo "::group::Gateway Listener"
./fhevm-cli logs coprocessor-gw-listener
timeout 20 ./fhevm-cli logs coprocessor-gw-listener || true
echo "::endgroup::"
echo "::group::ZKProof Worker"
./fhevm-cli logs coprocessor-zkproof-worker
timeout 20 ./fhevm-cli logs coprocessor-zkproof-worker || true
echo "::endgroup::"
echo "::group::TFHE Worker"
./fhevm-cli logs coprocessor-tfhe-worker
timeout 20 ./fhevm-cli logs coprocessor-tfhe-worker || true
echo "::endgroup::"
echo "::group::Coprocessor 2 - SNS Worker"
./fhevm-cli logs coprocessor-2-sns-worker 2>/dev/null | grep -v "Selected 0 rows to process" || true
Expand All @@ -279,4 +325,4 @@ jobs:
working-directory: test-suite/fhevm
if: always()
run: |
./fhevm-cli clean
./fhevm-cli clean --images
1 change: 1 addition & 0 deletions .github/workflows/test-suite-orchestrate-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ jobs:
CGR_USERNAME: ${{ secrets.CGR_USERNAME }}
CGR_PASSWORD: ${{ secrets.CGR_PASSWORD }}
with:
image_mode: registry
coprocessor-db-migration-version: ${{ needs.create-e2e-tests-input.outputs.coprocessor-db-migration-version }}
coprocessor-gw-listener-version: ${{ needs.create-e2e-tests-input.outputs.coprocessor-gw-listener-version }}
coprocessor-host-listener-version: ${{ needs.create-e2e-tests-input.outputs.coprocessor-host-listener-version }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ tmp/
.local/
*-local.*
.local
.fhevm/

# Node.js specific
#-------------------------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions coprocessor/fhevm-engine/Dockerfile.workspace
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ RUN npm ci && \
FROM ghcr.io/zama-ai/fhevm/gci/rust-glibc:1.91.0 AS builder

ARG CARGO_PROFILE=release
ARG BUILD_ID=unknown

USER root
WORKDIR /app
Expand All @@ -77,9 +78,6 @@ COPY gateway-contracts/rust_bindings ./gateway-contracts/rust_bindings
COPY gateway-contracts/contracts ./gateway-contracts/contracts
COPY host-contracts/contracts ./host-contracts/contracts

# Copy BUILD_ID for version metadata (git commit reference)
COPY .git/HEAD ./coprocessor/fhevm-engine/BUILD_ID

WORKDIR /app/coprocessor/fhevm-engine

# Build entire workspace - tfhe compiles ONCE here
Expand All @@ -89,7 +87,7 @@ WORKDIR /app/coprocessor/fhevm-engine
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
--mount=type=cache,target=/app/coprocessor/fhevm-engine/target,sharing=locked \
cargo fetch && \
SQLX_OFFLINE=true BUILD_ID=$(cat BUILD_ID) cargo build --profile=${CARGO_PROFILE} --workspace && \
SQLX_OFFLINE=true BUILD_ID=${BUILD_ID} cargo build --profile=${CARGO_PROFILE} --workspace && \
mkdir -p /out && \
cp target/${CARGO_PROFILE}/tfhe_worker /out/ && \
cp target/${CARGO_PROFILE}/host_listener /out/ && \
Expand Down
Loading
Loading