Repository-Metriken
- Stars
- (753 Stars)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
0xMiden/protocol#3146 exposed a gap between miden-vm package APIs and protocol account code.
Motivating PR comments:
- https://github.com/0xMiden/protocol/pull/3146#discussion_r3516208770
- https://github.com/0xMiden/protocol/pull/3146#discussion_r3516217416
- https://github.com/0xMiden/protocol/pull/3146#discussion_r3516223720
Package::get_procedure_root_by_path and Package::get_procedure_node_by_path already cover direct path lookup in crates/mast-package/src/package/mod.rs. That is enough for one protocol method.
Protocol still has to read package internals for account interface procedures:
crates/miden-protocol/src/account/component/code.rsreads package exports and filtersProcedureExportattributes.crates/miden-protocol/src/account/component/mod.rsreads the export node to compute account procedure roots.
The existing direct lookup API is in crates/mast-package/src/package/mod.rs.
Please add package APIs that hide that shape:
- iterate procedure exports by attribute.
- return the resolved procedure root for an export, using the export node when present.
- avoid direct downstream reads of
Package::manifest,ProcedureExport::node, andPackage::mast_forest()for this common case.
After that, protocol account code can ask the package for interface procedure roots instead of rebuilding that logic.