Commit graph

40337 commits

Author SHA1 Message Date
Sebastian Falbesoner
ab42206652
Reapply "test: p2p: check that connecting to ourself leads to disconnect"
This reverts commit 9ec2c53701 with
a tiny change included (identation of the wait_until call).

Github-Pull: #30394
Rebased-From: 16bd283b3a
2024-07-17 11:27:03 +01:00
Sebastian Falbesoner
064f214673
net: prevent sending messages in NetEventsInterface::InitializeNode
Now that the queueing of the VERSION messages has been moved out of
`InitializeNode`, there is no need to pass a mutable `CNode` reference any
more. With a const reference, trying to send messages in this method would
lead to a compile-time error, e.g.:

----------------------------------------------------------------------------------------------------------------------------------
...
net_processing.cpp: In member function ‘virtual void {anonymous}::PeerManagerImpl::InitializeNode(const CNode&, ServiceFlags)’:
net_processing.cpp:1683:21: error: binding reference of type ‘CNode&’ to ‘const CNode’ discards qualifiers
 1683 |     PushNodeVersion(node, *peer);
...
----------------------------------------------------------------------------------------------------------------------------------

Github-Pull: #30394
Rebased-From: 0dbcd4c148
2024-07-17 11:27:03 +01:00
Sebastian Falbesoner
0933cf53b4
net: fix race condition in self-connect detection
Initiating an outbound network connection currently involves the
following steps after the socket connection is established (see
 `CConnman::OpenNetworkConnection` method):
    1. set up node state
    2. queue VERSION message
    3. add new node to vector `m_nodes`

If we connect to ourself, it can happen that the sent VERSION message
(step 2) is received and processed locally *before* the node object
is added to the connection manager's `m_nodes` vector (step 3). In this
case, the self-connect remains undiscovered, as the detection doesn't
find the outbound peer in `m_nodes` yet (see `CConnman::CheckIncomingNonce`).

Fix this by swapping the order of 2. and 3., by taking the `PushNodeVersion`
call out of `InitializeNode` and doing that in the `SendMessages` method
instead, which is only called for `CNode` instances in `m_nodes`.

Thanks go to vasild, mzumsande, dergoegge and sipa for suggestions on
how to fix this.

Github-Pull: #30394
Rebased-From: 66673f1c13
2024-07-17 11:27:03 +01:00
Ava Chow
fa90989503
psbt: Check non witness utxo outpoint early
A common issue that our fuzzers keep finding is that outpoints don't
exist in the non witness utxos. Instead of trying to track this down and
checking in various individual places, do the check early during
deserialization.

Github-Pull: #29855
Rebased-From: 9e13ccc50e
2024-07-17 11:27:03 +01:00
merge-script
b6440f20f2
Merge bitcoin/bitcoin#30305: [27.x] More backports
b3093eb755 doc: Update rel notes for 27.x (fanquake)
6338f92260 upnp: add compatibility for miniupnpc 2.2.8 (Cory Fields)
f34e44616d ci: remove unused bcc variable from workflow (Max Edwards)
0d524b1484 ci: move Asan / LSan / USDT job to Github Actions (Max Edwards)
43c40dd808 ci: add IPV6 network to ci container (Max Edwards)

Pull request description:

  Backports:
  * https://github.com/bitcoin/bitcoin/pull/30193
  * https://github.com/bitcoin/bitcoin/pull/30283
  * https://github.com/bitcoin/bitcoin/pull/30299

ACKs for top commit:
  willcl-ark:
    ACK b3093eb755
  stickies-v:
    ACK b3093eb755

Tree-SHA512: 325149f2b388072276e10fae2ebb7d8f3f5138d75f237c0182a09c631334fc2af9c2fe500db31bf41e94d4f154771e3cd386f8eb0d09d7a1ad656f637b71e735
2024-06-24 13:36:07 +01:00
fanquake
b3093eb755
doc: Update rel notes for 27.x 2024-06-24 11:38:32 +01:00
Cory Fields
6338f92260
upnp: add compatibility for miniupnpc 2.2.8
See: c0a50ce33e

The return value of 2 now indicates:
"A valid connected IGD has been found but its IP address is reserved (non routable)"

We continue to ignore any return value other than 1.

