chore: bump zerokit to v0.5.1 (rlnv2 custom witness) (#5)

Co-authored-by: Richard Ramos <info@richardramos.me>
This commit is contained in:
Alvaro Revuelta 2024-05-29 17:34:32 +02:00 committed by GitHub
parent 8203361a01
commit be2c8ac0a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 12 additions and 12 deletions

Binary file not shown.

View File

@ -71,6 +71,10 @@ bool generate_rln_proof(struct RLN *ctx,
const struct Buffer *input_buffer, const struct Buffer *input_buffer,
struct Buffer *output_buffer); struct Buffer *output_buffer);
bool generate_rln_proof_with_witness(struct RLN *ctx,
const struct Buffer *input_buffer,
struct Buffer *output_buffer);
bool verify_rln_proof(const struct RLN *ctx, bool verify_rln_proof(const struct RLN *ctx,
const struct Buffer *proof_buffer, const struct Buffer *proof_buffer,
bool *proof_is_valid_ptr); bool *proof_is_valid_ptr);

View File

@ -160,20 +160,16 @@ func (r *RLN) GenerateRLNProof(input []byte) ([]byte, error) {
} }
func (r *RLN) GenerateRLNProofWithWitness(input []byte) ([]byte, error) { func (r *RLN) GenerateRLNProofWithWitness(input []byte) ([]byte, error) {
// TODO: Temporally disabled. In RLNv2 this is not enabled yet. inputBuffer := toCBufferPtr(input)
return nil, errors.New("not implemented")
/*
inputBuffer := toCBufferPtr(input)
var output []byte var output []byte
out := toBuffer(output) out := toBuffer(output)
if !bool(C.generate_rln_proof_with_witness(r.ptr, inputBuffer, &out)) { if !bool(C.generate_rln_proof_with_witness(r.ptr, inputBuffer, &out)) {
return nil, errors.New("could not generate the proof with witness") return nil, errors.New("could not generate the proof with witness")
} }
return C.GoBytes(unsafe.Pointer(out.ptr), C.int(out.len)), nil return C.GoBytes(unsafe.Pointer(out.ptr), C.int(out.len)), nil
*/
} }
func (r *RLN) VerifyWithRoots(input []byte, roots []byte) (bool, error) { func (r *RLN) VerifyWithRoots(input []byte, roots []byte) (bool, error) {

@ -1 +1 @@
Subproject commit 7790954c4a450808e807837cec89700032b0adb8 Subproject commit 85d71a5427ee78528d6420c04b67c7825e3c6e91