File tree Expand file tree Collapse file tree
barretenberg/cpp/src/barretenberg/srs/factories Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,6 +69,18 @@ size_t round_up_to_chunk_boundary(size_t num_points)
6969 * @details Verifies all complete chunks in parallel across available cores with early-exit
7070 * on first mismatch. Also verifies the partial last chunk (if present) so every downloaded byte
7171 * is covered. Uses std::span to avoid per-chunk memory allocation.
72+ *
73+ * @note Intentionally invoked from a single site — `download_bn254_g1_data` below — and not from
74+ * the cache-hit, MemBn254Crs ctor, or `bbapi::SrsInitSrs` paths. This is the only path that
75+ * (a) fetches CRS bytes over plain HTTP, and (b) does not consume bytes that have already been
76+ * hash-verified upstream:
77+ * - the cache-hit paths (uncompressed and compressed) read bytes that were verified by this
78+ * function on a previous run before being cached;
79+ * - `bbapi::SrsInitSrs` (bb.js / WASM) receives bytes that bb.js itself fetched over HTTPS,
80+ * where TLS provides transport integrity;
81+ * - `MemBn254Crs` is constructed in-process from already-validated points.
82+ * Therefore re-anchoring at every additional call site is redundant; this anchor exists
83+ * specifically to compensate for the plain-HTTP fetch on the fresh-download path.
7284 */
7385void verify_bn254_crs_integrity (const std::vector<uint8_t >& data)
7486{
You can’t perform that action at this time.
0 commit comments