feat: lazy foreign account assets and storage map items#1888
Merged
PhilippGackstatter merged 14 commits intonextfrom Sep 22, 2025
Merged
feat: lazy foreign account assets and storage map items#1888PhilippGackstatter merged 14 commits intonextfrom
PhilippGackstatter merged 14 commits intonextfrom
Conversation
igamigo
approved these changes
Sep 16, 2025
Collaborator
igamigo
left a comment
There was a problem hiding this comment.
Looks great! Left just two small nits
6cb75cf to
35993b3
Compare
12b15b5 to
336d7f1
Compare
Contributor
Author
|
Had to force push after rebasing onto |
…asset-storage-loading
…asset-storage-loading
bobbinth
approved these changes
Sep 21, 2025
Contributor
bobbinth
left a comment
There was a problem hiding this comment.
Looks good! Thank you! I left a couple of comments inline - all related to basically the same idea, though I'm not sure if that idea is a good one.
I do think that the host/executor code have gotten a bit too difficult to follow, but maybe that's something we can address more comprehensively as a part of #1709.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabled lazy loading of assets and storage map items for foreign accounts during transaction execution.
This also fixes lazy loading for assets for
account_get_balanceandaccount_has_non_fungible_asset, which was overlooked in #1848. To that end, procedures of those names are added in$kernel::account, to keep all account events in the account module.This was tested manually by removing these lines and running the tests in
test_fpi.rs:https://github.com/0xMiden/miden-base/blob/fdf7c0e47191277a95f0ce29abb7b2d7f0a9d754/crates/miden-lib/src/transaction/inputs.rs#L263-L271
I also added a test for foreign accounts calling the above APIs.
However, this is not tested as part of CI currently, because enabling that isn't straightforward without adding
enable_lazy_loading: boolflags toTransactionAdviceInputsor similar solutions. This doesn't seem worth adding, especially because lazy loading should become the default once #1872 and #1879 are done, and then lazy loading will be tested in every test accessing an asset or storage map item implicitly.This should conclude the initial implementation of lazy loading, but let me know if you think there's more missing.
closes #401