-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Make orphan processing interruptible #15644
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
ebf3331
to
358a4f8
Compare
This makes orphan processing work like handling getdata messages: After every actual transaction validation attempt, interrupt processing to deal with messages arriving from other peers.
358a4f8
to
866c805
Compare
ACK |
utACK |
ACK 866c805 |
utACK 866c805 |
Github-Pull: bitcoin#15644 Rebased-From: 9453018
Github-Pull: bitcoin#15644 Rebased-From: 6e051f3
This makes orphan processing work like handling getdata messages: After every actual transaction validation attempt, interrupt processing to deal with messages arriving from other peers. Github-Pull: bitcoin#15644 Rebased-From: 866c805
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor LGTM, some comments though.
866c805 Interrupt orphan processing after every transaction (Pieter Wuille) 6e051f3 [MOVEONLY] Move processing of orphan queue to ProcessOrphanTx (Pieter Wuille) 9453018 Simplify orphan processing in preparation for interruptibility (Pieter Wuille) Pull request description: As individual orphan transactions can be relatively expensive to handle, it's undesirable to process all of them (max 100) as soon as the parent becomes available, as it pegs the net processing the whole time. Change this by interrupting orphan handling after every transactions, and continue in the next processing slot of the peer that gave us the parent - similar to how getdata processing works now. Messages from other peers arriving in the mean time are processed normally, but other messages from the peer that gave us the parent have to wait until all orphan processing is done. ACKs for commit 866c80: sdaftuar: ACK 866c805 MarcoFalke: utACK 866c805 promag: utACK 866c805. Verified refactor in 9453018 and moved code in 6e051f3. Not so sure about change in 866c805 just because I'm not familiar with net processing. Tree-SHA512: d8e8a1ee5f2999446cdeb8fc9756ed9c24f3d5cd769a7774ec4c317fc8d463fdfceec88de97266f389b715a5dfcc2b0a3abaa573955ea451786cc43b870e8cde
Backported in #15691. |
Github-Pull: bitcoin#15644 Rebased-From: 9453018
Github-Pull: bitcoin#15644 Rebased-From: 6e051f3
This makes orphan processing work like handling getdata messages: After every actual transaction validation attempt, interrupt processing to deal with messages arriving from other peers. Github-Pull: bitcoin#15644 Rebased-From: 866c805
Github-Pull: bitcoin#15644 Rebased-From: 9453018
Github-Pull: bitcoin#15644 Rebased-From: 6e051f3
This makes orphan processing work like handling getdata messages: After every actual transaction validation attempt, interrupt processing to deal with messages arriving from other peers. Github-Pull: bitcoin#15644 Rebased-From: 866c805
…uptibility Summary: bitcoin/bitcoin@9453018 --- Partial backport of Core [[bitcoin/bitcoin#15644 | PR15644]] Test Plan: ninja check ./test/functional/test_runner.py --extended Reviewers: #bitcoin_abc, deadalnix, nakihito Reviewed By: #bitcoin_abc, deadalnix, nakihito Subscribers: nakihito, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D6216
…sOrphanTx Summary: bitcoin/bitcoin@6e051f3 --- Depends on D6216 Partial backport of Core [[bitcoin/bitcoin#15644 | PR15644]] Test Plan: ninja check Reviewers: #bitcoin_abc, nakihito, deadalnix Reviewed By: #bitcoin_abc, nakihito, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D6217
Summary: This makes orphan processing work like handling getdata messages: After every actual transaction validation attempt, interrupt processing to deal with messages arriving from other peers. --- Depends on D6217 Concludes backport of Core [[bitcoin/bitcoin#15644 | PR15644]] Test Plan: ninja check-all Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D6235
866c805 Interrupt orphan processing after every transaction (Pieter Wuille) 6e051f3 [MOVEONLY] Move processing of orphan queue to ProcessOrphanTx (Pieter Wuille) 9453018 Simplify orphan processing in preparation for interruptibility (Pieter Wuille) Pull request description: As individual orphan transactions can be relatively expensive to handle, it's undesirable to process all of them (max 100) as soon as the parent becomes available, as it pegs the net processing the whole time. Change this by interrupting orphan handling after every transactions, and continue in the next processing slot of the peer that gave us the parent - similar to how getdata processing works now. Messages from other peers arriving in the mean time are processed normally, but other messages from the peer that gave us the parent have to wait until all orphan processing is done. ACKs for commit 866c80: sdaftuar: ACK 866c805 MarcoFalke: utACK 866c805 promag: utACK 866c805. Verified refactor in 9453018 and moved code in 6e051f3. Not so sure about change in 866c805 just because I'm not familiar with net processing. Tree-SHA512: d8e8a1ee5f2999446cdeb8fc9756ed9c24f3d5cd769a7774ec4c317fc8d463fdfceec88de97266f389b715a5dfcc2b0a3abaa573955ea451786cc43b870e8cde
As individual orphan transactions can be relatively expensive to handle, it's undesirable to process all of them (max 100) as soon as the parent becomes available, as it pegs the net processing the whole time.
Change this by interrupting orphan handling after every transactions, and continue in the next processing slot of the peer that gave us the parent - similar to how getdata processing works now. Messages from other peers arriving in the mean time are processed normally, but other messages from the peer that gave us the parent have to wait until all orphan processing is done.