Skip to content

Conversation

GarmashAlex
Copy link
Contributor

Describe your changes

The syscall_block test expected Push(TWO) in the program’s first SPAN and Push(ONE) in bar’s SPAN, while the constructed MAST nodes use Push(ONE) for the initial +1 FMP update and Push(TWO) for bar’s +2 FMP update. This mismatch caused the test to assert against values that cannot occur given the program structure and FmpUpdate semantics. The change aligns the expected op decoding with the actual program and documented FMP behavior (CALL resets to FMP_MIN, SYSCALL resets to SYSCALL_FMP_MIN, and FmpUpdate adds the pushed value).

Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

The original test was passing because the test framework checks the operation, but not which values were pushed. Would you consider enhancing the test framework to validate the actual pushed values?

You could grab the immediate values in the hasher_tracecolumns, and create a check_op_decoding_with_imm which would check values, as well as the operation, and update tests to use it.

@GarmashAlex
Copy link
Contributor Author

The original test was passing because the test framework checks the operation, but not which values were pushed. Would you consider enhancing the test framework to validate the actual pushed values?

You could grab the immediate values in the hasher_tracecolumns, and create a check_op_decoding_with_imm which would check values, as well as the operation, and update tests to use it.

corrected

Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

Very nice, thanks a bunch!

@huitseeker huitseeker requested review from bobbinth and plafer October 1, 2025 01:48
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 for finding this!

We can merge as is, but I also left a couple of comments with potential improvements.

//
// begin
// fmp <- fmp + 1
// syscall.bar
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there is a typo here: this should probably be call.bar - right?

@huitseeker huitseeker merged commit f1e5003 into 0xMiden:next Oct 1, 2025
12 checks passed
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.

3 participants