-
Notifications
You must be signed in to change notification settings - Fork 5
Compliance units #43
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
Compliance units #43
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 introduces a new compliance‐unit abstraction for actions, refactors transactions accordingly, and updates the intent and class translation layers to emit compliance units with dummy resources.
- Add
ComplianceWitness,ComplianceInstance, andComplianceUnitstructures with a placeholdercreatefunction - Change
Anoma.TransactionandAnoma.Actionto reference lists of compliance units and logic‐verifier inputs, dropping the oldrootsfield - Update intent and class translation code to generate compliance units (using dummy ephemeral resources) and filter them out in logic checks
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Anoma/Transaction.lean | Removed old Tag, Action, and roots; import new Anoma.Action |
| Anoma/Compliance.lean | Introduced compliance unit types and placeholder create impl |
| Anoma/Action.lean | Defined Action with complianceUnits and logicVerifierInputs |
| AVM/Object/Consumable.lean | Deleted legacy toRootedNullifiableResource helpers |
| AVM/Intent/Translation.lean | Emit compliance units, filter dummy resources, and rename maps |
| AVM/Class/Translation.lean | Generate compliance units and verifier inputs in class actions |
| AVM/Class/Member/Logic.lean | Added dummyResource and filterOutDummy to ignore ephemeral resources |
Comments suppressed due to low confidence (3)
Anoma/Compliance.lean:19
- [nitpick] Field name 'rcv' is unclear; consider renaming to a more descriptive identifier like 'randomScalar' and using a domain‐specific numeric type instead of String.
rcv : String := ""
Anoma/Compliance.lean:21
- [nitpick] The ComplianceInstance struct is currently empty. Please document its intended fields or populate it with the necessary data to represent a compliance instance.
structure ComplianceInstance where
Anoma/Compliance.lean:29
- The placeholder 'ComplianceUnit.create' implementation currently has no tests. Add unit tests to cover its behavior once it is fully implemented.
def ComplianceUnit.create (_witness : ComplianceWitness) : ComplianceUnit :=
|
|
||
| abbrev MerklePath := List Nat | ||
|
|
||
| structure ComplianceWitness where |
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.
If it's not too troublesome, I would consider adding an additional field nullifierProof : NullifierProof nfKey consumedResource
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.
let's add it later
commit 4b9457b Author: Jan Mas Rovira <[email protected]> Date: Fri Jul 18 09:44:49 2025 +0200 add keys commit 0695dd3 Author: Jan Mas Rovira <[email protected]> Date: Fri Jul 18 08:00:17 2025 +0200 action commit 9c21534 Author: Jan Mas Rovira <[email protected]> Date: Thu Jul 17 22:01:49 2025 +0200 Logic commit c0c6d22 Author: Jan Mas Rovira <[email protected]> Date: Thu Jul 17 18:41:41 2025 +0200 more refactors commit bcaa410 Author: Jan Mas Rovira <[email protected]> Date: Thu Jul 17 17:30:49 2025 +0200 refactor files commit 5bb96be Author: Jan Mas Rovira <[email protected]> Date: Thu Jul 17 15:47:59 2025 +0200 adapt examples commit 0e0cdf6 Author: Jan Mas Rovira <[email protected]> Date: Thu Jul 17 13:19:14 2025 +0200 label for intents commit eae64cf Author: Jan Mas Rovira <[email protected]> Date: Thu Jul 17 10:06:38 2025 +0200 logic checks commit 7155377 Author: Jan Mas Rovira <[email protected]> Date: Wed Jul 16 22:32:16 2025 +0200 move intents out commit e0882f4 Author: Jan Mas Rovira <[email protected]> Date: Wed Jul 16 22:15:20 2025 +0200 function logic commit 2051950 Author: Jan Mas Rovira <[email protected]> Date: Wed Jul 16 14:37:26 2025 +0200 more changes commit 9e8ca17 Author: Jan Mas Rovira <[email protected]> Date: Tue Jul 15 19:14:04 2025 +0200 ecosystem wip commit 4d809d0 Author: Łukasz Czajka <[email protected]> Date: Wed Jul 16 15:47:23 2025 +0200 Use the `label` field to store Intent.ResourceData (#44) - Closes #39 commit 3db1b8e Author: Łukasz Czajka <[email protected]> Date: Wed Jul 16 06:42:20 2025 +0200 Compliance units (#43) - Closes #10 - The translation is modified to divide each action into compliance units. Dummy ephemeral resources with quantity 0 are added to satisfy the requirement that each compliance unit needs to have one consumed and one created resource. - The RLs are updated to filter out (ignore) the dummy resources. --------- Co-authored-by: Copilot <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.