Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-use same outs & chosen mix outs across tx construction attempts #4

Merged
merged 3 commits into from
Aug 8, 2022

Conversation

j-berman
Copy link
Contributor

@j-berman j-berman commented Feb 28, 2022

Upon completing round 1 of tx construction, the client determines
if the fee used in the tx is > result of calculate_fee(). If not,
it re-attempts the tx using the result of calculate_fee(). If the
client does not re-use the same set of mix_outs from the prior
attempt for each out, then the size of the transaction likely
ends up being a little different (because transactions reference
mix outs by on optimized offset, which varies in size depending
on the set of mix outs), even though the attempt is targeting
a fee for a transaction of an expected size. This can result in
the transaction including a fee that is *not* the result of
calculate_fee(final_tx). Thus, this change provides a way for
the client to re-use mix outs across attempts, so that the final
fee is equivalent ot the result of calculate_fee. This is now
implemented the same way as wallet2 (which also re-uses the
same set of decoys across attempts).

Bonus: it avoids trips to the server to get new decoys every
tx attempt as well.
@devinpearson devinpearson merged commit 5680366 into mymonero:master Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants