Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
hash_path.hpp
Go to the documentation of this file.
1
// === AUDIT STATUS ===
2
// internal: { status: Planned, auditors: [], commit: }
3
// external_1: { status: not started, auditors: [], commit: }
4
// external_2: { status: not started, auditors: [], commit: }
5
// =====================
6
7
#pragma once
8
#include "
hash.hpp
"
9
#include <vector>
10
11
namespace
bb::crypto::merkle_tree
{
12
13
using
fr_hash_path
=
std::vector<std::pair<fr, fr>
>;
14
using
fr_sibling_path
= std::vector<fr>;
15
16
}
// namespace bb::crypto::merkle_tree
17
18
// We add to std namespace as fr_hash_path is actually a std::vector, and this is the only way
19
// to achieve effective ADL.
20
namespace
std
{
21
inline
std::ostream&
operator<<
(std::ostream&
os
,
bb::crypto::merkle_tree::fr_hash_path
const
& path)
22
{
23
os
<<
"[\n"
;
24
for
(
size_t
i
= 0;
i
< path.size(); ++
i
) {
25
os
<<
" ("
<<
i
<<
": "
<< path[
i
].first <<
", "
<< path[
i
].second <<
")\n"
;
26
}
27
os
<<
"]\n"
;
28
return
os
;
29
}
30
}
// namespace std
hash.hpp
bb::crypto::merkle_tree
Definition
content_addressed_append_only_tree.hpp:33
bb::crypto::merkle_tree::fr_hash_path
std::vector< std::pair< fr, fr > > fr_hash_path
Definition
hash_path.hpp:13
bb::crypto::merkle_tree::fr_sibling_path
std::vector< fr > fr_sibling_path
Definition
hash_path.hpp:14
std
STL namespace.
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
std::operator<<
std::ostream & operator<<(std::ostream &os, const T &obj)
Automatically derived stream operator for any object that defines .msgpack() (implicitly defined by M...
Definition
streams.hpp:79
src
barretenberg
crypto
merkle_tree
hash_path.hpp
Generated by
1.9.8