Skip to content

Conversation

@UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Mar 15, 2021

This backports bitcoin@5eae034

Previously, a default match-everything bloom filter was set for every peer,
i.e. even before receiving a 'filterload' message and after receiving a
'filterclear' message code branches checking for the existence of the filter
by testing the pointer "pfilter" were _always_ executed.

The original PR was merged into btc 0.21, so this "backports" logic, not code. Not backporting test changes because p2p_filter.py test simply does not exist in our code base yet, was introduced in btc 0.20.

This is required for #4016 (which is how I found the issue) but even otherwise it's an actual bugfix e.g. for node eviction logic https://github.com/dashpay/dash/blob/develop/src/net.cpp#L1119.

…een 'filterload'..'filterclear')

Previously, a default match-everything bloom filter was set for every peer,
i.e. even before receiving a 'filterload' message and after receiving a
'filterclear' message code branches checking for the existence of the filter
by testing the pointer "pfilter" were _always_ executed.
@UdjinM6 UdjinM6 added this to the 17 milestone Mar 15, 2021
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK

Copy link

@xdustinface xdustinface left a comment

Choose a reason for hiding this comment

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

Any reason why you didn't do more like in the backport PR? Like in 2d73cdf

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK

Copy link

@xdustinface xdustinface left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 merged commit bca9577 into dashpay:develop Mar 22, 2021
@UdjinM6 UdjinM6 deleted the bp18544 branch July 1, 2021 21:59
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Mar 17, 2022
…n (active between 'filterload'..'filterclear') (dashpay#4043)

* partial backport 18544: net: limit BIP37 filter lifespan (active between 'filterload'..'filterclear')

Previously, a default match-everything bloom filter was set for every peer,
i.e. even before receiving a 'filterload' message and after receiving a
'filterclear' message code branches checking for the existence of the filter
by testing the pointer "pfilter" were _always_ executed.

* net: Match the backport PR a bit more

Co-authored-by: xdustinface <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants