Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukaszcz
Copy link
Collaborator

The none value always corresponded to the default value of NullifierKeyCommitment (universal key commitment) anyway.

@lukaszcz lukaszcz self-assigned this Jul 23, 2025
@lukaszcz lukaszcz requested review from Copilot and janmasrovira July 23, 2025 12:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the optional nature of the nullifierKeyCommitment field in the Object structure, making it a required field with a default value. The change simplifies the codebase by eliminating the need to handle none cases since they always corresponded to the universal key commitment default value anyway.

Key changes:

  • Changed nullifierKeyCommitment from Option Anoma.NullifierKeyCommitment to Anoma.NullifierKeyCommitment := default
  • Removed the helper function Object.nullifierKeyCommitment! that was used to unwrap the optional value
  • Updated all usage sites to directly access the field instead of using the helper function

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
AVM/Object.lean Modified the Object structure to make nullifierKeyCommitment non-optional with default value and removed the helper function
Apps/UniversalCounter.lean Removed explicit assignment of none to nullifierKeyCommitment in toObject function
AVM/Logic.lean Updated field access to use direct field reference instead of helper function

@janmasrovira janmasrovira merged commit fab5e6a into main Jul 23, 2025
2 checks passed
@janmasrovira janmasrovira deleted the nk-commitment-not-optional branch July 23, 2025 16:15
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