Github-Pull: #30283
Rebased-From: 8acdf66540
2024-06-19 12:49:04 +01:00
Max Edwards
f34e44616d
ci: remove unused bcc variable from workflow
Github-Pull: #30299
Rebased-From: 518b06c4b8
2024-06-19 12:49:04 +01:00
Max Edwards
0d524b1484
ci: move Asan / LSan / USDT job to Github Actions
Moving it from Cirrus CI so it can be easier to maintain and used by forks

Github-Pull: #30193
Rebased-From: 9eea51d905
2024-06-19 12:48:57 +01:00
Max Edwards
43c40dd808
ci: add IPV6 network to ci container
Allows IPV6 functional tests to run inside the container

Github-Pull: #30193
Rebased-From: 4b527fa93b
2024-06-19 12:48:51 +01:00
merge-script
1088a98f5a
Merge bitcoin/bitcoin#30222: [27.1] Finalize
d756a384d2 doc: update manual pages for 27.1 (fanquake)
93bb18f1c8 build: bump version to v27.1 final (fanquake)
fcf1241971 doc: update release notes for v27.1 final (fanquake)
f2e05cd2a9 depends: Update Boost download link (Hennadii Stepanov)
ba35920542 build: Fix building `fuzz` binary on on SunOS / illumos (Hennadii Stepanov)

Pull request description:

  Backports:
  * https://github.com/bitcoin/bitcoin/pull/30216
  * https://github.com/bitcoin/bitcoin/pull/30217

  I don't think either of these changes warrants an `rc2` cycle.

ACKs for top commit:
  stickies-v:
    ACK d756a384d2
  willcl-ark:
    ACK d756a384d2

Tree-SHA512: b5662143283a49156403d865dee25f3b6c22741345a4c8ff10f16845ea7a1a6d9d1319a70a44d07f31263bf1a6d85701146e9cc697b82a5a58922c48504a552c
2024-06-11 14:18:57 +01:00
fanquake
d756a384d2
doc: update manual pages for 27.1 2024-06-10 13:03:33 +01:00
fanquake
93bb18f1c8
build: bump version to v27.1 final 2024-06-10 13:03:33 +01:00
fanquake
fcf1241971
doc: update release notes for v27.1 final 2024-06-10 13:03:30 +01:00
Hennadii Stepanov
f2e05cd2a9
depends: Update Boost download link
See: https://github.com/boostorg/boost-tasks/pull/3

Github-Pull: #30217
Rebased-From: ffbc173ca1
2024-06-04 11:17:16 +01:00
Hennadii Stepanov
ba35920542
build: Fix building fuzz binary on on SunOS / illumos
Github-Pull: #30216
Rebased-From: 3299abce94
2024-06-04 11:17:16 +01:00
merge-script
fccd32efe6
Merge bitcoin/bitcoin#30092: [27.x] Backports and rc1
22701a4346 doc: update manual pages for 27.1rc1 (fanquake)
9e919072bd build: bump version to 27.1rc1 (fanquake)
9b4640c4be doc: update release-notes.md for 27.1 (fanquake)
80032d6917 qt: 27.1rc1 translations update (Hennadii Stepanov)
423bd6dc68 windeploy: Renew certificate (Ava Chow)
77b2321ca0 depends: Fetch miniupnpc sources from an alternative website (Hennadii Stepanov)
31adcfa171 test: add GetAddedNodeInfo() CJDNS regression unit test (Jon Atack)
9cdb9edfb8 p2p, bugfix: detect addnode cjdns peers in GetAddedNodeInfo() (Jon Atack)
3c26058da2 crypto: disable asan for sha256_sse4 with clang and -O0 (Cory Fields)
0ba11cf908 rpc: move UniValue in blockToJSON (willcl-ark)
dedf319b08 gui: don't permit port in proxy IP option (willcl-ark)
d1289a1300 gui: fix create unsigned transaction fee bump (furszy)

Pull request description:

  Backports:
  * https://github.com/bitcoin-core/gui/pull/812
  * https://github.com/bitcoin-core/gui/pull/813
  * https://github.com/bitcoin/bitcoin/pull/30085
  * https://github.com/bitcoin/bitcoin/pull/30094
  * https://github.com/bitcoin/bitcoin/pull/30097
  * https://github.com/bitcoin/bitcoin/pull/30149
  * https://github.com/bitcoin/bitcoin/pull/30151

  Bump to 27.1rc1.

