-
Notifications
You must be signed in to change notification settings - Fork 56
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
Note types #515
Note types #515
Conversation
60781d9
to
285be39
Compare
285be39
to
3e4720a
Compare
3e4720a
to
4a508bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I've left one inline comment here.
4a508bd
to
fde1b00
Compare
@hackaugusto - could you rebase it from the latest Also, in one of the other PRs (or issues), I left a comment about potentially reducing the note types to 3: |
I think that works, but I think it would be best to change the tag to be a structure, instead of encoding this in the existing field. Just to make things easier to understand. |
fde1b00
to
1ca2c17
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Seems like there are still some changes in this PR which were done in other PRs (e.g., introduction of |
This comment was marked as outdated.
This comment was marked as outdated.
9b8f48d
to
10144c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Not a full review - just left a few inline comments which I think may affect quite a few files.
10144c7
to
2e7b15f
Compare
716083e
to
ce2c98a
Compare
@bobbinth is there anything else you want to add to this PR? From what I gathered in the issue discussion the storage types are going to stay the same. |
How are you thinking about tag-related changes - would these be for a different PR? (specifically, checking that the tag prefix is consistent with note type as discussed in #402) |
Yes different PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you! I left some comments inline - most are nits but the main one is about letting callers of send_asset
specify the type of the created note. Let me know what you think of this.
Can we merge this? |
I wouldn't merge it before @bobbinth has approved it. |
6ccafa2
to
c73b70c
Compare
miden-lib/asm/miden/tx.masm
Outdated
|
||
movdn.8 dropw dropw | ||
# clear the padding from the kernel response | ||
movdn.4 dropw movdn.4 dropw swap drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using locals, but the assembler fails with some error about mismatching number of locals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to do movdn.8 dropw dropw swap drop
and save 1 cycle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
push.{PUBLIC_NOTE} # note_type | ||
push.997 # tag | ||
push.{REMOVED_ASSET_3} # asset | ||
call.wallet::send_asset dropw dropw drop drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that removing the dropw dropw drop drop
would be a bigger issue, namely defining the calling convention. For now this makes the tests happy.
@bobbinth once you have time, please re-review. I have finished the requested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Looks good! I left a few more comments inline - most of them are pretty small. The main one is about using syscall
's from "user" code.
miden-lib/asm/miden/tx.masm
Outdated
|
||
movdn.8 dropw dropw | ||
# clear the padding from the kernel response | ||
movdn.4 dropw movdn.4 dropw swap drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to do movdn.8 dropw dropw swap drop
and save 1 cycle.
a36fb78
to
6e20dba
Compare
0a9b8bd
to
73313c4
Compare
Notes can be stored offchain, on-chain, or encrypted. This is an orthogonal concept to how the notes are executed. This commit adds a new metadata field to encode the storage type.
73313c4
to
3756f4a
Compare
fixed the CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you!
I pushed a small commit which brings the changelog up to date. We can merge once CI completes.
Issue #402 , this follows the implementation described at #402 (comment)
This depends on #485