Skip to content

Conversation

@mmagician
Copy link
Collaborator

@mmagician mmagician commented Jan 6, 2026

This check is already done as part of the prologue logic:

So the extra check at the library level is redundant.

Related to #2221 (comment)

@mmagician mmagician added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Jan 6, 2026
@mmagician mmagician requested a review from Copilot January 6, 2026 11:23

This comment was marked as resolved.

@mmagician mmagician requested a review from bobbinth January 6, 2026 14:30
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. I left a couple of comments inline.

Comment on lines -36 to -38
# check that number of inputs is less than or equal to MAX_INPUTS_PER_NOTE
dup.1 push.MAX_INPUTS_PER_NOTE u32assert2.err=ERR_PROLOGUE_NOTE_INPUTS_LEN_EXCEEDED_LIMIT
u32lte assert.err=ERR_PROLOGUE_NOTE_INPUTS_LEN_EXCEEDED_LIMIT
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 we should still keep this check - the use case for this is different from what we do in the prologue. Specifically, this procedure is used to build note inputs for output notes. So, we still want to make sure here that the user doesn't compute invalid note input commitment.

Comment on lines -50 to -51
# Re-export the max inputs per note constant.
pub use ::miden::protocol::util::note::MAX_INPUTS_PER_NOTE
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move this to the top of the file - maybe after the "errors" section (create a new "constants" section).

Also, not related to this PR, but we should update the docs. Specifically, here we no longer have get_max_inputs_per_note procedure. Instead, we are exporting this constant.

@mmagician
Copy link
Collaborator Author

@copilot address the comments in the PR review

Copy link
Contributor

Copilot AI commented Jan 8, 2026

@mmagician I've opened a new pull request, #2242, to work on those changes. Once the pull request is ready, I'll request review from you.

@mmagician
Copy link
Collaborator Author

superseded by #2232

@mmagician mmagician closed this Jan 8, 2026
@bobbinth bobbinth deleted the mmagician-remove-lib-inputs-check branch January 17, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants