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

monero: make dummy payment ID zeroes when it's included in a tx #514

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

j-berman
Copy link
Contributor

This ensures when sending to a single counter-party who doesn't use an integrated address, the counter-party would see a payment ID of all zeroes, rather than random values. Matches wallet2's behavior (can check the change to the receipt_of_wallet_rpc_tx_standard test in this PR to see wallet2's behavior).

Note the 2 special circumstances in which wallet2 ignores the payment ID:

  1. The payment ID is tied to an output received by the subaddress account that spent Monero in the tx (i.e. a self-spend).
  2. If the payment ID is the unencrypted variant and the block's hf version is v12 or higher (fixes Document that wallet2 ignores unencrypted payment IDs after hf v12 #512)

Also note that when using monero-serai to send to 2 destinations with no change, monero-serai would not include a payment ID since 1) it doesn't know which recipient should see the payment ID, and 2) this tx is fingerprintable by the fee anyway (the change is shunted to the fee).

I also did some minor cleaning of InternalPayment::Change

@kayabaNerve kayabaNerve merged commit 0880453 into serai-dex:develop Feb 20, 2024
15 of 16 checks passed
kayabaNerve pushed a commit that referenced this pull request Feb 25, 2024
* monero: make dummy payment ID zeroes when it's included in a tx

Also did some minor cleaning of InternalPayment::Change

* Lint

* Clarify comment
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.

Document that wallet2 ignores unencrypted payment IDs after hf v12
2 participants