cl: remove unused classes
This commit is contained in:
parent
a85aaf1824
commit
b2b2213bd6
|
@ -13,20 +13,6 @@ from crypto import (
|
|||
from constraints import Constraint, Proof
|
||||
|
||||
|
||||
# TODO: is this used?
|
||||
@dataclass
|
||||
class NoteCommitment:
|
||||
cm: Field
|
||||
blinding: Field
|
||||
zero: Field
|
||||
|
||||
|
||||
# TODO: is this used?
|
||||
@dataclass
|
||||
class Nullifier:
|
||||
nf: bytes
|
||||
|
||||
|
||||
def nf_pk(nf_sk) -> Field:
|
||||
return prf("CL_NOTE_NF", nf_sk)
|
||||
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
* Open Issues
|
||||
|
||||
** Note.verify() should take a proof
|
||||
|
||||
We should have two variants, verifyDeath(deathProof) verifyBirth(birthProof)
|
||||
|
||||
** provided commitment to zero may removing the blinding of the pederson commitment
|
||||
|
||||
Since you can subtract the randomness from the commitment to get just the binding part.
|
||||
|
||||
Ok, lets deal with these zero commitments.
|
||||
|
||||
In place of zero commitments, we can have the solver prove that the value part of a pederson
|
||||
commitment is zero.
|
||||
|
||||
|
||||
|
||||
** Rename transaction randonmness to tx_rand and commitment randomness to cm_rand
|
||||
|
||||
Currently they are both called "rand" and it's confusing.
|
||||
|
@ -77,6 +80,11 @@ I've gone and denoted it as bytes.
|
|||
|
||||
|
||||
* Solved
|
||||
** Note.verify() should take a proof
|
||||
|
||||
We should have two variants, verifyDeath(deathProof) verifyBirth(birthProof)
|
||||
|
||||
|
||||
** Do we need note.randomness?
|
||||
|
||||
It's currently used in the note commitment. But perhaps it's not really necessary?
|
||||
|
|
|
@ -27,16 +27,6 @@ class OutputNote:
|
|||
return self.note.note.verify_birth(self.birth_proof)
|
||||
|
||||
|
||||
# TODO: is this used?
|
||||
@dataclass
|
||||
class Output:
|
||||
note: PublicNote
|
||||
|
||||
# pre-computed balance and zero commitment "SecretNote" here.
|
||||
balance: Field
|
||||
zero: Field
|
||||
|
||||
|
||||
@dataclass(unsafe_hash=True)
|
||||
class PartialTransaction:
|
||||
inputs: list[InputNote]
|
||||
|
|
|
@ -15,9 +15,9 @@ import constraint
|
|||
|
||||
@dataclass
|
||||
class State:
|
||||
commitments: set[note.Commitment]
|
||||
nullifiers: set[note.Nullifier]
|
||||
constraints: dict[bytes, constraint.Constraint]
|
||||
# commitments: set[note.Commitment]
|
||||
# nullifiers: set[note.Nullifier]
|
||||
# constraints: dict[bytes, constraint.Constraint]
|
||||
|
||||
def add_constraint(self, c: constraint.Constraint):
|
||||
self.constraints[c.hash()] = c
|
||||
|
|
Loading…
Reference in New Issue