p2p: make orphan processing interruptible (backport of bitcoin#15644) - #1325
Open
NiftyRaven wants to merge 1 commit into
Open
NiftyRaven wants to merge 1 commit into
NiftyRaven wants to merge 1 commit into
Conversation
Backport of Bitcoin Core commit 866c805 (bitcoin/bitcoin#15644). Orphan reconsideration is stored per peer and one orphan is handled per message-handler turn, so other peers can be serviced in between. Co-authored-by: NiFTy_RaVeN <nerontus@gmail.com>
Author
|
Build and test run on this branch completed, all passing:
|
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.
Backport of Bitcoin Core #15644 ("Make orphan processing interruptible", commit
866c8058a706931f025335b3e794ed2f4d287918).Summary
orphan_work_setof orphan transactions to reconsider.ProcessOrphanTxhandles one orphan per call instead of working through all of them at once.ProcessMessagesresumes that work on the peer's next turn, so other peers are serviced in between.Tests
test/functional/p2p_orphan_processing.py(registered intest_runner.py): sends many orphans that each spend several outputs of a not-yet-seen parent, then the parent, and checks that every orphan is accepted and that another peer still gets ping/pong answered while that work is in progress.DoS_testsand the new functional test passing. A full build and test run on this branch is in progress, and results will be posted here.Thanks to vvoidwalker for raising this on Discord.