Skip to content

feat(test-suite): implement the delegated user decryption test cases#1808

Merged
mergify[bot] merged 12 commits intomainfrom
isaac/889/feat/implement-delegated-user-decryption-tests
Jan 30, 2026
Merged

feat(test-suite): implement the delegated user decryption test cases#1808
mergify[bot] merged 12 commits intomainfrom
isaac/889/feat/implement-delegated-user-decryption-tests

Conversation

@isaacdecoded
Copy link
Copy Markdown
Contributor

@isaacdecoded isaacdecoded commented Jan 21, 2026

@cla-bot cla-bot bot added the cla-signed label Jan 21, 2026
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 21, 2026

🧪 CI Insights

Here's what we observed from your CI run for 96ff2a2.

🟢 All jobs passed!

But CI Insights is watching 👀

@jatZama
Copy link
Copy Markdown
Member

jatZama commented Jan 23, 2026

I am not sure to fully understand the example inside test-suite/e2e/contracts/DelegateUserDecryptDelegator.sol
It is a bit contrived, there are so many allowances, on 4 different accounts (msg.sender, address(this), delegate, delegator).

What an ideal test would have been in my mind is something more like a smart contract account (i.e could be just a SAFE with one owner, or even more recommended the SimpleMultiSig example here https://github.com/zama-ai/fhevm/blob/main/library-solidity/examples/multisig/SimpleMultiSig.sol that you could initialize with one unique owner) receiving some amount of confidential tokens for eg. Then the owner of the multisig, would call his multisig to call the ACL:delegate function, to make his EOA able to read the confidential balance of his SimpleMultiSig account. This seems more natural example for me.

Maybe you can keep current test but also at least add one more "realistic" example, such as the one with SimpleMultiSig receiving some confidential amount as proposed here. Wdyt?

@isaacdecoded
Copy link
Copy Markdown
Contributor Author

I am not sure to fully understand the example inside test-suite/e2e/contracts/DelegateUserDecryptDelegator.sol It is a bit contrived, there are so many allowances, on 4 different accounts (msg.sender, address(this), delegate, delegator).

What an ideal test would have been in my mind is something more like a smart contract account (i.e could be just a SAFE with one owner, or even more recommended the SimpleMultiSig example here https://github.com/zama-ai/fhevm/blob/main/library-solidity/examples/multisig/SimpleMultiSig.sol that you could initialize with one unique owner) receiving some amount of confidential tokens for eg. Then the owner of the multisig, would call his multisig to call the ACL:delegate function, to make his EOA able to read the confidential balance of his SimpleMultiSig account. This seems more natural example for me.

Maybe you can keep current test but also at least add one more "realistic" example, such as the one with SimpleMultiSig receiving some confidential amount as proposed here. Wdyt?

Adjusted the test cases following your suggestions on this commit, thanks a lot!

@jatZama
Copy link
Copy Markdown
Member

jatZama commented Jan 26, 2026

Great new example, I would just rename the MultiSigWithDelegation contract to SmartWalletWithDelegation or something. Thanks!

@isaacdecoded isaacdecoded marked this pull request as ready for review January 29, 2026 09:24
@isaacdecoded isaacdecoded requested a review from a team as a code owner January 29, 2026 09:24
@isaacdecoded isaacdecoded requested a review from jatZama January 29, 2026 13:01
jatZama
jatZama previously approved these changes Jan 29, 2026
@isaacdecoded
Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify
Copy link
Copy Markdown

mergify bot commented Jan 30, 2026

queue

✅ The pull request has been merged automatically

Details

The pull request has been merged automatically at ab21177

@mergify
Copy link
Copy Markdown

mergify bot commented Jan 30, 2026

Merge Queue Status

✅ The pull request has been merged at 96ff2a2

This pull request spent 1 hour 36 minutes 1 second in the queue, including 25 minutes 59 seconds running CI.
The checks were run on draft #1866.

Required conditions to merge
  • #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]
  • check-success = run-e2e-tests / fhevm-e2e-test
  • 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-skipped = coprocessor-cargo-test/cargo-tests (bpr)
    • check-neutral = coprocessor-cargo-test/cargo-tests (bpr)
    • check-success = coprocessor-cargo-test/cargo-tests (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = coprocessor-dependency-analysis/dependencies-check (bpr)
    • check-neutral = coprocessor-dependency-analysis/dependencies-check (bpr)
    • check-success = 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)

mergify bot added a commit that referenced this pull request Jan 30, 2026
mergify bot added a commit that referenced this pull request Jan 30, 2026
@mergify mergify bot merged commit ab21177 into main Jan 30, 2026
62 checks passed
@mergify mergify bot added the merge-queued label Jan 30, 2026
@mergify mergify bot deleted the isaac/889/feat/implement-delegated-user-decryption-tests branch January 30, 2026 15:21
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