aboutsummaryrefslogtreecommitdiff
path: root/src/ringct/rctSigs.cpp
diff options
context:
space:
mode:
authorCrypto City <cryptocity@example.com>2021-11-05 18:10:22 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2022-05-13 17:43:21 +0000
commit353cd5355e4935ccff8e9e6c83385f81d3ce67e8 (patch)
tree236f9f49948001600692ab05d6f914b6196b37a9 /src/ringct/rctSigs.cpp
parentwallet2: speedup large tx construction: batch ringdb updates (diff)
downloadmonero-353cd5355e4935ccff8e9e6c83385f81d3ce67e8.tar.xz
wallet2: speedup large tx construction: no pointless clsag generation
4.1 seconds -> 3.3 seconds on a test case
Diffstat (limited to 'src/ringct/rctSigs.cpp')
-rw-r--r--src/ringct/rctSigs.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp
index 3e85f60ce..bd67778ec 100644
--- a/src/ringct/rctSigs.cpp
+++ b/src/ringct/rctSigs.cpp
@@ -79,6 +79,7 @@ namespace
return rct::Bulletproof{rct::keyV(n_outs, I), I, I, I, I, I, I, rct::keyV(nrl, I), rct::keyV(nrl, I), I, I, I};
}
+
rct::BulletproofPlus make_dummy_bulletproof_plus(const std::vector<uint64_t> &outamounts, rct::keyV &C, rct::keyV &masks)
{
const size_t n_outs = outamounts.size();
@@ -109,6 +110,13 @@ namespace
return rct::BulletproofPlus{rct::keyV(n_outs, I), I, I, I, I, I, I, rct::keyV(nrl, I), rct::keyV(nrl, I)};
}
+
+ rct::clsag make_dummy_clsag(size_t ring_size)
+ {
+ const rct::key I = rct::identity();
+ const size_t n_scalars = ring_size;
+ return rct::clsag{rct::keyV(n_scalars, I), I, I, I};
+ }
}
namespace rct {
@@ -1323,7 +1331,10 @@ namespace rct {
{
if (is_rct_clsag(rv.type))
{
- rv.p.CLSAGs[i] = proveRctCLSAGSimple(full_message, rv.mixRing[i], inSk[i], a[i], pseudoOuts[i], kLRki ? &(*kLRki)[i]: NULL, msout ? &msout->c[i] : NULL, msout ? &msout->mu_p[i] : NULL, index[i], hwdev);
+ if (hwdev.get_mode() == hw::device::TRANSACTION_CREATE_FAKE)
+ rv.p.CLSAGs[i] = make_dummy_clsag(rv.mixRing[i].size());
+ else
+ rv.p.CLSAGs[i] = proveRctCLSAGSimple(full_message, rv.mixRing[i], inSk[i], a[i], pseudoOuts[i], kLRki ? &(*kLRki)[i]: NULL, msout ? &msout->c[i] : NULL, msout ? &msout->mu_p[i] : NULL, index[i], hwdev);
}
else
{