Skip to content

Conversation

fanquake
Copy link
Member

@fanquake fanquake commented Nov 14, 2023

The negative bound for script threads comes from the machine which
generates the man pages, so may only be correct for that machine. Any
other placeholder value will also be wrong for some machines. Fix this
be removing the value. This also fixes help2man incorrectly bolding the
value, as if it were a paramater.

Closes bitcoin#28850.

Github-Pull: bitcoin#28858
Rebased-From: d799ea2
@fanquake fanquake added this to the 26.0 milestone Nov 14, 2023
@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 14, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK hebasto, TheCharlatan

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@jonatack
Copy link
Member

jonatack commented Nov 14, 2023

there is currently nothing further marked for backport to 26.x

Would suggest backporting #28155 as mentioned in #28155 (comment).

Am rebasing and updating #28248 today, which fixes a number of bugs including the regression reported in https://github.com/bitcoin/bitcoin/pull/27213/files#r1291926369 and described in #28248 (comment). If that isn't fixed in v26.0, it may be a good idea to add a warning to the notable changes section of the release notes where the changed behavior is described, as the way nodes have until now been able to ensure connections to various networks, via addnode, is the behavior that is impacted.

@maflcko
Copy link
Member

maflcko commented Nov 14, 2023

Would suggest backporting

No strong opinion, but I think that backports at this stage should either fix a regression or be clear bugfixes. Other behavior changes are better left for the next release, because they could themselves change behavior in a buggy way, see also the previous comment #28248 (comment)

@jonatack
Copy link
Member

Yes, the first suggested one in #28155 (comment), i.e. 94e8882, is a bug fix.

Am updating #28248 to punt for later on two of the seven, in favor of the clearest ones and the regression.

@fanquake fanquake changed the title [26.x] rc3 or finalize [26.x] Final Changes Nov 16, 2023
@fanquake fanquake marked this pull request as ready for review November 16, 2023 14:36
@jonatack
Copy link
Member

jonatack commented Nov 16, 2023

I see the release notes have been added since my feedback above.

If the regression in v26.0 is left unfixed, it would be a good idea to add a warning to the "Notable Changes" section of the release notes where the changed behavior is described, as the way nodes have until now been able to ensure connections to various networks and particularly the ones with fewer peers, via addnode, is the behavior that is impacted. The regression was first reported in August in https://github.com/bitcoin/bitcoin/pull/27213/files#r1291926369.


Edit: I extracted #28895 from #28248 for the regression. Its first commit can be backported and it has 4 ACKs at this time of writing.

fanquake and others added 3 commits November 22, 2023 11:21
This changes the PoolAllocator to default the alignment to the given type. This makes the code simpler, and most importantly
fixes a bug on ARM 32bit that caused OOM: The class CTxOut has a member CAmount which is an int64_t and on ARM 32bit int64_t
are 8 byte aligned which is larger than the pointer alignment of 4 bytes. So for CCoinsMap to be able to use the pool, we
need to use the alignment of the member instead of just alignof(void*).

Github-Pull: bitcoin#28913
Rebased-From: ce881bf
If alignment of the PoolAllocator would be insufficient, then the test would fail. This also catches the issue with ARM 32bit,
where int64_t is aligned to 8 bytes but void* is aligned to 4 bytes. The test adds a check to ensure the pool has allocated
a minimum number of chunks

Github-Pull: bitcoin#28913
Rebased-From: d5b4c0b
@fanquake fanquake changed the title [26.x] Final Changes [26.x] Changes for rc3 Nov 22, 2023
@hebasto
Copy link
Member

hebasto commented Nov 22, 2023

Suggesting to backport #28905 as well to ensure CI pass.

to allocate our limited outbound slots correctly, and to ensure addnode
connections benefit from their intended protections.