ACKs for top commit:
  stickies-v:
    re-ACK 22701a4346
  willcl-ark:
    reACK 22701a4346
  hebasto:
    re-ACK 22701a4346.

Tree-SHA512: 6eca44ba7e6664eb4677646597dfdaf56a241c8c3e95e0ab8929ee2fc3671303fc6c2634d359b4523dbd452ac5e54fd1f4c7c2bf7e9c5209395f8cb3b4753fb3
2024-05-29 09:16:55 +01:00
fanquake
22701a4346
doc: update manual pages for 27.1rc1 2024-05-28 12:28:11 +01:00
fanquake
9e919072bd
build: bump version to 27.1rc1 2024-05-28 12:28:11 +01:00
fanquake
9b4640c4be
doc: update release-notes.md for 27.1 2024-05-28 12:28:06 +01:00
Hennadii Stepanov
80032d6917
qt: 27.1rc1 translations update 2024-05-28 10:18:55 +01:00
Ava Chow
423bd6dc68
windeploy: Renew certificate
Github-Pull: #30149
Rebased-From: 9f4ff1e965
2024-05-23 13:28:44 +01:00
Hennadii Stepanov
77b2321ca0
depends: Fetch miniupnpc sources from an alternative website
The https://miniupnp.tuxfamily.org website is unavailable now.

Github-Pull: #30151
Rebased-From: 21b8a14d37
2024-05-23 09:44:19 +01:00
Jon Atack
31adcfa171
test: add GetAddedNodeInfo() CJDNS regression unit test
Github-Pull: #30085
Rebased-From: d0b047494c
2024-05-23 09:44:19 +01:00
Jon Atack
9cdb9edfb8
p2p, bugfix: detect addnode cjdns peers in GetAddedNodeInfo()
Addnode (manual) peers connected to us via the cjdns network are currently not
detected by CConnman::GetAddedNodeInfo(), i.e. fConnected is always false.

This causes the following issues:

- RPC `getaddednodeinfo` incorrectly shows them as not connected

- CConnman::ThreadOpenAddedConnections() continually retries to connect them

Github-Pull: #30085
Rebased-From: 684da97070
2024-05-22 09:49:00 +01:00
Cory Fields
3c26058da2
crypto: disable asan for sha256_sse4 with clang and -O0
Clang is unable to compile the Transform function for that combination of
options.

Github-Pull: #30097
Rebased-From: 141df0a288
2024-05-16 08:41:52 +08:00
willcl-ark
0ba11cf908
rpc: move UniValue in blockToJSON
Without explicitly declaring the move, these UniValues get copied,
causing increased memory usage. Fix this by explicitly moving the
UniValue objects.

Used by `rest_block` and `getblock` RPC.

Github-Pull: #30094
Rebased-From: b77bad309e
2024-05-14 08:14:33 +08:00
willcl-ark
dedf319b08
gui: don't permit port in proxy IP option
Fixes: #809

Previously it was possible through the GUI to enter an IP address:port
into the "Proxy IP" configuration box. After the node was restarted the
errant setting would prevent the node starting back up until manually
removed from settings.json.

Github-Pull: https://github.com/bitcoin-core/gui/pull/813
Rebased-From: 10c5275ba4
2024-05-13 11:58:00 +08:00
furszy
d1289a1300
gui: fix create unsigned transaction fee bump
Github-Pull: https://github.com/bitcoin-core/gui/pull/812
Rebased-From: 671b7a3251
2024-05-13 11:57:12 +08:00
merge-script
c7885ecd77
Merge bitcoin/bitcoin#29888: [27.x] Backports
bd5860bc7a [WIP] doc: release notes for 27.x (fanquake)
475aac41fb doc: add LLVM instruction for macOS < 13 (Sjors Provoost)
a995902d60 depends: Fix build of Qt for 32-bit platforms (laanwj)
0fcceefe22 Fix #29767, set m_synced = true after Commit() (nanlour)
ae9a2ed40a sign: don't assume we are parsing a sane Miniscript (Antoine Poinsot)
a6a59cfebc rpc: Reword SighashFromStr error message (MarcoFalke)
364bf01ff2 build: Fix false positive `CHECK_ATOMIC` test for clang-15 (Hennadii Stepanov)
9277793b4e test: Fix failing univalue float test (MarcoFalke)
5c097910e0 doc: archive 27.0 release notes (fanquake)
897e5af58a [rpc, bugfix] Enforce maximum value for setmocktime (dergoegge)
602cfd580a ci: Bump s390x to ubuntu:24.04 (MarcoFalke)
20e6e8dc80 Change Luke Dashjr seed to dashjr-list-of-p2p-nodes.us (Luke Dashjr)
a6862c50c5 depends: fix mingw-w64 Qt DEBUG=1 build (fanquake)

