diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-03-30 20:44:51 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-11 13:37:38 +0000 |
commit | 7e67c52fa2a4ee68437a5fd906d9848a2f0a7150 (patch) | |
tree | 8560ac0d2d41a961ccc5b92583f692cb02694596 /src | |
parent | Bulletproof aggregated verification and tests (diff) | |
download | monero-7e67c52fa2a4ee68437a5fd906d9848a2f0a7150.tar.xz |
Add a define for the max number of bulletproof multi-outputs
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_config.h | 2 | ||||
-rw-r--r-- | src/ringct/bulletproofs.cc | 3 | ||||
-rw-r--r-- | src/ringct/rctSigs.cpp | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index a0dcf2df1..00bc2f275 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -141,6 +141,8 @@ #define DEFAULT_TXPOOL_MAX_SIZE 648000000ull // 3 days at 300000, in bytes +#define BULLETPROOF_MAX_OUTPUTS 16 + // New constants are intended to go here namespace config { diff --git a/src/ringct/bulletproofs.cc b/src/ringct/bulletproofs.cc index 94be0e545..dc5918738 100644 --- a/src/ringct/bulletproofs.cc +++ b/src/ringct/bulletproofs.cc @@ -33,6 +33,7 @@ #include <boost/thread/mutex.hpp> #include "misc_log_ex.h" #include "common/perf_timer.h" +#include "cryptonote_config.h" extern "C" { #include "crypto/crypto-ops.h" @@ -57,7 +58,7 @@ static rct::keyV vector_dup(const rct::key &x, size_t n); static rct::key inner_product(const rct::keyV &a, const rct::keyV &b); static constexpr size_t maxN = 64; -static constexpr size_t maxM = 16; +static constexpr size_t maxM = BULLETPROOF_MAX_OUTPUTS; static rct::key Hi[maxN*maxM], Gi[maxN*maxM]; static ge_p3 Hi_p3[maxN*maxM], Gi_p3[maxN*maxM]; static ge_dsmp Gprecomp[maxN*maxM], Hprecomp[maxN*maxM]; diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp index 2175d1659..d2dc87e27 100644 --- a/src/ringct/rctSigs.cpp +++ b/src/ringct/rctSigs.cpp @@ -762,7 +762,7 @@ namespace rct { { size_t batch_size = 1; if (range_proof_type == RangeProofMultiOutputBulletproof) - while (batch_size * 2 + amounts_proved <= n_amounts && batch_size * 2 <= 16) + while (batch_size * 2 + amounts_proved <= n_amounts && batch_size * 2 <= BULLETPROOF_MAX_OUTPUTS) batch_size *= 2; rct::keyV C, masks; std::vector<uint64_t> batch_amounts(batch_size); |