Skip to content

docs: clarify fromExternal view limitations#2230

Open
ming1523 wants to merge 1 commit intozama-ai:mainfrom
ming1523:docs/document-fromexternal-view-limit
Open

docs: clarify fromExternal view limitations#2230
ming1523 wants to merge 1 commit intozama-ai:mainfrom
ming1523:docs/document-fromexternal-view-limit

Conversation

@ming1523
Copy link
Copy Markdown

@ming1523 ming1523 commented Apr 1, 2026

Summary

This PR documents that functions using FHE.fromExternal() should not be marked as view.

Why

FHE.fromExternal() often looks like a read-only conversion step from a developer's perspective, but in practice it performs proof validation and is not compatible with Solidity's view modifier.

Without an explicit note, this can be a confusing DX trap when developers try to write helper functions that feel read-only and then hit compiler errors.

This PR adds that guidance in the main places where developers are introduced to encrypted input handling.

Fixes #2026.

Changes

  • add a warning note to docs/sdk-guides/input.md
  • add a warning note to docs/solidity-guides/inputs.md
  • add a warning note to the quick start tutorial step that introduces FHE.fromExternal()

Validation

  • verified the change is limited to documentation
  • verified all added notes are colocated with existing FHE.fromExternal() guidance

@ming1523 ming1523 requested a review from a team as a code owner April 1, 2026 07:19
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 1, 2026

Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @ming1523 on file. In order for us to review and merge your code, please sign:

  • For individual contribution: our CLA
  • for Bounty submission, if you are an individual: our T&C
  • for Bounty submission, if you are a company: our T&C
    to get yourself added.

If you already signed one of this document, just wait to be added to the bot config.

@ming1523
Copy link
Copy Markdown
Author

ming1523 commented Apr 1, 2026

I have already signed the individual CLA on April 1, 2026. This PR is part of the same small cleanup series as #2226, so I am waiting for the CLA bot/config to be refreshed on this branch as well.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 4, 2026

This PR is unverified and has been open for 2 days, it will now be closed. If you want to contribute please sign the CLA as indicated by the bot.

@github-actions github-actions Bot added the Stale label Apr 4, 2026
@github-actions github-actions Bot closed this Apr 4, 2026
@aquint-zama
Copy link
Copy Markdown
Contributor

@cla-bot check

@aquint-zama aquint-zama reopened this Apr 15, 2026
@cla-bot cla-bot Bot added the cla-signed label Apr 15, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 15, 2026

The cla-bot has been summoned, and re-checked this pull request!

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.

view Modifier Incompatibility with FHE.fromExternal and FHE Precompiles (Undocumented DX Issue)

2 participants