feat: add Package support in MockChainBuilder & NoteScript#2502
Open
lima-limon-inc wants to merge 1 commit into0xMiden:nextfrom
Open
feat: add Package support in MockChainBuilder & NoteScript#2502lima-limon-inc wants to merge 1 commit into0xMiden:nextfrom
Package support in MockChainBuilder & NoteScript#2502lima-limon-inc wants to merge 1 commit into0xMiden:nextfrom
Conversation
be26aeb to
4367f48
Compare
d243d94 to
663a203
Compare
99d6b6a to
f1ace92
Compare
miden-testing's MockChain to be used in the compiler's integration's test Package support in MockChainBuilder & NoteScript
f1ace92 to
9436ebd
Compare
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com> Suggested-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com> Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
9436ebd to
b5ae084
Compare
Contributor
|
Hey @lima-limon-inc, I'll review the PR. Could you resolve the merge conflicts? |
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.
Closes 0xMiden/compiler#981
This PR adds a couple of functionalities to the
miden-protocol'sNoteScriptandNoteBuildermainly intended to ease interaction with the output (i.e.Packages) generated by themiden-compiler.Changes:
NoteScript::from_packagein order to replicateAccountComponent::from_packageand ease creation from aPackagedirectly.NoteBuilder::source_code, in order to encapsulate the two possible ways to create aNoteScript: either by aPackage(potentially obtained by the compiler) or aSourceManager+ dynamicLibrarys (the current way).MockChainBuilder::add_existing_account_from_componentsin order to create an account fromAccountComponents directly.On the compiler's testing code side, I believe, with the addition of the
Packagein bothNoteScriptandNoteBuilder, we could remove several functions/structs from the compiler's test code, notably:create_note_from_packagecan be replaced withNoteBuilder.packageNoteCreationConfigis also handled byNoteBuilderThis is followed up on: #2502