cryptonote_core: tx verif util to collect transp amt commitments - #11088
Open
j-berman wants to merge 1 commit into
Open
cryptonote_core: tx verif util to collect transp amt commitments#11088j-berman wants to merge 1 commit into
j-berman wants to merge 1 commit into
Conversation
With FCMP++, we'll need the transparent amount commitments for all txs in a block in 3 distinct places: 1) Adding v2 coinbase outputs to the db. 2) Adding any transparent amount outputs to the curve tree. 3) Validating amount commitments for torsion (may not be strictly necessary for this). Since we do those actions at separate call sites, rather than re-calculate transparent amount commitments at every call site, we collect them one time and avoid repeating the calculation.
j-berman
commented
Aug 11, 2026
j-berman
left a comment
Collaborator
Author
There was a problem hiding this comment.
Included links showing the benefit of the std::reference_wrapper (to avoid copies), and the purpose of the distinct params across the function definitions
Comment on lines
+340
to
+343
| std::vector<std::reference_wrapper<const transaction>> collect_transparent_amount_commitments( | ||
| const transaction &miner_tx, | ||
| const std::vector<std::pair<transaction, blobdata>> &tx_pairs, | ||
| std::unordered_map<uint64_t, rct::key> &transparent_amount_commitments_inout) |
Collaborator
Author
There was a problem hiding this comment.
Comment on lines
+354
to
+357
| std::vector<std::reference_wrapper<const transaction>> collect_transparent_amount_commitments( | ||
| const transaction &miner_tx, | ||
| const std::vector<transaction> &txs, | ||
| std::unordered_map<uint64_t, rct::key> &transparent_amount_commitments_inout) |
Collaborator
Author
There was a problem hiding this comment.
Comment on lines
+368
to
+370
| std::vector<std::reference_wrapper<const transaction>> collect_transparent_amount_commitments( | ||
| const std::unordered_map<crypto::hash, std::pair<transaction, blobdata>> &txs_by_txid, | ||
| std::unordered_map<uint64_t, rct::key> &transparent_amount_commitments_inout) |
Collaborator
Author
There was a problem hiding this comment.
UkoeHB
approved these changes
Aug 12, 2026
Collaborator
Author
|
I removed the I think we'll want that change applied in this PR as well. |
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.
With FCMP++, we'll need the transparent amount commitments for all txs in a block in 3 distinct places:
Since we do those actions at separate call sites, rather than re-calculate transparent amount commitments at every call site, we collect them one time and avoid repeating the calculation.