Skip to content

feat: refactor miden-testing's MockChain to be used in the compiler's integration's test #2502

Draft
lima-limon-inc wants to merge 7 commits into0xMiden:nextfrom
lambdaclass:fabrizioorsi/miden-testing-compiler
Draft

feat: refactor miden-testing's MockChain to be used in the compiler's integration's test #2502
lima-limon-inc wants to merge 7 commits into0xMiden:nextfrom
lambdaclass:fabrizioorsi/miden-testing-compiler

Conversation

@lima-limon-inc
Copy link
Contributor

@lima-limon-inc lima-limon-inc commented Feb 23, 2026

Closes 0xMiden/compiler#981

Note: This PR is still a work in progress

Changes:

  • Created NoteScript::from_package in order to replicate AccountComponent::from_package
  • Added NoteBuilder::source_code, in order to encapsulate the two possible ways to create a NoteScript in this context: either by a Package (potentially obtained by the compiler) or a SourceManager + dynamic Librarys.
  • Added MockChainBuilder::add_existing_account_from_components in order to create an account from AccountComponents directly.

I believe, with the addition of the Package in both NoteScript and NoteBuilder, we could remove several functions/structs from the compiler's test code, notably:

  • create_note_from_package can be replaced with NoteBuilder.package
  • NoteCreationConfig is also handled by NoteBuilder

@lima-limon-inc lima-limon-inc force-pushed the fabrizioorsi/miden-testing-compiler branch 2 times, most recently from be26aeb to 4367f48 Compare February 23, 2026 21:14
@mmagician mmagician added the pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority label Feb 25, 2026
…kages

Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
@lima-limon-inc lima-limon-inc force-pushed the fabrizioorsi/miden-testing-compiler branch from 4367f48 to d243d94 Compare February 27, 2026 17:56
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
@lima-limon-inc lima-limon-inc force-pushed the fabrizioorsi/miden-testing-compiler branch from d243d94 to 663a203 Compare February 27, 2026 18:03
…onent

Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
Suggested-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the test suite helpers to Mockchain

2 participants