From a6cb284177960f99b8b1d7ab423ddedcb9a46640 Mon Sep 17 00:00:00 2001 From: Marcel Keller Date: Wed, 17 Jan 2024 14:47:26 +1100 Subject: [PATCH] Fix bug blowing up rounds in edaBit generation with some protocols. --- Protocols/ReplicatedPrep.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Protocols/ReplicatedPrep.hpp b/Protocols/ReplicatedPrep.hpp index 2d9a161b2..c2801c4cf 100644 --- a/Protocols/ReplicatedPrep.hpp +++ b/Protocols/ReplicatedPrep.hpp @@ -916,6 +916,9 @@ template void RingPrep::buffer_edabits_without_check(int n_bits, vector>& edabits, int buffer_size) { +#ifdef VERBOSE_EDA + fprintf(stderr, "edabit buffer size %d\n", buffer_size); +#endif auto stat = this->proc->P.total_comm(); typedef typename T::bit_type::part_type bit_type; vector> bits; @@ -950,8 +953,11 @@ void RingPrep::buffer_sedabits_from_edabits(int n_bits, false_type) assert(this->proc != 0); size_t buffer_size = DIV_CEIL(BaseMachine::edabit_batch_size(n_bits), edabitvec::MAX_SIZE); +#ifdef VERBOSE_EDA + fprintf(stderr, "sedabit buffer size %zu\n", buffer_size); +#endif auto& loose = this->edabits[{false, n_bits}]; - BufferScope scope(*this, buffer_size); + BufferScope scope(*this, buffer_size * edabitvec::MAX_SIZE); while (loose.size() < buffer_size) this->buffer_edabits(false, n_bits); sanitize<0>(loose, n_bits);