-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: add conversion from Account
to AccountDelta
#983
Conversation
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.
Ideally we would be implementing impl From<Account>
instead of impl From<&Account>
but it seems that all the recursive inner types all the way to miden crypto do not support into_*
methods that consume the type and return the inner values. I think that would be overall more efficient, especially when one already has an Account
and wants to convert to a delta without cloning.
Since this isn't an easy fix here, I think this PR is fine.
Co-authored-by: Philipp Gackstatter <[email protected]>
Co-authored-by: Philipp Gackstatter <[email protected]>
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! Thank you for addressing the comments so thoroughly!
# Conflicts: # CHANGELOG.md
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 just one minor nit inline.
Related to 0xPolygonMiden/miden-node#527
In this PR we implement conversion from account details to account "initial" delta. We need it in order to simplify DB requests which get delta's nonce/storage/storage-maps previous values.