Pull request description:

  Backports:
  * https://github.com/bitcoin/bitcoin/pull/29691
  * https://github.com/bitcoin/bitcoin/pull/29747
  * https://github.com/bitcoin/bitcoin/pull/29776
  * https://github.com/bitcoin/bitcoin/pull/29853
  * https://github.com/bitcoin/bitcoin/pull/29856
  * https://github.com/bitcoin/bitcoin/pull/29859
  * https://github.com/bitcoin/bitcoin/pull/29869
  * https://github.com/bitcoin/bitcoin/pull/29870
  * https://github.com/bitcoin/bitcoin/pull/29886
  * https://github.com/bitcoin/bitcoin/pull/29892
  * https://github.com/bitcoin/bitcoin/pull/29934
  * https://github.com/bitcoin/bitcoin/pull/29985

ACKs for top commit:
  willcl-ark:
    reACK bd5860bc7a
  stickies-v:
    re-ACK bd5860bc7a
  TheCharlatan:
    ACK bd5860bc7a

Tree-SHA512: a1a40de70cf52b5fc01d9dcc772421751a18c6a48a726c4c05c0371c585a53a27902e17daed9e0d721ab7763c94bb32de05c146bd6bc73fd558edd08b31e8547
2024-05-13 11:53:26 +08:00
fanquake
bd5860bc7a
[WIP] doc: release notes for 27.x 2024-05-10 11:27:07 +08:00
Sjors Provoost
475aac41fb
doc: add LLVM instruction for macOS < 13
Github-Pull: #29934
Rebased-From: 22574046c9
2024-05-02 15:28:51 +08:00
laanwj
a995902d60
depends: Fix build of Qt for 32-bit platforms
The 32 to 64-bit time_t transition causes a build failure in the built-in
zlib about conflicting _TIME_BITS and _FILE_OFFSET_BITS.

Note that zlib doesn't use time_t at all, so it is a false alarm.

Take the following patch from upstream zlib:
a566e156b3.patch

Closes #29980.

Github-Pull: #29985
Rebased-From: 2e266f33b5
2024-04-30 14:20:55 +08:00
nanlour
0fcceefe22
Fix #29767, set m_synced = true after Commit()
Github-Pull: #29776
Rebased-From: bbe82c116e
2024-04-26 21:05:02 +08:00
Antoine Poinsot
ae9a2ed40a
sign: don't assume we are parsing a sane Miniscript
The script provided for signature might be externally provided, for
instance by way of 'finalizepsbt'. Therefore the script might be
ill-crafted, so don't assume pubkeys are always 32 bytes.

Thanks to Niklas for finding this.

Github-Pull: #29853
Rebased-From: 4d8d21320e
2024-04-24 21:16:47 +08:00
MarcoFalke
a6a59cfebc
rpc: Reword SighashFromStr error message
Github-Pull: #29870
Rebased-From: fa6ab0d020
2024-04-24 20:57:09 +08:00
Hennadii Stepanov
364bf01ff2
build: Fix false positive CHECK_ATOMIC test for clang-15
Github-Pull: #29859
Rebased-From: dd3e0fa125
2024-04-17 14:05:09 +01:00
MarcoFalke
9277793b4e
test: Fix failing univalue float test
Github-Pull: #29892
Rebased-From: fa4c69669e
2024-04-17 14:05:00 +01:00
fanquake
5c097910e0
doc: archive 27.0 release notes
Github-Pull: #29886
Rebased-From: c08754971d
2024-04-17 14:04:34 +01:00
dergoegge
897e5af58a
[rpc, bugfix] Enforce maximum value for setmocktime
Github-Pull: #29869
Rebased-From: c2e0489b71
2024-04-16 09:28:23 +01:00
MarcoFalke
602cfd580a
ci: Bump s390x to ubuntu:24.04
Re-enable feature_init

