mirror of
https://github.com/monero-project/monero.git
synced 2024-12-14 04:16:32 +02:00
Add a define for the max number of bulletproof multi-outputs
This commit is contained in:
parent
2a8fcb421b
commit
7e67c52fa2
@ -141,6 +141,8 @@
|
|||||||
|
|
||||||
#define DEFAULT_TXPOOL_MAX_SIZE 648000000ull // 3 days at 300000, in bytes
|
#define DEFAULT_TXPOOL_MAX_SIZE 648000000ull // 3 days at 300000, in bytes
|
||||||
|
|
||||||
|
#define BULLETPROOF_MAX_OUTPUTS 16
|
||||||
|
|
||||||
// New constants are intended to go here
|
// New constants are intended to go here
|
||||||
namespace config
|
namespace config
|
||||||
{
|
{
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include "misc_log_ex.h"
|
#include "misc_log_ex.h"
|
||||||
#include "common/perf_timer.h"
|
#include "common/perf_timer.h"
|
||||||
|
#include "cryptonote_config.h"
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include "crypto/crypto-ops.h"
|
#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 rct::key inner_product(const rct::keyV &a, const rct::keyV &b);
|
||||||
|
|
||||||
static constexpr size_t maxN = 64;
|
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 rct::key Hi[maxN*maxM], Gi[maxN*maxM];
|
||||||
static ge_p3 Hi_p3[maxN*maxM], Gi_p3[maxN*maxM];
|
static ge_p3 Hi_p3[maxN*maxM], Gi_p3[maxN*maxM];
|
||||||
static ge_dsmp Gprecomp[maxN*maxM], Hprecomp[maxN*maxM];
|
static ge_dsmp Gprecomp[maxN*maxM], Hprecomp[maxN*maxM];
|
||||||
|
@ -762,7 +762,7 @@ namespace rct {
|
|||||||
{
|
{
|
||||||
size_t batch_size = 1;
|
size_t batch_size = 1;
|
||||||
if (range_proof_type == RangeProofMultiOutputBulletproof)
|
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;
|
batch_size *= 2;
|
||||||
rct::keyV C, masks;
|
rct::keyV C, masks;
|
||||||
std::vector<uint64_t> batch_amounts(batch_size);
|
std::vector<uint64_t> batch_amounts(batch_size);
|
||||||
|
Loading…
Reference in New Issue
Block a user