Skip to content

merge queue: embarking main (e3c8453) and [#1808 + #1840] together#1865

Closed
mergify[bot] wants to merge 46 commits intomainfrom
mergify/merge-queue/02e5e7268d
Closed

merge queue: embarking main (e3c8453) and [#1808 + #1840] together#1865
mergify[bot] wants to merge 46 commits intomainfrom
mergify/merge-queue/02e5e7268d

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Jan 30, 2026

✨ Pull request #1840 which was ahead in the queue has been dequeued (for the following reason: pull request dequeued). The pull request #1808 has been re-embarked. ✨

Branch main (e3c8453) and [#1808 + #1840] are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of [#1808 + #1840].
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue main for merge:

Required conditions to stay in the queue:

---
checking_base_sha: e3c8453e71557f676e4a0776f09083872341e9a2
previous_failed_batches: []
pull_requests:
  - number: 1808
  - number: 1840
...

isaacdecoded and others added 30 commits January 19, 2026 16:33
- Simplify RPC URL warning conditions (redundant checks removed)
- Refactor cancelBacklog to reuse sendWithRetries for resilience
- Add post-success cleanup to clear backlogs on unclean signers
- Ping BETTERSTACK_HEARTBEAT_URL on success
- Report failure status with error message
- Document in README
More reliable: reads the actual deployed address from the receipt
rather than computing it from nonce, eliminating potential mismatch.
- README: correct SMOKE_CANCEL_BACKLOG default from '1' to 'true'
- smoke-inputflow: remove deprecated provider.getGasPrice() call,
  use MIN_PRIORITY_FEE as last-resort fallback instead
…nt casts

- E2ECoprocessorConfigLocal.sol: remove 31337 (hardhat) from chainId check,
  smoke tests target real networks only
- instance.ts: remove redundant Number() casts, values are already numbers
  after Number.isFinite() validation
…uts, and gas estimation

- instance.ts: enforce ZAMA_FHEVM_API_KEY on mainnet to fail fast
- smoke-inputflow.ts: add withTimeout wrapper for decryption operations
  (default 120s, configurable via SMOKE_DECRYPT_TIMEOUT_SECS)
- smoke-inputflow.ts: wrap gas estimation in try/catch with clear error messages
- README.md: document SMOKE_DECRYPT_TIMEOUT_SECS env var
Add console.error logging before re-throwing in gas estimation catch
blocks to preserve full error details (stack trace, ethers properties)
for debugging purposes.
ZamaConfig.getEthereumCoprocessorConfig() already handles chainId checks
internally for mainnet (1), Sepolia (11155111), and local (31337),
returning appropriate addresses for each. Remove redundant chainId check
and hardcoded fallback addresses.
…cific URLs

- staging/zwsDev: use RPC_URL with localhost fallback
- sepolia: require SEPOLIA_ETH_RPC_URL explicitly (fail if not set)
- mainnet: require MAINNET_ETH_RPC_URL explicitly (fail if not set)

Removes verbose RPC_URL fallback chains - if targeting a specific
network, set its specific env var. Clearer and less error-prone.
…y vars

Only ZAMA_FHEVM_API_KEY is a secret that benefits from hardhat vars.
Contract addresses, chain IDs, and URLs can use simple env || defaults.

Removes verbose chaining and string↔number conversions.
…rting

Simpler than encoding error messages in query params. Error details
are already logged to console.
- Remove unnecessary Math.trunc() calls
- Use simple boolean coercion for allowCancel and forceDeploy
- Drop intermediate variables (cancelRaw, forceRaw)
- Rename SMOKE_FORCE_DEPLOY → SMOKE_DEPLOY_CONTRACT (defaults to 1)
- Add SMOKE_RUN_TESTS to allow deploy-only mode (set to 0)
- Add strict boolean parsing for env vars (only 0/1, fail fast on invalid)
- Send error details to BetterStack /1 endpoint instead of /fail
- Track deploy, encrypt, tx, and decrypt phases separately
- Send timing report to BetterStack on success
- Align timing boundaries with TransferBench (decrypt excludes handle fetch)
Only throw error for missing SEPOLIA_ETH_RPC_URL / MAINNET_ETH_RPC_URL
when actually targeting that network, not during compile/build.
Fixes Docker build failure.
Eikix and others added 16 commits January 30, 2026 14:37
For pod deployments, just set RPC_URL - it works for all networks.
Keeps network-specific vars (SEPOLIA_ETH_RPC_URL, MAINNET_ETH_RPC_URL)
for local dev convenience.
- sepolia/mainnet: SDK provides defaults, only need RPC_URL + MNEMONIC
- devnet: use pre-configured .env.devnet
- other networks: set all vars manually
…compile

When not targeting sepolia/mainnet, provide placeholder public RPC URLs
to satisfy Hardhat's config validation. The actual RPC URL is still
required when targeting these networks.
Allows faster container startup with:
npx hardhat compile:specific --contract contracts/smoke
- Default to 3 signers (0,1,2) for automatic failover
- Dynamic balance threshold based on current gas prices
- Show all available signers at startup with balances
- Add LOW_BALANCE warning for signers < 0.1 ETH
- Fix withTimeout to clear timer on success (prevents zombie timers)
- Update README with signer funding guidance
Add consistent warning behavior for the failure heartbeat to match
the success heartbeat logging.
…igLocal

The ZamaConfig approach doesn't work for devnet/staging which uses
different contract addresses than production Sepolia despite sharing
the same chainId.
… tests

- TestInput.sol now accepts (acl, coprocessor, kmsVerifier) in constructor
- instance.ts exports addresses with SDK defaults for sepolia/mainnet
- smoke-inputflow.ts passes addresses when deploying

This allows smoke tests to work on:
- Sepolia/mainnet: uses SDK defaults
- Devnet: uses env vars (FHEVM_EXECUTOR_CONTRACT_ADDRESS, etc.)

Other E2E tests still use sed-patched E2ECoprocessorConfigLocal.sol.
…E regression

- Create SmokeTestInput.sol with constructor-based config injection for smoke tests
- Revert TestInput.sol to use E2ECoprocessorConfig inheritance for Pierre's E2E tests
- Update smoke-inputflow.ts to use SmokeTestInput with proper TypeScript typing

This avoids breaking existing E2E tests (inputFlow.ts, pausedHost.ts, pausedGateway.ts)
that deploy TestInput without constructor arguments.
When a tx times out and we attempt to send a replacement, the original tx
might get mined in that window. This caused false failure reports because
the replacement send would fail with "nonce already used" and we'd exhaust
retries without recognizing the original tx succeeded.

Fix: Track all sent tx hashes and check for late receipts when:
- A send fails (might be because previous tx just got mined)
- After exhausting all retries (final safety check)
Replace manual polling (waitForReceipt) and hash tracking (sentTxHashes)
with ethers v6 native tx.wait() which handles replacement detection via
TRANSACTION_REPLACED error code.

This simplifies the retry logic:
- Remove waitForReceipt function (ethers polls internally)
- Remove sentTxHashes tracking (ethers tracks replacements)
- Remove checkPreviousTxs helper (ethers throws TRANSACTION_REPLACED)
- Catch TRANSACTION_REPLACED and return replacement receipt if successful

Co-authored-by: maxnovawind
- Handle CALL_EXCEPTION explicitly (reverts are terminal, don't retry)
- Handle TIMEOUT explicitly (retry with bumped fees)
- Refresh signer states before cleanup to avoid stale nonce issues
@mergify
Copy link
Copy Markdown
Author

mergify bot commented Jan 30, 2026

🧪 CI Insights

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

🟢 All jobs passed!

But CI Insights is watching 👀

@mergify mergify bot closed this Jan 30, 2026
@mergify mergify bot deleted the mergify/merge-queue/02e5e7268d branch January 30, 2026 14:55
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