chore: bump zerokit to v0.5.0 including RLN v2 (#6)

This commit is contained in:
Alvaro Revuelta 2024-05-23 18:13:10 +02:00 committed by GitHub
parent 37fbb869c3
commit d005fe7ba5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 13 deletions

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,7 @@
#include <stdint.h>
#include <stdlib.h>
#define TEST_PARAMETERS_INDEX 2
#define TEST_TREE_HEIGHT 20
/**
* The RLN object.
@ -71,10 +71,6 @@ bool generate_rln_proof(struct RLN *ctx,
const struct Buffer *input_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,
const struct Buffer *proof_buffer,
bool *proof_is_valid_ptr);

View File

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

@ -1 +1 @@
Subproject commit 6b86244b6b8df6ba16f78f7d906fe2348e9f7bec
Subproject commit 7790954c4a450808e807837cec89700032b0adb8