Remove Plan ID non-determinism leading Monero to have distinct TX fees

Monero would select decoys with a new RNG seed, which may have used more bytes,
increasing the fee.

There's a few comments here.

1) Non-determinism wasn't removed via distinguishing the edits. It was done by
   removing part of the transcript. A TODO exists to improve this.
2) Distinct TX fees is a test failure, not an issue in prod *unless* the distinct
   fee is greater. So long as the distinct fee is lesser, it's fine.
3) Removing outputs is expected to only decrease fees.
This commit is contained in:
Luke Parker
2023-10-20 08:11:42 -04:00
parent f976bc86ac
commit 7b6181ecdb
2 changed files with 21 additions and 3 deletions

View File

@@ -113,10 +113,16 @@ impl<N: Network> Plan<N> {
transcript.append_message(b"input", input.id());
}
// Don't transcript the payments as these will change between the intended Plan and the actual
// Plan, once various fee logics have executed
// TODO: Distinguish IntendedPlan and ActualPlan, or make actual payments a distinct field,
// letting us transcript this
/*
transcript.domain_separate(b"payments");
for payment in &self.payments {
payment.transcript(&mut transcript);
}
*/
if let Some(change) = &self.change {
transcript.append_message(b"change", change.to_string());