cryptonote_core: multi-threaded incoming pool tx handling [FCMP++ beta] - #440
Draft
jeffro256 wants to merge 3 commits into
Draft
Conversation
Addresses several issues with miner block template:
1. Fixes key image conflict issue due to lazy transaction prefix
- This line checks whether the next tx candiates has conflicting key images with the rest of the block template:
https://github.com/monero-project/monero/blob/0f84863feda75574788e15c9691abecf57bc3f8f/src/cryptonote_core/tx_pool.cpp#L1744
- The function takes in a transaction prefix and parses the key images from it
- However, the transaction may or may not actually ever be deserialized, depending on the state of `m_input_cache`:
https://github.com/monero-project/monero/blob/0f84863feda75574788e15c9691abecf57bc3f8f/src/cryptonote_core/tx_pool.cpp#L1455-L1466
2. Deduplicates code between `tx_memory_pool::fill_block_template()` and `tx_memory_pool::get_block_template_backlog()`,
and thus converging the backlog lists between the 2 functions
3. Saves time creating block templates by skipping transaction blob readings and deserializations for some txs
4. Stops template candidate search after block is reasonably full and we are iterating through txs which lower coinbase reward
or exceed size limit by a "smallish" amount. Prevents us from unnecessarily reading thousands of useless tx metadatas under load.
May help seraphis-migration#293
5. Fixes block templates when coinbase transactions are > 600 bytes
6. Fills closer to block weight limit for small coinbase transactions
7. Fixes "Invalidating block template cache" spam while popping blocks / during reorgs
8. More accurate "expected block reward" field in RPC
Re-support overpicking in RPC
Stores a 1 byte field in the mempool meta, `nic_verified_hf_version` which specifies for which HF version this tx has passed `ver_non_input_consensus()`. This is checked while handling both alt chains and main chains, and thus allows us to skip the expensive full mempool revalidation on fork change. Resolves monero-project#10142
This was referenced Aug 3, 2026
Collaborator
|
Depends on #450 to remove the lock in |
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.
FCMP++-reworked version of monero-project#10924