fix(protocol): correct build_recipient doc comment advice map signature#2727
Open
giwaov wants to merge 1 commit into0xMiden:nextfrom
Open
fix(protocol): correct build_recipient doc comment advice map signature#2727giwaov wants to merge 1 commit into0xMiden:nextfrom
giwaov wants to merge 1 commit into0xMiden:nextfrom
Conversation
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.
Summary
Remove the incorrect advice map input declaration from the
build_recipientprocedure's doc comment.Problem
The doc comment for
build_recipientinnote.masmdeclaredSTORAGE_COMMITMENT: [INPUTS]as a required advice map input. However, the procedure computes the storage commitment internally viacompute_storage_commitmentand inserts it into the advice map itself usingadv.insert_mem. The storage commitment does not need to be present in the advice map before calling this procedure.Fix
Removed the
Advice mapsection from the inputs, keeping it only in the outputs where it correctly documents what the procedure produces:\
Inputs:
Operand stack: [storage_ptr, num_storage_items, SERIAL_NUM, SCRIPT_ROOT]
Outputs:
Operand stack: [RECIPIENT]
Advice map: {
STORAGE_COMMITMENT: [INPUTS],
RECIPIENT: [SERIAL_SCRIPT_HASH, STORAGE_COMMITMENT],
SERIAL_SCRIPT_HASH: [SERIAL_HASH, SCRIPT_ROOT],
SERIAL_HASH: [SERIAL_NUM, EMPTY_WORD],
}
\\
This matches the corrected signature from the issue discussion.
Closes #2693