Skip to content

merge queue: embarking main (58aebb0), #2043 and #2046 together#2061

Closed
mergify[bot] wants to merge 28 commits intomainfrom
mergify/merge-queue/07d4a3d093
Closed

merge queue: embarking main (58aebb0), #2043 and #2046 together#2061
mergify[bot] wants to merge 28 commits intomainfrom
mergify/merge-queue/07d4a3d093

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Mar 6, 2026

✨ The merge conditions cannot be satisfied due to failing checks. ✨

Branch main (58aebb0), #2043 and #2046 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #2046.
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:

  • check-success = run-e2e-tests / fhevm-e2e-test
  • any of [🛡 GitHub branch protection]:
    • check-neutral = coprocessor-cargo-test/cargo-tests (bpr)
    • check-skipped = coprocessor-cargo-test/cargo-tests (bpr)
    • check-success = coprocessor-cargo-test/cargo-tests (bpr)
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = common-pull-request/lint (bpr)
    • check-neutral = common-pull-request/lint (bpr)
    • check-skipped = common-pull-request/lint (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = coprocessor-cargo-listener-tests/cargo-tests (bpr)
    • check-neutral = coprocessor-cargo-listener-tests/cargo-tests (bpr)
    • check-success = coprocessor-cargo-listener-tests/cargo-tests (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-success = coprocessor-dependency-analysis/dependencies-check (bpr)
    • check-neutral = coprocessor-dependency-analysis/dependencies-check (bpr)
    • check-skipped = coprocessor-dependency-analysis/dependencies-check (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = gateway-contracts-deployment-tests/sc-deploy (bpr)
    • check-neutral = gateway-contracts-deployment-tests/sc-deploy (bpr)
    • check-success = gateway-contracts-deployment-tests/sc-deploy (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = kms-connector-tests/test-connector (bpr)
    • check-neutral = kms-connector-tests/test-connector (bpr)
    • check-success = kms-connector-tests/test-connector (bpr)

Required conditions to stay in the queue:

---
checking_base_sha: 9b600a514b850c868db00a439c9d06c47e8435d4
previous_failed_batches: []
pull_requests:
  - number: 2046
...

Eikix and others added 28 commits March 5, 2026 11:27
Add 5 block-cap scenarios to the E2E test suite exercising HCULimit
through real EncryptedERC20 FHE operations on the deployed stack:
multi-user accumulation, cap exhaustion, block rollover, whitelist
removal, and non-owner rejection.

Wire into CI via `fhevm-cli test hcu-block-cap` and a new workflow step.
- Rework block rollover test to actually block a caller in block N,
  then verify that same caller succeeds after rollover in block N+1
- Add missing DEPLOYER_PRIVATE_KEY to .env.example
- Accumulation test: use greaterThan instead of exact equality
  (block meter vs receipt HCU have a small discrepancy on real infra)
- Cap exhaustion + rollover tests: pass explicit gasLimit to bypass
  estimateGas, which reverts against pending state when cap is filled
Replace loose greaterThan check with near-sum assertion allowing ~2%
drift between receipt-reported HCU and on-chain block meter.
…ion assertion

The receipt parser reconstructs HCU from the @fhevm/solidity npm price
table while the block meter uses the deployed contract's hardcoded
prices. A version skew between the two causes a small discrepancy.
Instead of cross-comparing with tolerance, assert the block meter
exceeds each individual tx's HCU — proving accumulation without
depending on price table parity.
Add NotHostOwner error to HCU_LIMIT_ABI and assert the specific custom
error instead of generic revert.
- Scope save/restore of HCU limits to only the 2 tests that lower them
  (nested describe with its own beforeEach/afterEach)
- Extract mintAndDistribute helper for repeated mint+transfer preamble
- Remove blanket whitelist cleanup from afterEach (test cleans up itself)
- Parallelize 3 sequential view calls with Promise.all
Make sure both new and old versions can work with the same DB, should we
want to revert the new one to the old one.
Replace receipt-based HCU comparison with three block meter readings:
1. Single-tx block → baseline meter
2. Two-tx block → meter exceeds baseline (proves accumulation)
3. Single-tx block → meter resets and matches baseline

No cross-comparison of price tables, no getTxHCUFromTxReceipt needed.
- Assert meter2 == 2 * meter1 (exact, same ops in both txs)
- Remove unnecessary mineNBlocks between blocks (meter resets
  automatically in each new block)
DO NOT MERGE — revert before merge. Added `if: false` to all test
steps except HCU block cap to validate in isolation.
The CI was pulling the pre-built test-suite Docker image (v0.11.0-1)
which doesn't contain the new block cap scenarios tests. Use --build
so the image is built from the current checkout.
…rtion

- NotHostOwner takes an address parameter: error NotHostOwner(address)
- Relax meter2 == meter1*2 to meter2 > meter1 since alice→bob and
  bob→alice can differ slightly in HCU due to balance init paths
The same alice→bob transfer produces slightly different HCU across
runs due to balance state changes from intermediate transfers.
Assert reset behavior (meter3 > 0 and meter3 < meter2) instead of
exact equality with meter1.
Anvil runs with --block-time 1, so blocks keep getting mined even
with evm_setAutomine(false). Use evm_setIntervalMining(0) to fully
pause block production, then restore both after mining.
…rEach

Disable interval mining once in beforeEach (deterministic blocks),
restore in afterEach. Tests only toggle automine for batching.
Disabling interval mining in beforeEach hangs because Anvil's
evm_setIntervalMining(0) overrides automine. Revert to the per-test
pattern (disable interval+automine before batching, restore after)
which passed in CI run 22733231829.
Restore workflow to match main, keeping only the new HCU block cap
test step addition.
@mergify mergify bot closed this Mar 6, 2026
@mergify mergify bot deleted the mergify/merge-queue/07d4a3d093 branch March 6, 2026 18:00
@mergify
Copy link
Copy Markdown
Author

mergify bot commented Mar 6, 2026

🧪 CI Insights

Here's what we observed from your CI run for 8fac779.

🟢 All jobs passed!

But CI Insights is watching 👀

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