Simplify ACE codegen error handling
- Dominant language
- Rust
- Stars
- 772
- Forks
- 352
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 93
Description
### What should be done?
Simplify ACE codegen by treating failures to generate, encode, or evaluate a circuit from trusted inputs as invariant violations rather than recoverable errors.
AIR implementations are already required to be valid, and the Miden ACE circuits are generated from trusted AIR definitions and protocol configuration. If these operations fail, there is no meaningful recovery path—the AIR, configuration, layout, or codegen implementation is inconsistent. These cases should panic with useful messages instead of returning and propagating `AceError`.
This includes host-side ACE evaluation helpers, where the input buffer and layout are assembled by trusted code. It does not include execution or validation involving untrusted proof data.
This is an intentional breaking change to the public `miden-ace-codegen` API.
### How should it be done?
Review the ACE codegen API and its Miden and precompile integrations, removing error-handling plumbing where failures represent programming errors or broken AIR contracts. Keep recoverable errors where failures can originate from untrusted data, proof decoding, filesystem access, or other genuinely fallible operations.
### When is this task done?
ACE generation, encoding, and host-side evaluation from trusted inputs no longer expose recoverable errors, and callers no longer translate invariant violations into unrelated errors such as invalid proof shape or invalid I/O data. Failures produce clear panic messages, documentation reflects the API contract, and the relevant ACE, recursive verifier, and precompile tests continue to pass.
Contributor guide
Assessment
This issue has not been assessed yet.