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: Merge bitcoin#22496, 21985 #6024

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

vijaydasmp
Copy link

bitcoin backports

@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#22496: backport: Merge bitcoin#22496, 21985 May 18, 2024
@vijaydasmp vijaydasmp marked this pull request as ready for review May 18, 2024 17:23
src/netaddress.cpp Show resolved Hide resolved
Copy link

This pull request has conflicts, please rebase.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

NOTE: 22496 is also a part of 6040

@vijaydasmp vijaydasmp requested a review from knst June 3, 2024 02:35
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 ae4c7de

fanquake and others added 2 commits June 3, 2024 12:09
65332b1 [addrman] Remove RemoveInvalid() (John Newbery)

Pull request description:

  PRs bitcoin#22179 and bitcoin#22112 (EDIT: later reverted in bitcoin#22497) added hotfix code to addrman to remove invalid addresses and mutate the ports of I2P entries after entering into addrman. Those hotfixes included at least two addrman data corruption bugs:

  - bitcoin#22467 (Assertion `nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size()' failed)
  - bitcoin#22470 (Changing I2P ports in addrman may wronly skip some entries from "new" buckets)

  Hotfixing addrman is inherently dangerous. There are many members that have implicit assumptions on each others' state, and mutating those directly can lead to violating addrman's internal invariants.

  Instead of trying to hotfix addrman, just don't insert any invalid addresses. For now, those are addresses which fail `CNetAddr::IsValid()`.

ACKs for top commit:
  sipa:
    utACK 65332b1. I tried to reason through scenarios that could introduce inconsistencies with this code, but can't find any.
  fanquake:
    ACK 65332b1 - Skipping the addition of invalid addresses (this code was initially added for Tor addrs) rather than adding all the invalids then removing them all when finishing unserializing seems like an improvement. Especially if it can be achieved with less code.

Tree-SHA512: 023113764cb475572f15da7bf9824b62b79e10a7e359af2eee59017df354348d2aeed88de0fd4ad7a9f89a0dad10827f99d70af6f1cb20abb0eca2714689c8d7
…IP()`

6c280ad net: Return IPv6 scope id in `CNetAddr::ToStringIP()` (W. J. van der Laan)

Pull request description:

  If a scope id is provided, return it back in the string representation. Also bring back the test (now in platform independent fashion). Closes bitcoin#21982. Includes bitcoin#21961 (apart from the MacOS remark).

ACKs for top commit:
  practicalswift:
    cr ACK 6c280ad

Tree-SHA512: 77792c35679b6c3545fd3a8d3d74c4f515ac2ee9f02d983251aeaaac715d55c122bbb0141abbeac272011f15520b439bd2db4ec8541a58df9b366921d212ca5f
@PastaPastaPasta PastaPastaPasta merged commit 3612b8a into dashpay:develop Jun 3, 2024
5 checks passed
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.

None yet

6 participants