Lookup table for calculating amount commitments #245
Labels
A-storage
Related to storage.
C-proposal
A proposal of some kind, and a request for comments.
E-easy
Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-help-wanted
Call for participation: Help is requested to fix this issue.
I-perf
Problems and improvements with respect to performance of code.
P-medium
Medium priority.
What
When retrieving pre-RCT outputs from the DB we need to calculate an amount commitment for use in RCT rings, this is currently done manually:
cuprate/storage/blockchain/src/ops/output.rs
Lines 158 to 160 in 2776769
Also when adding V2 miner txs:
cuprate/storage/blockchain/src/ops/tx.rs
Lines 123 to 129 in 2776769
This issue is for creating a lookup table for common amounts (the validly decomposed amounts).
Why
Calculating commitments is slower than using a look up table.
How
I did this in our test sync branch:
cuprate/helper/src/commitment.rs
Lines 55 to 62 in 1eaf32b
However performance tests should be conducted to see if the slow path (line 60) is actually faster than our current method
The text was updated successfully, but these errors were encountered: