fix(agglayer): fix incorrect stack comments#2681
Open
partylikeits1983 wants to merge 2 commits intoagglayerfrom
Open
fix(agglayer): fix incorrect stack comments#2681partylikeits1983 wants to merge 2 commits intoagglayerfrom
partylikeits1983 wants to merge 2 commits intoagglayerfrom
Conversation
mmagician
reviewed
Mar 27, 2026
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.
This PR fixes incorrect stack comments found in
crates/miden-agglayer/asm/.Summary:
1.
bridge_in.masm— MissingDEFAULT_TAGafter pushLocation:
create_mint_note_with_attachmentAfter
push.DEFAULT_TAG, the comment omitted the newly pushed value:2.
bridge_in.masm— prefix/suffix order swapped in three proceduresLocation:
build_mint_output_note,create_mint_note_with_attachmentComments throughout the MINT note creation flow had
faucet_id_prefixandfaucet_id_suffixin the wrong order. The actual stack hassuffixon top (matchingkey_to_faucet_id's output), but comments saidprefixwas on top. This was as a result of the VM stack ordering update, these were just comments that didn't get updated.All downstream comments within
create_mint_note_with_attachmentwere updated to match.3.
leaf_utils.masm— Variable name typo (curr_lsb→curr_msb)Location:
pack_leaf_dataThe value at that stack position is the result of
u32shr.24, which extracts the upper 8 bits (MSB) of the current u32 element. The existing comment on line 97 already describes this as "extract MSB (upper 8 bits)", and line 109 references it ascurr_msb. The intermediate comments on lines 103 and 107 were inconsistent, usingcurr_lsbinstead:4.
bridge_out.masm— Padding cleanup countLocation:
convert_assetThe FPI call to
asset_to_origin_assetreturns[U256(8), addr(5), origin_network, pad(2)]— exactly 2 padding elements. The cleanup was corrected fromrepeat.3torepeat.2and the comment updated accordingly.