mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
wallet2: speedup large tx construction: no pointless clsag generation
4.1 seconds -> 3.3 seconds on a test case
This commit is contained in:
parent
2b95178897
commit
353cd5355e
1 changed files with 12 additions and 1 deletions
|
@ -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};
|
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)
|
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();
|
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)};
|
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 {
|
namespace rct {
|
||||||
|
@ -1323,6 +1331,9 @@ namespace rct {
|
||||||
{
|
{
|
||||||
if (is_rct_clsag(rv.type))
|
if (is_rct_clsag(rv.type))
|
||||||
{
|
{
|
||||||
|
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);
|
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
|
else
|
||||||
|
|
Loading…
Reference in a new issue