Skip to content

fix: load account and input notes advice maps into the advice provider before executing them#1461

Merged
bobbinth merged 5 commits intonextfrom
greenhat/i1452-load-advice-note-account
Jun 21, 2025
Merged

fix: load account and input notes advice maps into the advice provider before executing them#1461
bobbinth merged 5 commits intonextfrom
greenhat/i1452-load-advice-note-account

Conversation

@greenhat
Copy link
Collaborator

@greenhat greenhat commented Jun 17, 2025

Close #1452

This PR introduces the following changes:

  • Load account and input notes advice maps into the advice provider before executing them;
  • TransactionHost::new now expects &Account instead AccountHeader.

Testing

I tried to test these changes by pulling them through the miden-client (next branch, v0.10) and patching numerous deps along the way to try it in the test reproduced in #1452 but stumbled upon testnet node rejecting my request because my client is not v0.9. So, no luck.

Next, I looked into miden-testing to introduce a test there, but found that it'd take quite a lot of efforts to construct a proper test case (a note script, loading the data from the advice provider and calling an account that is also loads another data from the advice provider). OTOH, the code changes are quite straightforward, so I'd assume they should work. Please let me know if you want me to build one.

@greenhat greenhat force-pushed the greenhat/i1452-load-advice-note-account branch 2 times, most recently from 48f8bc5 to 8ea72c3 Compare June 17, 2025 14:47
@greenhat greenhat force-pushed the greenhat/i1452-load-advice-note-account branch from 8ea72c3 to 01f5b50 Compare June 18, 2025 12:56
@greenhat greenhat marked this pull request as ready for review June 18, 2025 13:19
Copy link
Contributor

@bobbinth bobbinth left a 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 a couple of small comments inline.

@greenhat
Copy link
Collaborator Author

@bobbinth Done. Please do another round.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good! Thank you!

@bobbinth bobbinth requested a review from igamigo June 19, 2025 08:30
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll create an issue on the client for loading the advice maps accordingly for account codes .

@bobbinth
Copy link
Contributor

I'll create an issue on the client for loading the advice maps accordingly for native and foreign account codes.

I'm not sure we need to do anything about this on the client side. In the future, foreign accounts would get processed correctly in the Host::get_mast_forest() method.

@bobbinth bobbinth merged commit a60526a into next Jun 21, 2025
15 checks passed
@bobbinth bobbinth deleted the greenhat/i1452-load-advice-note-account branch June 21, 2025 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Load account and input note MastForest::advice_map before execution

3 participants