-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a036233
commit 121a69a
Showing
7 changed files
with
131 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- An instantiation of a Proving System for Delta proofs. | ||
module Anoma.ProvingSystem.ComplianceProof; | ||
|
||
import Stdlib.Prelude open using {Bool}; | ||
import Anoma.ProvingSystem.Types as Parametrized; | ||
|
||
axiom Proof : Type; | ||
|
||
axiom VerifyingKey : Type; | ||
|
||
axiom ProvingKey : Type; | ||
|
||
--- TODO Can this types be replaced with definitions from `Anoma.State.CommitmentTree` and `Anoma.State.NullifierSet`? | ||
axiom Instance : Type; | ||
|
||
--- TODO Can this types be replaced with definitions from `Anoma.State.CommitmentTree` and `Anoma.State.NullifierSet`? | ||
axiom Witness : Type; | ||
|
||
ProofRecord : Type := Parametrized.ProofRecord Proof VerifyingKey Witness; | ||
|
||
axiom prove : (provingKey : ProvingKey) | ||
-> (publicInputs : Instance) | ||
-> (privateInputs : Witness) | ||
-> Proof; | ||
|
||
axiom verify : (proofRecord : ProofRecord) -> Bool; | ||
|
||
instance | ||
Compliance-ProvingSystem | ||
: Parametrized.ProvingSystem Proof VerifyingKey ProvingKey Witness Instance := | ||
Parametrized.mkProvingSystem@{ | ||
prove; | ||
verify | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- An instantiation of a Proving System for Delta proofs. | ||
module Anoma.ProvingSystem.DeltaProof; | ||
|
||
import Stdlib.Prelude open using {Bool}; | ||
import Anoma.ProvingSystem.Types as Parametrized; | ||
|
||
axiom Proof : Type; | ||
|
||
axiom VerifyingKey : Type; | ||
|
||
axiom ProvingKey : Type; | ||
|
||
--- TODO Can this types be replaced with definitions from `Anoma.Transaction.Delta`? | ||
axiom Instance : Type; | ||
|
||
--- TODO Can this types be replaced with definitions from `Anoma.Transaction.Delta`? | ||
axiom Witness : Type; | ||
|
||
ProofRecord : Type := Parametrized.ProofRecord Proof VerifyingKey Witness; | ||
|
||
axiom prove : (provingKey : ProvingKey) | ||
-> (publicInputs : Instance) | ||
-> (privateInputs : Witness) | ||
-> Proof; | ||
|
||
axiom verify : (proofRecord : ProofRecord) -> Bool; | ||
|
||
instance | ||
Delta-ProvingSystem : Parametrized.ProvingSystem Proof VerifyingKey ProvingKey Witness Instance := | ||
Parametrized.mkProvingSystem@{ | ||
prove; | ||
verify | ||
}; | ||
|
||
--- Aggregates two delta ;ProofRecord;s. | ||
axiom aggregate : (p1 p2 : ProofRecord) -> ProofRecord; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module Anoma.ProvingSystem.ResourceLogicProof; | ||
|
||
import Stdlib.Prelude open using {Bool}; | ||
import Anoma.ProvingSystem.Types as Parametrized; | ||
import Anoma.Resource.Logic as ResourceLogic; | ||
|
||
--- A fixed-size data type encoding the resource logic proof. | ||
axiom Proof : Type; | ||
|
||
--- A fixed-size data type encoding the verifying key of the resource logic proof. | ||
axiom VerifyingKey : Type; | ||
|
||
--- A fixed-size data type encoding the proving key of the resource logic proof. | ||
axiom ProvingKey : Type; | ||
|
||
ProofRecord : Type := Parametrized.ProofRecord Proof VerifyingKey ResourceLogic.Witness; | ||
|
||
axiom prove : (provingKey : ProvingKey) | ||
-> (publicInputs : ResourceLogic.Instance) | ||
-> (privateInputs : ResourceLogic.Witness) | ||
-> Proof; | ||
|
||
axiom verify : (proofRecord : ProofRecord) -> Bool; | ||
|
||
instance | ||
ResourceLogic-ProvingSystem | ||
: Parametrized.ProvingSystem | ||
Proof | ||
VerifyingKey | ||
ProvingKey | ||
ResourceLogic.Witness | ||
ResourceLogic.Instance := | ||
Parametrized.mkProvingSystem@{ | ||
prove; | ||
verify | ||
}; |
This file contains 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
This file contains 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
This file contains 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