Skip to content
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

Backport fix for orphan handling #6928

Merged
merged 10 commits into from
Aug 22, 2024
Merged

Conversation

daira
Copy link
Contributor

@daira daira commented Aug 12, 2024

@daira daira added the I-SECURITY Problems and improvements related to security. label Aug 12, 2024
@daira daira added this to the Release 5.10.0 milestone Aug 12, 2024
@daira daira requested review from nuttycom and str4d August 12, 2024 22:27
@daira daira force-pushed the orphan-resolution branch from 93bb50a to 4e7ec7f Compare August 15, 2024 19:09
nuttycom
nuttycom previously approved these changes Aug 15, 2024
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 4e7ec7f

@daira daira marked this pull request as draft August 16, 2024 12:44
@daira daira force-pushed the orphan-resolution branch from 4e7ec7f to f6de253 Compare August 20, 2024 00:36
@daira daira marked this pull request as ready for review August 20, 2024 01:07
nuttycom
nuttycom previously approved these changes Aug 20, 2024
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK f6de253

nuttycom
nuttycom previously approved these changes Aug 21, 2024
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 34c6e76

sipa and others added 10 commits August 22, 2024 01:02
(cherry picked from commit bitcoin/bitcoin@1b0bcc5)

Zcash: Includes additional change to `IteratorComparator` cherry-picked
from commit bitcoin/bitcoin@fbf327b.
 always grow to its maximum size.

This does not go so far as to attempt to connect orphans made
 connectable by a new block.

Keeping the orphan map less full helps improve the reliability
 of relaying chains of transactions.

(cherry picked from commit bitcoin/bitcoin@db0ffe8)
This prevents higher order orphans and other junk from
 holding positions in the orphan map.  Parents delayed
 twenty minutes are more are unlikely to ever arrive.

The freed space will improve the orphan matching success rate for
 other transactions.

(cherry picked from commit bitcoin/bitcoin@11cc143)
…ted.

An orphan whos parents were rejected is never going to connect, so there
 is little utility in keeping it.

Orphans also helpfully tell us what we're missing, so go ahead and treat
 it as INVed.

(cherry picked from commit bitcoin/bitcoin@8c99d1b)

Zcash: Adapted to our INV changes.
Although this increases node memory usage in the worst case by perhaps
 30MB, the current behavior causes severe issues with dependent tx relay.

(cherry picked from commit bitcoin/bitcoin@54326a6)
(cherry picked from commit bitcoin/bitcoin@9453018)

Zcash: Adapted to our codebase.
(cherry picked from commit bitcoin/bitcoin@6e051f3)

Zcash: Adapted to us not having various upstream changes, including the
orphan lock changes in bitcoin/bitcoin#11824.
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.

(cherry picked from commit bitcoin/bitcoin@866c805)
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
@daira
Copy link
Contributor Author

daira commented Aug 22, 2024

Note that this passed required tests.

Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK c890bb5 with the caveat that we should figure out why this test has gone from regularly passing to regularly failing.

@nuttycom nuttycom merged commit 1f4e4d6 into zcash:master Aug 22, 2024
117 of 138 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-SECURITY Problems and improvements related to security.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants