Improve the doc to add a detailed explanation of how to create public notes
Opened this issue · 0 comments
What should be done?
The improvements can include details about:
- Errors such as,
Public note missing the details in the advice provider
- Values that needs to be stored in the advice provider when creating a public note in MASM
- Creating a custom public note in MASM
How should it be done?
Based on Bobbin's answer to Alex:
-
Regarding [1], the source to be cited is: https://github.com/0xPolygonMiden/miden-base/blob/next/miden-tx/src/host/note_builder.rs#L114
-
And the cause for this error is that the note is public but there is not enough information in the advice provider to build the full note recipient
-
Regarding [2], The way to get information into the advice provider is to specify "expected output notes" in
TransactionArgs
; The function responsible for this is: https://github.com/0xPolygonMiden/miden-base/blob/next/objects/src/transaction/tx_args.rs#L100 -
The ideal/alternative way to build the transaction will be by using the client where one can create a transaction request and add expected output notes to it. The function for this is: https://github.com/0xPolygonMiden/miden-client/blob/next/crates/rust-client/src/transactions/request.rs#L156
-
If possible we can try to add steps for other similar scenarios and descriptions for the related errors.
When is this task done?
We can probably do this once the updates to Miden Base that accommodate the changes in Miden VM v0.10 are complete.
Additional context
No response