Save a transaction secret reported after the file exists - #735
Open
j0ntz wants to merge 1 commit into
Open
Conversation
2 tasks
j0ntz
marked this pull request as ready for review
August 12, 2026 02:11
j0ntz
force-pushed
the
jon/monero-tx-key
branch
from
August 12, 2026 02:11
ca3ca74 to
3e7b193
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e7b193b0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
j0ntz
force-pushed
the
jon/monero-tx-key
branch
2 times, most recently
from
August 12, 2026 02:33
64c17ee to
92ca08d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 92ca08d. Configure here.
A transaction's secret lives in its metadata file and nowhere else, and that file is written once, when the transaction is first seen. An engine that learns a secret later had no way to hand it over: the merged transaction drops the secret, so a transaction that gained one compares as unchanged and is skipped. Save the secret before that check, and never replace one already on file.
j0ntz
force-pushed
the
jon/monero-tx-key
branch
from
August 12, 2026 02:45
92ca08d to
81eaea0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Description
A transaction's secret lives in its metadata file and nowhere else:
setupNewTxMetadatawritestxFile.secret, andcombineTxWithFilereadstxSecretback fromfile.secretalone. That file is written once, the first time the core sees a transaction, so a secret an engine learns any later than that was simply dropped, and a transaction already on file could never gain one.Monero is where this bites. A Monero wallet only knows a transaction key once it has built the transaction, and it can report keys for transactions the core saved back when the engine reported none. The key is the sender's only proof of a payment, and it cannot be recovered from the seed, so dropping it is permanent.
saveTxSecretsaves such a secret onto the existing file:mergeTxdoes not carry the secret: a transaction that gained one still compares as unchanged and would be skipped. For the same reason it reports the transactions it saved itself, so a listener does not keep holding one with no secret.fileNameslists it butfilesdoes not. Transaction files only load when somebody asks for the transactions, so the old transactions this exists for normally have no file in memory.withTxFileserializes the load-modify-write cycles over a single transaction file, shared withupdateCurrencyWalletTxMetadata. Both writers rewrite the whole file from a snapshot, so interleaved they could each drop the other's change.Companion fix in the Monero engine: EdgeApp/edge-currency-accountbased#1086
Asana: https://app.asana.com/0/1215088146871429/1216965258637021