barretenberg
Loading...
Searching...
No Matches
mock_circuit.hpp
1#pragma once
2#include "barretenberg/common/map.hpp"
3#include "barretenberg/stdlib/hash/pedersen/pedersen.hpp"
4#include "barretenberg/stdlib/primitives/field/field.hpp"
5namespace join_split_example {
6namespace proofs {
7namespace mock {
8
9using namespace proof_system::plonk;
10
11template <typename Builder> void mock_circuit(Builder& builder, std::vector<barretenberg::fr> const& public_inputs_)
12{
13 const auto public_inputs =
14 map(public_inputs_, [&](auto& i) { return stdlib::field_t(stdlib::witness_t(&builder, i)); });
15 for (auto& p : public_inputs) {
16 p.set_public();
17 }
20}
21
22} // namespace mock
23} // namespace proofs
24} // namespace join_split_example
Definition: standard_circuit_builder.hpp:12
Definition: field.hpp:10
stdlib class that evaluates in-circuit pedersen hashes, consistent with behavior in crypto::pedersen_...
Definition: pedersen.hpp:18
Definition: witness.hpp:10
Definition: widget.bench.cpp:13