Skip to content

Commit

Permalink
chore(circuits): remove dead code in cbind.cpp for public kernel (#2094)
Browse files Browse the repository at this point in the history
Resolves #2093 

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [x] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [x] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [x] Every change is related to the PR description.
- [x] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
  • Loading branch information
jeanmon authored Sep 7, 2023
1 parent 43dc9d7 commit 861f960
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
24 changes: 0 additions & 24 deletions circuits/cpp/src/aztec3/circuits/kernel/public/c_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,6 @@ using aztec3::circuits::kernel::public_kernel::native_public_kernel_circuit_publ

// WASM Cbinds

WASM_EXPORT size_t public_kernel__init_proving_key(uint8_t const** pk_buf)
{
std::vector<uint8_t> pk_vec(42, 0);

auto* raw_buf = (uint8_t*)malloc(pk_vec.size());
memcpy(raw_buf, (void*)pk_vec.data(), pk_vec.size());
*pk_buf = raw_buf;

return pk_vec.size();
}

WASM_EXPORT size_t public_kernel__init_verification_key(uint8_t const* pk_buf, uint8_t const** vk_buf)
{
std::vector<uint8_t> vk_vec(42, 0);
// TODO(dbanks12): remove when proving key is used
(void)pk_buf; // unused

auto* raw_buf = (uint8_t*)malloc(vk_vec.size());
memcpy(raw_buf, (void*)vk_vec.data(), vk_vec.size());
*vk_buf = raw_buf;

return vk_vec.size();
}

CBIND(public_kernel__sim, [](PublicKernelInputs<NT> public_kernel_inputs) {
DummyBuilder builder = DummyBuilder("public_kernel__sim");
KernelCircuitPublicInputs<NT> const result =
Expand Down
2 changes: 0 additions & 2 deletions circuits/cpp/src/aztec3/circuits/kernel/public/c_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
#include <cstddef>
#include <cstdint>

WASM_EXPORT size_t public_kernel__init_proving_key(uint8_t const** pk_buf);
WASM_EXPORT size_t public_kernel__init_verification_key(uint8_t const* pk_buf, uint8_t const** vk_buf);
CBIND_DECL(public_kernel__sim);

0 comments on commit 861f960

Please sign in to comment.