22 for (
size_t i = 0; i < tree_depth; ++i) {
31 std::transform(input.begin(), input.end(),
std::back_inserter(result), [&](
auto const& v) {
32 return std::make_pair(bb::stdlib::field_t(bb::stdlib::witness_t(&ctx, v.first)),
33 bb::stdlib::field_t(bb::stdlib::witness_t(&ctx, v.second)));
43template <
typename Ctx>
47 for (
size_t i = 0;
i < path.size(); ++
i) {
48 os <<
" (" <<
i <<
": " << path[
i].first <<
", " << path[
i].second <<
")\n";
57 for (
size_t i = 0;
i < path.size(); ++
i) {
58 os <<
" (" <<
i <<
": " << path[
i].first <<
", " << path[
i].second <<
")\n";
std::vector< std::pair< bb::stdlib::field_t< Ctx >, bb::stdlib::field_t< Ctx > > > hash_path
hash_path< Ctx > create_witness_hash_path(Ctx &ctx, fr_hash_path const &input)
fr_hash_path get_random_hash_path(size_t const &tree_depth)
std::vector< std::pair< fr, fr > > fr_hash_path
std::vector< fr > fr_sibling_path
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::ostream & operator<<(std::ostream &os, const T &obj)
Automatically derived stream operator for any object that defines .msgpack() (implicitly defined by M...
static field random_element(numeric::RNG *engine=nullptr) noexcept