Github-Pull: #29856
Rebased-From: fadf7e90dc
2024-04-16 09:28:22 +01:00
Luke Dashjr
20e6e8dc80
Change Luke Dashjr seed to dashjr-list-of-p2p-nodes.us
To avoid issues with DNS blacklisting, I've setup a separate domain for my DNS seed.

Github-Pull: #29691
Rebased-From: 4f273ab436
2024-04-16 09:28:22 +01:00
fanquake
a6862c50c5
depends: fix mingw-w64 Qt DEBUG=1 build
The issue is that compilation is done with `x86_64-w64-mingw32-g++-posix`,
but then linking is done with `x86_64-w64-mingw32-g++`.

I'm guessing this has been broken since #24131
(01d1845a80), but have not checked.

Fixes #29734.
Unblocks #29527 (now DEBUG=1 builds can be tested).

Github-Pull: #29747
Rebased-From: b7e7e727ab
2024-04-16 09:12:39 +01:00
merge-script
d82283950f
Merge bitcoin/bitcoin#29780: [27.x] More backports and finalize
910e3e8728 doc: update manual pages for v27.0 (fanquake)
2d2a0a369e build: bump version to v27.0 final (fanquake)
9442ea82da doc: import release notes from devwiki (fanquake)
fe51aceeca Update the developer mailing list address. (Edil Medeiros)
bde54b7627 ci: Print tsan errors to stderr (MarcoFalke)
753c68dc0f ci: Pull in qtbase5-dev instead of seperate low-level libraries (laanwj)
c4da61b323 doc: Suggest installing dev packages for debian/ubuntu qt5 build (laanwj)

Pull request description:

  Currently backports:
  * https://github.com/bitcoin/bitcoin/pull/29740
  * https://github.com/bitcoin/bitcoin/pull/29764
  * https://github.com/bitcoin/bitcoin/pull/29782

  Pulls release notes:  https://github.com/bitcoin-core/bitcoin-devwiki/wiki/27.0-Release-Notes-Draft.
  Finalizes `v27.0`.

ACKs for top commit:
  achow101:
    ACK 910e3e8728
  stickies-v:
    ACK 910e3e8728 - no changes except addressing nits

Tree-SHA512: 5dd8c6adaab154699f8ad9a5bda26de54901d3d1d09034a5a6775a37f12b44274d2d5ce6e1a527a6c211b56a75fe154f3ccb37bcbc39882be8299a4f127bfe30
2024-04-15 17:28:32 +01:00
fanquake
910e3e8728
doc: update manual pages for v27.0 2024-04-15 09:49:20 +01:00
fanquake
2d2a0a369e
build: bump version to v27.0 final 2024-04-15 09:49:19 +01:00
fanquake
9442ea82da
doc: import release notes from devwiki
https://github.com/bitcoin-core/bitcoin-devwiki/wiki/27.0-Release-Notes-Draft.
2024-04-15 09:49:14 +01:00
Edil Medeiros
fe51aceeca
Update the developer mailing list address.
The developer mailing list was migrated to Google Groups in February 2024
as announced in https://groups.google.com/g/bitcoindev/c/aewBuV6k-LI.

The archives maintained by the Linux Foundation stopped updating in December
2024. Thus, we point to the new archive maintained by gnusha.org.

The codebase refers to old discussions linked to the Linux Foundation archives.
Since all links are still active to this date, we keep them as they are.

See #29782.

Github-Pull: #29782
Rebased-From: 0ead466a0c
2024-04-04 14:39:42 +01:00
MarcoFalke
bde54b7627
ci: Print tsan errors to stderr
Github-Pull: #29740
Rebased-From: fa22a438fa
2024-04-03 09:57:11 +01:00
laanwj
753c68dc0f
ci: Pull in qtbase5-dev instead of seperate low-level libraries
Fix CI build for t64 migration.

Github-Pull: #29764
Rebased-From: 6c2990416e
2024-04-01 16:03:26 +02:00