Skip to content

Commit 77ec657

Browse files
author
notnotraju
committed
cleaned up after couple of sergei's comments
1 parent cd46cbe commit 77ec657

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

barretenberg/cpp/src/barretenberg/eccvm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ This table is the most algorithmically involved.
451451
struct alignas(64) MSMRow {
452452
uint32_t pc = 0; // decreasing point-counter, over all half-length (128 bit) scalar muls used to compute
453453
// the required MSMs. however, this value is _constant_ on a given MSM and more precisely
454-
// refers to the of _completed_ half-length scalar muls completed up until we have started
454+
// refers to the number of half-length scalar muls completed up until we have started
455455
// the current MSM.
456456
uint32_t msm_size = 0; // the number of points in the current MSM. (this is _constant_ on MSM blocks.)
457457
uint32_t msm_count = 0; // number of multiplications processed so far (not including this row) in current MSM

barretenberg/cpp/src/barretenberg/eccvm/msm_builder.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ class ECCVMMSMMBuilder {
2727
static constexpr size_t NUM_WNAF_DIGITS_PER_SCALAR = bb::eccvm::NUM_WNAF_DIGITS_PER_SCALAR;
2828

2929
struct alignas(64) MSMRow {
30-
uint32_t pc = 0; // decreasing point-counter, over all half-length (128 bit) scalar muls used to compute
31-
// the required MSMs. however, this value is _constant_ on a given MSM and more precisely
32-
// refers to the of _completed_ half-length scalar muls completed up until we have started
33-
// the current MSM.
34-
uint32_t msm_size = 0; // the number of points in (a.k.a. the length of) the MSM in whose computation
35-
// this VM row participates
30+
uint32_t pc = 0; // decreasing point-counter, over all half-length (128 bit) scalar muls used to compute
31+
// the required MSMs. however, this value is _constant_ on a given MSM and more precisely
32+
// refers to the number of half-length scalar muls completed up until we have started
33+
// the current MSM.
34+
uint32_t msm_size = 0; // the number of points in (a.k.a. the length of) the MSM in whose computation
35+
// this VM row participates
3636
uint32_t msm_count = 0; // number of multiplications processed so far (not including this row) in current MSM
3737
// round (a.k.a. wNAF digit slot). this specifically refers to the number of wNAF-digit
3838
// * point scalar products we have looked up and accumulated.
@@ -79,7 +79,7 @@ class ECCVMMSMMBuilder {
7979
* @brief Computes the row values for the Straus MSM columns of the ECCVM.
8080
*
8181
* For a detailed description of the Straus algorithm and its relation to the ECCVM, please see
82-
* https://hackmd.io/@aztec-network/rJ5xhuCsn or, alternatively, the ECCVM readme.
82+
* https://hackmd.io/@aztec-network/rJ5xhuCsn or, alternatively, the [ECCVM readme](README.md).
8383
*
8484
* @param msms A vector of vectors of `ScalarMul`s, a.k.a. a vector of `MSM`s.
8585
* @param point_table_read_counts Table of read counts to be populated.

barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_msm_relation_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace bb {
1616
*
1717
* @details
1818
* The Straus algorithm for a size-k MSM takes scalars/points (a_i, [P_i]) for i = 0 to k-1.
19-
* The specific algorithm we use is may be found in the README in the `eccvm` directory. We briefly reprise the
19+
* The specific algorithm we use may be found [here](../../eccvm/README.md). We briefly reprise the
2020
* algorithm nonetheless.
2121
*
2222
* PHASE 1: Precomputation (performed in ecc_wnaf_relation.hpp, ecc_point_table_relation.hpp)
@@ -94,7 +94,7 @@ void ECCVMMSMRelationImpl<FF>::accumulate(ContainerOverSubrelations& accumulator
9494
const auto& q_double = View(in.msm_double); // is 1 iff we are at an DOUBLE row in Straus algorithm
9595
const auto& q_double_shift = View(in.msm_double_shift);
9696
const auto& msm_size = View(in.msm_size_of_msm);
97-
const auto& pc = View(in.msm_pc);
97+
const auto& pc = View(in.msm_pc); // pc stands for `point-counter`.
9898
const auto& pc_shift = View(in.msm_pc_shift);
9999
const auto& count = View(in.msm_count);
100100
const auto& count_shift = View(in.msm_count_shift);

0 commit comments

Comments
 (0)