Skip to content

Conversation

@Fitznik
Copy link
Contributor

@Fitznik Fitznik commented Dec 2, 2025

What ❔

  • Document the trusted-code assumptions for all delegation circuits in docs/delegation_circuits.md, clarifying why zero control masks are allowed in the proving circuit, how the simulator enforces stricter behavior during development, and why this is safe for current M-mode firmware.
  • Fix unsigned DIV/REM witness fallback in cs/src/machine/ops/mul_div.rs so that the default remainder for divisor=0 mirrors the dividend

Why ❔

Delegation circuits share the same trusted-code surface as the base machine. The new documentation explains the security model for external operators, the difference between simulator/runtime behavior, and the role of trusted firmware. This prevents confusion when reading circuit code or comparing simulator panics with circuit permissiveness.

Is this a breaking change?

  • Yes
  • No

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted.

@Fitznik Fitznik requested a review from vladbochok December 2, 2025 18:41
vladbochok
vladbochok previously approved these changes Dec 2, 2025
@Fitznik Fitznik requested a review from shamatar December 2, 2025 21:20
@Fitznik Fitznik merged commit 72b4d0c into main Dec 10, 2025
26 checks passed
@Fitznik Fitznik deleted the oo_improvement branch December 10, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants