-
Notifications
You must be signed in to change notification settings - Fork 5
Computation of nonces #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 adds explicit nonce support throughout object and resource representations, updates nullifier proof handling, and threads randomness into action creation.
- Introduce
nonce : Option Anoma.NonceonObjectand propagate it intoAnoma.Resourceconversions - Replace
NullifierProofwithCanNullifyResourceand adjustnullifylogic - Thread random nonce generation into compliance units and dummy resources
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Prelude/TypeRep.lean | Added bneq_generic not-equal operator |
| Anoma/Resource.lean | Renamed NullifierProof to CanNullifyResource |
| Anoma/NullifierKey.lean | New NullifierKey and commitment definitions |
| Anoma/Nullifier.lean | Removed duplicate key logic; added Nullifier.toNonce |
| Anoma/Nonce.lean | Defined Nonce alias |
| Anoma/Action.lean | Updated LogicVerifierInput and Action universes |
| AVM/Object/Consumable.lean | Added toResource helper for consumables |
| AVM/Object.lean | Introduced nonce on Object and updated conversion APIs |
| AVM/Intent/Translation.lean | Refactored Intent.action to thread StdGen and nonces |
| AVM/Class/Translation.lean | Refactored Action.create to thread randomness and nonces |
| AVM/Class/Member/Logic.lean | Parameterized dummyResource by nonce; changed dummy filtering |
Comments suppressed due to low confidence (1)
AVM/Class/Translation.lean:22
- [nitpick] The apostrophe in
create'may be unclear. Consider a more descriptive name likecreateWithGenorcreateGento clarify its purpose.
private def Action.create' (g : StdGen) (lab : Label) (memberId : Label.MemberId lab)
Co-authored-by: Copilot <[email protected]>
nonce : Option Anoma.Noncefield toObject. Thenonceis assumed to be available for objects fetched from the system, including allselfobjects.