Rewrite monero-wallet's send code

I have yet to redo the multisig code and the builder. This should be much
cleaner, albeit slower due to redoing work.

This compiles with clippy --all-features. I have to finish the multisig/builder
for --all-targets to work (and start updating the rest of Serai).
This commit is contained in:
Luke Parker
2024-06-27 07:36:45 -04:00
parent b3b0edb82f
commit 70c36ed06c
14 changed files with 1189 additions and 1791 deletions

View File

@@ -222,9 +222,12 @@ fn core(
/// The CLSAG signature, as used in Monero.
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct Clsag {
D: EdwardsPoint,
s: Vec<Scalar>,
c1: Scalar,
/// The difference of the commitment randomnesses, scaling the key image generator.
pub D: EdwardsPoint,
/// The responses for each ring member.
pub s: Vec<Scalar>,
/// The first challenge in the ring.
pub c1: Scalar,
}
struct ClsagSignCore {
@@ -383,7 +386,7 @@ impl Clsag {
Ok(())
}
/// The weight a CLSAG will take within a Monero transaction.
/// The length a CLSAG will take once serialized.
pub fn fee_weight(ring_len: usize) -> usize {
(ring_len * 32) + 32 + 32
}