-
Notifications
You must be signed in to change notification settings - Fork 98
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
add(mempool): Verify orphaned mempool transactions #8857
Open
arya2
wants to merge
53
commits into
main
Choose a base branch
from
verify-orphaned-mempool-txs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
… mempool setup argument, adds and uses an `init_test()` fn for passing a closed channel receiver in tests where no mempool service is needed in the transaction verifier.
…nd a `new_for_tests()` constructor for convenience)
…t receiver, updates tests.
…ol service handle.
…dSet` `transactions()` return type.
…om the mempool's verified set
…m the tx verifier response
…nsparent outputs has been verified. adds a TODO for adding a `pending_outputs` field to the mempool Storage
…ng outputs requests when inserting new transactions into the mempool's verified set
github-actions
bot
added
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
labels
Sep 9, 2024
… the caller handle it (required to avoid moving zip317 tx selection code to mempool)
…nless their dependencies have already been added.
…m the mempool from the poll_ready() method
… and zip317 mod's dependencies_depth() method
…ransaction verifier
… shorter timeout for mempool output lookups, adds a `poll_count` to MockService, and updates `mempool_request_with_unmined_output_spends_is_accepted` to check that the transaction verifier polls the mempool after verifying a mempool transaction with transparent outputs
…ependent transactions
…an `unmined_transactions_in_blocks()` method on network
…ol Storage test module and replaces calls to it with calls to the new test method on Network
arya2
added
A-consensus
Area: Consensus rule updates
A-concurrency
Area: Async code, needs extra work to make it work properly.
labels
Sep 27, 2024
arya2
commented
Sep 27, 2024
arya2
commented
Oct 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-concurrency
Area: Async code, needs extra work to make it work properly.
A-consensus
Area: Consensus rule updates
A-mempool
Area: Memory pool transactions
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
P-Medium ⚡
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.
Motivation
We want to verify transactions in the mempool that spend the transparent outputs of other transactions in the mempool.
Closes #8777.
Solution
AwaitOutput
request in the mempool servicespent_utxos()
method in the transaction verifier to try querying the mempool for spent outpoints before returning aTransparentInputNotFound
error.getblocktemplate
method and ZIP-317 transaction selection to include transactions that spent the outputs of other transactions in the mempool when all of their dependencies have been selectedTests
Added tests to check that:
Storage.remove()
method works as expected (the rest ofevict_one()
should be covered already)AwaitOutput
requests when the output for the queried outpoint is:AwaitOutput
requests as expected and processesUnspentOutput
responses correctlyspent_mempool_outpoints
in its responseIf needed, this PR could also add tests for:
getblocktemplate
method returns transactions with dependencies in the right order when the transaction hashes would have them sorted in the wrong orderFollow Up Work
The mempool's
Downloads
sends a result to the response channel too early, it should wait until the transaction is being inserted into the mempool's verified set.PR Author's Checklist
PR Reviewer's Checklist