0xMiden / 0xMiden/miden-vm

Fuzz deferred precompiles and bound hash/MSM evaluation cost

未关闭
#3,378 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
772
派生
352
平均合并
1 天 12 小时
30 天内合并 PR
93

描述

PR #3222 introduces the `miden-precompiles` registry and deferred-state element budgeting. The current budget primarily reflects stored DAG size, while evaluation cost can vary significantly with hash chunk count and MSM pair count.

- Add property and fuzz tests for math and hash precompiles, deferred-wire rehydration, malformed payloads, and boundary sizes.
- Add adversarial proof-wire tests covering malformed entries, valid-but-different deferred roots, and the distinction between deferred-integrity rejection and STARK public-input mismatch.
- Investigate fixed per-tag limits, compute-weighted budgeting alongside `max_deferred_elements`, or both for hash and MSM evaluation.
- Enforce limits consistently during execution and verifier rehydration, before expensive allocation or evaluation.
- Enforce the deferred-wire budget before decoder preallocation, traversal, hashing, or payload cloning, including proofs supplied as an already constructed in-memory `ExecutionProof` rather than only serialized bytes.

### Review context

Follow-up from Robin’s review of #3222:

- Full end-to-end proof generation for deferred precompiles: https://github.com/0xMiden/miden-vm/pull/3222#discussion_r3585116584
- Recursive verification with a non-default deferred root and deferred-wire tampering tests: https://github.com/0xMiden/miden-vm/pull/3222#discussion_r3585141453
- Early verifier resource limits for untrusted deferred wires: https://github.com/0xMiden/miden-vm/pull/3222#discussion_r3585170983

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。