Our addnode logic usually connects the addnode peers before the automatic
outbound logic does, but not always, as a connection race can occur.  If an
addnode peer disconnects us and if it was the only one from its network, there
can be a race between reconnecting to it with the addnode thread, and it being
picked as automatic network-specific outbound peer.  Or our internet connection
or router, or the addnode peer, could be temporarily offline, and then return
online during the automatic outbound thread.  Or we could add a new manual peer
using the addnode RPC at that time.

The race can be more apparent when our node doesn't know many peers, or with
networks like cjdns that currently have few bitcoin peers.

When an addnode peer is connected as an automatic outbound peer and is the only
connection we have to a network, it can be protected by our new outbound
eviction logic and persist in the "wrong role".

Examples on mainnet using logging added in the same pull request:

2023-08-12T14:51:05.681743Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic network-specific outbound-full-relay connection
to i2p peer selected for manual (addnode) connection: [geh...odq.b32.i2p]:0

2023-08-13T03:59:28.050853Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic block-relay-only connection to onion peer
selected for manual (addnode) connection: kpg...aid.onion:8333

2023-08-13T16:21:26.979052Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic network-specific outbound-full-relay connection
to cjdns peer selected for manual (addnode) connection: [fcc...8ce]:8333

2023-08-14T20:43:53.401271Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic network-specific outbound-full-relay connection
to cjdns peer selected for manual (addnode) connection: [fc7...59e]:8333

2023-08-15T00:10:01.894147Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic feeler connection to i2p peer selected for
manual (addnode) connection: geh...odq.b32.i2p:8333

Finally, there does not seem to be a reason to make block-relay or short-lived
feeler connections to addnode peers, as the addnode logic will ensure we connect
to them if they are up, within the addnode connection limit.

Fix these issues by checking if the address is an addnode peer in our automatic
outbound connection logic.

Github-Pull: bitcoin#28895
Rebased-From: cc62716
This change is required to work with the new windows-2022 image version
20231115 properly.

Github-Pull: bitcoin#28905
Rebased-From: 91d5bd8
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK 740a85c, I've verified backports locally, also reviewed changes related to the -par option and rc2 --> rc3 as well.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

re-ACK f868852.

hebasto and others added 4 commits November 22, 2023 17:22
The `vmull_p64` is a part of the Crypto extensions from the ACLE. They
are optional extensions, so they get enabled with a `+crypto` for
architecture flags.

Github-Pull: bitcoin#28919
Rebased-From: 228d6a2
Few further changes are expected, so reintegrate the release-notes.
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

re-ACK 2f86d30, only #28919 backported since my recent review.

Copy link
Contributor

@TheCharlatan TheCharlatan left a comment

Choose a reason for hiding this comment

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

ACK 2f86d30

@fanquake fanquake merged commit e4fef4a into bitcoin:26.x Nov 22, 2023
@fanquake fanquake deleted the rc3_or_finalize branch November 22, 2023 18:26
Frank-GER pushed a commit to syscoin/syscoin that referenced this pull request Nov 28, 2023
fanquake added a commit that referenced this pull request Dec 4, 2023
b1d350c doc: update release notes for 26.0 (fanquake)
b0546bc doc: update manual pages for 26.0 (fanquake)
9ce1766 build: bump version to v26.0 final (fanquake)

Pull request description:

  Final changes for 26.0. Assuming no further backports. rc3 was done in #28872.

ACKs for top commit:
  achow101:
    ACK b1d350c
  hebasto:
    ACK b1d350c, I have reviewed the code and it looks OK.

Tree-SHA512: 8b1bfa9e9d6c5ccf8305335eba503c02a76043b2752e2302da84cb574078889ddb761b9efd14ef97f68bbae154b00ac54f531e2e33eba6baf8d703aa98ef5175
Mita23456

This comment was marked as spam.

Mita23456

This comment was marked as spam.

@bitcoin bitcoin deleted a comment from Mita23456 Dec 15, 2023
@bitcoin bitcoin deleted a comment from Mita23456 Dec 15, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants