From 1bf7242e9962c64618b80aad363b737c34eb77bf Mon Sep 17 00:00:00 2001 From: Tronica Date: Sun, 26 Jan 2025 20:19:38 +0100 Subject: [PATCH 1/6] fix spelling README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 138a3852..a7d2c929 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ The libsnark library currently provides a C++ implementation of: This is easily adapted to any other Random Access Machine that satisfies a simple load-store interface. 3. A scalable for TinyRAM using Proof-Carrying Data, as explained in \[BCTV14b] - 4. Zero-knowldge cluster MapReduce, as explained in \[CTV15]. + 4. Zero-knowledge cluster MapReduce, as explained in \[CTV15]. See the above references for discussions of efficiency aspects that arise in practical use of such constructions, as well as security and trust From 0d354fc3b1f122ed78a0a89446aef6b8f27b4943 Mon Sep 17 00:00:00 2001 From: Tronica Date: Sun, 26 Jan 2025 20:23:15 +0100 Subject: [PATCH 2/6] fix spelling kc_multiexp.hpp --- libsnark/knowledge_commitment/kc_multiexp.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsnark/knowledge_commitment/kc_multiexp.hpp b/libsnark/knowledge_commitment/kc_multiexp.hpp index ec85c175..34950650 100644 --- a/libsnark/knowledge_commitment/kc_multiexp.hpp +++ b/libsnark/knowledge_commitment/kc_multiexp.hpp @@ -10,9 +10,9 @@ /* Split out from multiexp to prevent cyclical - dependencies. I.e. previously multiexp dependend on - knowledge_commitment, which dependend on sparse_vector, which - dependend on multiexp (to do accumulate). + dependencies. I.e. previously multiexp depended on + knowledge_commitment, which depended on sparse_vector, which + depended on multiexp (to do accumulate). Will probably go away in more general exp refactoring. */ From f4db5c2b1b590259f7f80815bf707bc1289d3926 Mon Sep 17 00:00:00 2001 From: Tronica Date: Sun, 26 Jan 2025 20:24:25 +0100 Subject: [PATCH 3/6] fix spelling accumulation_vector.hpp --- libsnark/common/data_structures/accumulation_vector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsnark/common/data_structures/accumulation_vector.hpp b/libsnark/common/data_structures/accumulation_vector.hpp index 17b98f41..2135392a 100644 --- a/libsnark/common/data_structures/accumulation_vector.hpp +++ b/libsnark/common/data_structures/accumulation_vector.hpp @@ -29,7 +29,7 @@ std::istream& operator>>(std::istream &in, accumulation_vector &v); /** * An accumulation vector comprises an accumulation value and a sparse vector. - * The method "accumulate_chunk" allows one to accumlate portions of the sparse + * The method "accumulate_chunk" allows one to accumulate portions of the sparse * vector into the accumualation value. */ template From 03b1486d0288a4661590701e77f23a6ab6cf42af Mon Sep 17 00:00:00 2001 From: Tronica Date: Sun, 26 Jan 2025 20:25:08 +0100 Subject: [PATCH 4/6] fix spelling sparse_vector.tcc --- libsnark/common/data_structures/sparse_vector.tcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsnark/common/data_structures/sparse_vector.tcc b/libsnark/common/data_structures/sparse_vector.tcc index d99241c4..8c304467 100644 --- a/libsnark/common/data_structures/sparse_vector.tcc +++ b/libsnark/common/data_structures/sparse_vector.tcc @@ -196,7 +196,7 @@ std::pair > sparse_vector::accumulate(const typename std: const size_t range_len = it_end - it_begin; bool in_block = false; - size_t first_pos = -1, last_pos = -1; // g++ -flto emits unitialized warning, even though in_block guards for such cases. + size_t first_pos = -1, last_pos = -1; // g++ -flto emits uninitialized warning, even though in_block guards for such cases. for (size_t i = 0; i < indices.size(); ++i) { From 1515292cb1c0c0f45f399631a53d8e1e3f875df8 Mon Sep 17 00:00:00 2001 From: Tronica Date: Sun, 26 Jan 2025 20:26:05 +0100 Subject: [PATCH 5/6] fix spelling variable.cpp --- libsnark/gadgetlib2/variable.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsnark/gadgetlib2/variable.cpp b/libsnark/gadgetlib2/variable.cpp index 55d2e980..4e7a6466 100644 --- a/libsnark/gadgetlib2/variable.cpp +++ b/libsnark/gadgetlib2/variable.cpp @@ -227,7 +227,7 @@ FElemInterfacePtr R1P_Elem::inverse() const { } long R1P_Elem::asLong() const { - //GADGETLIB_ASSERT(elem_.as_ulong() <= LONG_MAX, "long overflow occured."); + //GADGETLIB_ASSERT(elem_.as_ulong() <= LONG_MAX, "long overflow occurred."); return long(elem_.as_ulong()); } @@ -246,13 +246,13 @@ VarIndex_t Variable::nextFreeIndex_ = 0; #ifdef DEBUG Variable::Variable(const string& name) : index_(nextFreeIndex_++), name_(name) { - GADGETLIB_ASSERT(nextFreeIndex_ > 0, GADGETLIB2_FMT("Variable index overflow has occured, maximum number of " + GADGETLIB_ASSERT(nextFreeIndex_ > 0, GADGETLIB2_FMT("Variable index overflow has occurred, maximum number of " "Variables is %lu", ULONG_MAX)); } #else Variable::Variable(const string& name) : index_(nextFreeIndex_++) { libff::UNUSED(name); - GADGETLIB_ASSERT(nextFreeIndex_ > 0, GADGETLIB2_FMT("Variable index overflow has occured, maximum number of " + GADGETLIB_ASSERT(nextFreeIndex_ > 0, GADGETLIB2_FMT("Variable index overflow has occurred, maximum number of " "Variables is %lu", ULONG_MAX)); } #endif From 87314c031389586cc06d7c8683378ca5dd4052a4 Mon Sep 17 00:00:00 2001 From: Tronica Date: Sun, 26 Jan 2025 20:27:09 +0100 Subject: [PATCH 6/6] fix spelling alu_arithmetic.tcc --- .../cpu_checkers/tinyram/components/alu_arithmetic.tcc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsnark/gadgetlib1/gadgets/cpu_checkers/tinyram/components/alu_arithmetic.tcc b/libsnark/gadgetlib1/gadgets/cpu_checkers/tinyram/components/alu_arithmetic.tcc index a8172146..21180d4f 100644 --- a/libsnark/gadgetlib1/gadgets/cpu_checkers/tinyram/components/alu_arithmetic.tcc +++ b/libsnark/gadgetlib1/gadgets/cpu_checkers/tinyram/components/alu_arithmetic.tcc @@ -1308,7 +1308,7 @@ void ALU_shr_shl_gadget::generate_r1cs_constraints() old_result = (shifted_result * 2^(i+1) + shifted_out_part) * need_to_shift + - (shfited_result) * (1-need_to_shift) + (shifted_result) * (1-need_to_shift) old_result - shifted_result = (shifted_result * (2^(i+1) - 1) + shifted_out_part) * need_to_shift */ @@ -1396,7 +1396,7 @@ void ALU_shr_shl_gadget::generate_r1cs_witness() old_result = (shifted_result * 2^i + shifted_out_part) * need_to_shift + - (shfited_result) * (1-need_to_shift) + (shifted_result) * (1-need_to_shift) */ for (size_t i = 0; i < logw; ++i)