chore: update zerokit to include atomic_operation

This commit is contained in:
Richard Ramos 2023-05-17 17:51:59 -04:00
parent 258cacb913
commit cea56434b0
6 changed files with 12 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -45,6 +45,11 @@ bool set_leaves_from(struct RLN *ctx, uintptr_t index, const struct Buffer *inpu
bool init_tree_with_leaves(struct RLN *ctx, const struct Buffer *input_buffer);
bool atomic_operation(struct RLN *ctx,
uintptr_t index,
const struct Buffer *leaves_buffer,
const struct Buffer *indices_buffer);
bool get_root(const struct RLN *ctx, struct Buffer *output_buffer);
bool get_proof(const struct RLN *ctx, uintptr_t index, struct Buffer *output_buffer);

View File

@ -132,6 +132,12 @@ func (r *RLN) SetLeavesFrom(index uint, idcommitments []byte) bool {
return bool(C.set_leaves_from(r.ptr, C.uintptr_t(index), idCommBuffer))
}
func (r *RLN) AtomicOperation(index uint, leaves []byte, indices []byte) bool {
leavesBuffer := toCBufferPtr(leaves)
indicesBuffer := toCBufferPtr(indices)
return bool(C.atomic_operation(r.ptr, C.uintptr_t(index), leavesBuffer, indicesBuffer))
}
func (r *RLN) DeleteLeaf(index uint) bool {
return bool(C.delete_leaf(r.ptr, C.uintptr_t(index)))
}

View File

@ -4,8 +4,6 @@ export RUSTFLAGS="-Ccodegen-units=1"
rustup default stable
cargo install cross --git https://github.com/cross-rs/cross --branch main
pushd zerokit/rln
cargo clean

@ -1 +1 @@
Subproject commit 2e868d6cbf68ee0f87975a89a25aa0333971d398
Subproject commit c2d386cb749f551541bb34c4386a3849485356f9