Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create notes without assets #596

Closed
Dominik1999 opened this issue Apr 11, 2024 · 1 comment · Fixed by #686
Closed

Create notes without assets #596

Dominik1999 opened this issue Apr 11, 2024 · 1 comment · Fixed by #686
Assignees
Labels
enhancement New feature or request kernels Related to transaction, batch, or block kernels
Milestone

Comments

@Dominik1999
Copy link
Collaborator

We started exploring this idea during a discussion with @nlok5923.

Right now, notes are designed to transfer assets between accounts. There can be scenarios where a note can be transferred without assets.

For example, in current use case we want to change state of a game account directly based on the actions of a player account. In such scenario, the player account can send a note to the game account where the game account will authenticate the player account with its signature and updates it state and hence does not have a necessity for the note to store/transfer assets. Likewise, there can be more similar scenarios where such a feature can provide an easy and better way of utilizing notes.

Originally posted by @gubloon in #558

Implementation idea

First, this check needs to be removed (I would allow an empty vector of assets)

pub fn new(assets: Vec<Asset>) -> Result<Self, NoteError> {
if assets.is_empty() {
return Err(NoteError::EmptyAssetList);

Maybe we need to change something in the kernel / prologue here (at a first look, we don't need to)

Maybe also in the epilogue (but also here, that should already work with 0 assets)

https://github.com/0xPolygonMiden/miden-base/blob/7ab15dff526f0626daa0aae188787fb4bb45dcc9/miden-lib/asm/miden/kernels/tx/epilogue.masm#L253C18-L253C38

@Dominik1999 Dominik1999 added this to the v0.3 milestone Apr 11, 2024
@Dominik1999 Dominik1999 self-assigned this Apr 12, 2024
@bobbinth bobbinth added enhancement New feature or request kernels Related to transaction, batch, or block kernels labels Apr 13, 2024
@Dominik1999 Dominik1999 moved this to In Progress in User's testnet Apr 18, 2024
@Dominik1999 Dominik1999 moved this from In Progress to In Review in User's testnet Apr 18, 2024
@Dominik1999 Dominik1999 moved this from In Review to In Progress in User's testnet Apr 22, 2024
@Dominik1999 Dominik1999 moved this from In Progress to In Review in User's testnet May 2, 2024
@bobbinth bobbinth linked a pull request May 6, 2024 that will close this issue
@bobbinth
Copy link
Contributor

Closed by #686.

@github-project-automation github-project-automation bot moved this from In Review to Done in User's testnet May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kernels Related to transaction, batch, or block kernels
Projects
Status: Done
2 participants