-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: align bbmalloc implementations (#1513)
This was wrong in circuits. This should have never been duplicated (mea culpa). The implementations drifted with the WASI SDK version 20 push. Don't think we hit issues with this, but they'd be nasty if we did.
- Loading branch information
Showing
20 changed files
with
14 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
circuits/cpp/barretenberg/cpp/src/barretenberg/common/wasm_export.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
#pragma once | ||
#ifdef __clang__ | ||
#define WASM_EXPORT extern "C" __attribute__((visibility("default"))) __attribute__((annotate("wasm_export"))) | ||
#define ASYNC_WASM_EXPORT \ | ||
extern "C" __attribute__((visibility("default"))) __attribute__((annotate("async_wasm_export"))) | ||
#else | ||
#define WASM_EXPORT extern "C" __attribute__((visibility("default"))) | ||
#define ASYNC_WASM_EXPORT extern "C" __attribute__((visibility("default"))) | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
circuits/cpp/barretenberg/cpp/src/barretenberg/crypto/blake3s/c_bind.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
#include "barretenberg/ecc/curves/bn254/fr.hpp" | ||
#include "barretenberg/common/wasm_export.hpp" | ||
#include "blake3s.hpp" | ||
|
||
#define WASM_EXPORT __attribute__((visibility("default"))) | ||
|
||
extern "C" { | ||
|
||
WASM_EXPORT void blake3s_to_field(uint8_t const* data, size_t length, uint8_t* r) | ||
{ | ||
std::vector<uint8_t> inputv(data, data + length); | ||
std::vector<uint8_t> output = blake3::blake3s(inputv); | ||
auto result = barretenberg::fr::serialize_from_buffer(output.data()); | ||
barretenberg::fr::serialize_to_buffer(result, r); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/secp256k1/c_bind.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
#include "secp256k1.hpp" | ||
|
||
#define WASM_EXPORT __attribute__((visibility("default"))) | ||
|
||
extern "C" { | ||
|
||
WASM_EXPORT void ecc_secp256k1__mul(uint8_t const* point_buf, uint8_t const* scalar_buf, uint8_t* result); | ||
|
||
WASM_EXPORT void ecc_secp256k1__get_random_scalar_mod_circuit_modulus(uint8_t* result); | ||
|
||
WASM_EXPORT void ecc_secp256k1__reduce512_buffer_mod_circuit_modulus(uint8_t* input, uint8_t* result); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
circuits/cpp/barretenberg/cpp/src/barretenberg/join_split_example/proofs/join_split/c_bind.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
#include <cstdint> | ||
|
||
#define WASM_EXPORT __attribute__((visibility("default"))) | ||
|
||
extern "C" { | ||
|
||
WASM_EXPORT uint32_t join_split__get_new_proving_key_data(uint8_t** output); | ||
|
||
} |
2 changes: 0 additions & 2 deletions
2
circuits/cpp/barretenberg/cpp/src/barretenberg/plonk/proof_system/prover/c_bind.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
circuits/cpp/barretenberg/cpp/src/barretenberg/serialize/cbind_fwd.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters