Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke committed Sep 19, 2024
1 parent 4d9a222 commit 0b910d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion rust_bindings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pub fn prove(
x_s.len(),
discriminant_size_bits,
num_iterations,
b"\0"
);
if array.data.is_null() {
return None;
Expand Down
4 changes: 2 additions & 2 deletions src/c_bindings/c_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ extern "C" {
}
}

ByteArray prove_wrapper(const uint8_t* challenge_hash, size_t challenge_size, const uint8_t* x_s, size_t x_s_size, size_t discriminant_size_bits, uint64_t num_iterations, char *shutdown_file_path) {
ByteArray prove_wrapper(const uint8_t* challenge_hash, size_t challenge_size, const uint8_t* x_s, size_t x_s_size, size_t discriminant_size_bits, uint64_t num_iterations) {
try {
std::vector<uint8_t> challenge_hash_bytes(challenge_hash, challenge_hash + challenge_size);
integer discriminant = CreateDiscriminant(challenge_hash_bytes, discriminant_size_bits);
form x = DeserializeForm(discriminant, x_s, x_s_size);
std::vector<uint8_t> result = ProveSlow(discriminant, x, num_iterations, shutdown_file_path);
std::vector<uint8_t> result = ProveSlow(discriminant, x, num_iterations, "");

// Allocate memory for the result and copy data
uint8_t* resultData = new uint8_t[result.size()];
Expand Down
2 changes: 1 addition & 1 deletion src/c_bindings/c_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ typedef struct {
uint8_t* data;
size_t length;
} ByteArray;
ByteArray prove_wrapper(const uint8_t* challenge_hash, size_t challenge_size, const uint8_t* x_s, size_t x_s_size, size_t discriminant_size_bits, uint64_t num_iterations, char *shutdown_file_path);
ByteArray prove_wrapper(const uint8_t* challenge_hash, size_t challenge_size, const uint8_t* x_s, size_t x_s_size, size_t discriminant_size_bits, uint64_t num_iterations);

bool verify_n_wesolowski_wrapper(const uint8_t* discriminant_bytes, size_t discriminant_size, const uint8_t* x_s, const uint8_t* proof_blob, size_t proof_blob_size, uint64_t num_iterations, uint64_t recursion);
void delete_byte_array(ByteArray array);
Expand Down

0 comments on commit 0b910d9

Please sign in to comment.