0xMiden / 0xMiden/protocol

Simplify output note creation flow for smart contracts

オープン
#2,466 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
standards
主要言語
Rust
スター
132
フォーク
167
平均マージ
1日 22時間
マージ済み PR(30日)
116

説明

The current flow for creating output notes from smart contracts at the TX kernel level is quite involved. You need to manually compute the recipient, construct metadata, create the note, and add assets in separate steps. This complexity propagates up to the Rust compiler level, where creating a simple P2ID output note requires a significant amount of boilerplate (see [example from miden-bank](https://github.com/Keinberger/miden-bank/blob/ce2c9684f0a95f86a5042293a63e145c3144c9f9/contracts/bank-account/src/lib.rs#L220)).

It would be worth exploring ways to simplify this flow at the TX kernel level, not just for standard note types but for output note creation in general. As discussed with @PhilippGackstatter, the `miden_protocol` level should remain flexible and unopinionated, so higher-level abstractions could live in `miden-standards` or above. Potentially this could also be simplified at the compiler level.

This is low priority and can be addressed post-mainnet.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

The issue describes complexity in the TX kernel and Rust compiler layers for creating output notes from smart contracts. Start by examining the linked example in miden-bank contracts to understand the current boilerplate. Then review the TX kernel code in the protocol repository to see the low-level note creation flow. The goal is to design a higher-level abstraction, potentially in miden-standards, that simplifies this process while keeping the protocol layer flexible.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
backend, compilers
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。