Commit graph

29777 commits

Author SHA1 Message Date
Byron Hambly
61ff980881 Merge e25af11225 into merged_master (Bitcoin PR bitcoin/bitcoin#28431) 2025-07-21 10:18:41 +02:00
Byron Hambly
798875ed2d Merge 579c49b3a6 into merged_master (Bitcoin PR bitcoin/bitcoin#28428) 2025-07-21 10:11:15 +02:00
Byron Hambly
73da193b6d Merge 4e1a38c6df into merged_master (Bitcoin PR bitcoin/bitcoin#28196) 2025-07-21 10:00:47 +02:00
Byron Hambly
5d35499c0c Merge 238d29aff9 into merged_master (Bitcoin PR bitcoin/bitcoin#28361) 2025-07-21 09:41:01 +02:00
Byron Hambly
236ccf7924 Merge 8e0d9796da into merged_master (Bitcoin PR bitcoin/bitcoin#25284) 2025-07-18 15:00:47 +02:00
Byron Hambly
a35749fd61 Merge d98180a969 into merged_master (Bitcoin PR bitcoin/bitcoin#28419) 2025-07-18 14:49:55 +02:00
Byron Hambly
b456503d27 Merge d2ccca253f into merged_master (Bitcoin PR bitcoin/bitcoin#26567)
Modified to keep using dummy signing until we can update to the
descriptor method introduced in this PR from upstream
2025-07-18 14:38:53 +02:00
Byron Hambly
833114cc24 Merge b379bb2465 into merged_master (Elements PR #1459) 2025-07-18 11:45:30 +02:00
glozow
c577f5afb4 Merge bitcoin/bitcoin#30394: net: fix race condition in self-connect detection
ELEMENTS: cherry-picked before ElementsProject/elements#1472 for ease of
merge

16bd283b3a Reapply "test: p2p: check that connecting to ourself leads to disconnect" (Sebastian Falbesoner)
0dbcd4c148 net: prevent sending messages in `NetEventsInterface::InitializeNode` (Sebastian Falbesoner)
66673f1c13 net: fix race condition in self-connect detection (Sebastian Falbesoner)

Pull request description:

  This PR fixes a recently discovered race condition in the self-connect detection (see #30362 and #30368).

  Initiating an outbound network connection currently involves the following steps after the socket connection is established (see [`CConnman::OpenNetworkConnection`](bd5d1688b4/src/net.cpp (L2923-L2930)) method):
  1. set up node state
  2. queue VERSION message (both steps 1 and 2 happen in [`InitializeNode`](bd5d1688b4/src/net_processing.cpp (L1662-L1683)))
  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`.

  The temporarily reverted test introduced in #30362 is readded. Fixes #30368.

  Thanks go to vasild, mzumsande and dergoegge for suggestions on how to fix this (see https://github.com/bitcoin/bitcoin/issues/30368#issuecomment-2200625017 ff. and https://github.com/bitcoin/bitcoin/pull/30394#discussion_r1668290789).

ACKs for top commit:
  naiyoma:
    tested ACK [https://github.com/bitcoin/bitcoin/pull/30394/commits/16bd283b3ad05daa41259a062aee0fc05b463fa6](https://github.com/bitcoin/bitcoin/pull/30394/commits/16bd283b3ad05daa41259a062aee0fc05b463fa6),  built and tested locally,  test passes successfully.
  mzumsande:
    ACK 16bd283b3a
  tdb3:
    ACK 16bd283b3a
  glozow:
    ACK 16bd283b3a
  dergoegge:
    ACK 16bd283b3a

Tree-SHA512: 5b8aced6cda8deb38d4cd3fe4980b8af505d37ffa0925afaa734c5d81efe9d490dc48a42e1d0d45dd2961c0e1172a3d5b6582ae9a2d642f2592a17fbdc184445
(cherry picked from commit 35dddbccf1)
2025-07-18 11:20:21 +02:00
Byron Hambly
b379bb2465
Merge pull request #1459 from ElementsProject/simplicity
Update Simplicity integeration
2025-07-17 17:04:48 +02:00
Tom Trevethan
c4bc9fd5b4
Fix position of version argument in walletcreatefundedpsbt (#1474)
* fix position of version argument and add test

* add test for version number

---------

Co-authored-by: Tom Trevethan <ttrevethan@blockstream.com>
2025-07-11 12:27:43 +02:00
Byron Hambly
bd65b886f1 Merge 67cd78dbc2 into merged_master (Elements PR #1451) 2025-07-10 12:09:50 +02:00
Byron Hambly
ca65b633fc Merge 73760bae3e into merged_master (Elements PR #1471) 2025-07-10 11:46:09 +02:00
Byron Hambly
503283f07f Merge cb6ad6ae09 into merged_master (Elements PR #1463) 2025-07-10 11:40:37 +02:00
Byron Hambly
2ddc85a420 Merge 209032c107 into merged_master (Elements PR #1461) 2025-07-10 11:28:00 +02:00
Byron Hambly
e34355c770 Merge 10a8e36813 into merged_master (Elements PR #1428) 2025-07-10 11:20:33 +02:00
Byron Hambly
302c7c1d28 Merge 7ed597f4a5 into merged_master (Elements PR #1453) 2025-07-10 11:12:39 +02:00
Byron Hambly
5223853d00 Merge 38357edd42 into merged_master (Elements PR #1452) 2025-07-10 10:13:10 +02:00
Byron Hambly
2f6f7ce26d
Merge pull request #1472 from tomt1664/fix_race_condition
net: fix race condition in self-connect detection
2025-07-09 11:05:05 +02:00
glozow
8db506f406 Merge bitcoin/bitcoin#30394: net: fix race condition in self-connect detection
16bd283b3a Reapply "test: p2p: check that connecting to ourself leads to disconnect" (Sebastian Falbesoner)
0dbcd4c148 net: prevent sending messages in `NetEventsInterface::InitializeNode` (Sebastian Falbesoner)
66673f1c13 net: fix race condition in self-connect detection (Sebastian Falbesoner)

Pull request description:

  This PR fixes a recently discovered race condition in the self-connect detection (see #30362 and #30368).

  Initiating an outbound network connection currently involves the following steps after the socket connection is established (see [`CConnman::OpenNetworkConnection`](bd5d1688b4/src/net.cpp (L2923-L2930)) method):
  1. set up node state
  2. queue VERSION message (both steps 1 and 2 happen in [`InitializeNode`](bd5d1688b4/src/net_processing.cpp (L1662-L1683)))
  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`.

  The temporarily reverted test introduced in #30362 is readded. Fixes #30368.

  Thanks go to vasild, mzumsande and dergoegge for suggestions on how to fix this (see https://github.com/bitcoin/bitcoin/issues/30368#issuecomment-2200625017 ff. and https://github.com/bitcoin/bitcoin/pull/30394#discussion_r1668290789).

ACKs for top commit:
  naiyoma:
    tested ACK [https://github.com/bitcoin/bitcoin/pull/30394/commits/16bd283b3ad05daa41259a062aee0fc05b463fa6](https://github.com/bitcoin/bitcoin/pull/30394/commits/16bd283b3ad05daa41259a062aee0fc05b463fa6),  built and tested locally,  test passes successfully.
  mzumsande:
    ACK 16bd283b3a
  tdb3:
    ACK 16bd283b3a
  glozow:
    ACK 16bd283b3a
  dergoegge:
    ACK 16bd283b3a

Tree-SHA512: 5b8aced6cda8deb38d4cd3fe4980b8af505d37ffa0925afaa734c5d81efe9d490dc48a42e1d0d45dd2961c0e1172a3d5b6582ae9a2d642f2592a17fbdc184445
2025-07-08 13:53:58 +01:00
Byron Hambly
67cd78dbc2
Merge pull request #1451 from tomt1664/v25+_cherry_pick
Selected Bitcoin v25 and onwards patches
2025-07-08 14:17:15 +02:00
Tom Trevethan
288e2a94eb removed duplicate solving_data for funding tx rpcs 2025-07-07 15:55:11 +01:00
Byron Hambly
bef3aeb383 Merge ecab855838 into merged_master (Bitcoin PR bitcoin/bitcoin#28195) 2025-07-07 09:45:43 +02:00
Byron Hambly
fff862f0ad Merge 8c7e735456 into merged_master (Bitcoin PR bitcoin/bitcoin#28404) 2025-07-06 07:58:44 +02:00
Byron Hambly
6e7f491e72 Merge 337d6f35a2 into merged_master (Bitcoin PR bitcoin/bitcoin#28291) 2025-07-05 19:01:02 +02:00
Byron Hambly
7c374ab4b7 Merge 6f03c45f6b into merged_master (Bitcoin PR bitcoin/bitcoin#28383) 2025-07-05 18:52:51 +02:00
Byron Hambly
5d01fbe7c0 Merge df98a12fc2 into merged_master (Bitcoin PR bitcoin/bitcoin#28350) 2025-07-05 18:44:42 +02:00
Byron Hambly
2376883a9e Merge 5666966dff into merged_master (Bitcoin PR bitcoin/bitcoin#28364) 2025-07-05 18:25:36 +02:00
Byron Hambly
576d821fb7 Merge 9561e497e9 into merged_master (Bitcoin PR bitcoin-core/gui#749) 2025-07-05 17:15:55 +02:00
Byron Hambly
461e9aa5fb Merge 5175ae482e into merged_master (Bitcoin PR bitcoin/bitcoin#28354) 2025-07-05 16:06:42 +02:00
Byron Hambly
810f21f296 Merge 1c1a02bbd2 into merged_master (Bitcoin PR bitcoin/bitcoin#28341) 2025-07-05 15:44:27 +02:00
Byron Hambly
30dc7b1d1f Merge c9273f68f6 into merged_master (Bitcoin PR bitcoin/bitcoin#28287) 2025-07-05 15:42:12 +02:00
Byron Hambly
ff69178c92 Merge 5ce200dda2 into merged_master (Bitcoin PR bitcoin/bitcoin#27480) 2025-07-05 15:08:27 +02:00
Byron Hambly
fdac5f355c Merge 74d66359da into merged_master (Bitcoin PR bitcoin/bitcoin#27585) 2025-07-05 15:00:14 +02:00
Byron Hambly
5095c672a5 Merge 1fa6411dde into merged_master (Bitcoin PR bitcoin/bitcoin#28165) 2025-07-05 11:14:50 +02:00
Byron Hambly
d913024a59 Merge 083316c4fe into merged_master (Bitcoin PR bitcoin/bitcoin#28230) 2025-07-05 11:14:43 +02:00
Byron Hambly
7b2a808fd4 Merge 23f3f402fc into merged_master (Bitcoin PR bitcoin/bitcoin#27829) 2025-07-05 10:51:52 +02:00
Byron Hambly
9fdfba723b Merge 8ff90d9dcf into merged_master (Bitcoin PR bitcoin/bitcoin#26291) 2025-07-05 09:42:46 +02:00
Byron Hambly
7f52ed9784 Merge 03a536f1ed into merged_master (Bitcoin PR bitcoin/bitcoin#28284) 2025-07-05 08:37:18 +02:00
Byron Hambly
ca14c27f1b Merge 00fc7cdc25 into merged_master (Bitcoin PR bitcoin/bitcoin#28200) 2025-07-05 07:45:03 +02:00
Byron Hambly
028e5aa9c7 Merge a84dade1f9 into merged_master (Bitcoin PR bitcoin/bitcoin#28157) 2025-07-05 07:41:31 +02:00
Byron Hambly
f95cdcb6d6 Merge 723f1c669f into merged_master (Bitcoin PR bitcoin/bitcoin#28218) 2025-07-04 21:40:54 +02:00
Byron Hambly
6a868386b5 Merge 7bf078f2b7 into merged_master (Bitcoin PR bitcoin/bitcoin#28237) 2025-07-04 21:24:50 +02:00
Byron Hambly
1749ab8d9e Merge 5eb669024f into merged_master (Bitcoin PR bitcoin/bitcoin#28100) 2025-07-04 18:32:46 +02:00
Byron Hambly
7a5c3b2cf3 Merge e4a855c4e0 into merged_master (Bitcoin PR bitcoin/bitcoin#28289) 2025-07-04 18:26:34 +02:00
Byron Hambly
2e41574d5a Merge ecb20563b6 into merged_master (Bitcoin PR bitcoin/bitcoin#28123) 2025-07-04 18:23:38 +02:00
Byron Hambly
d5148c1880 Merge 0a55bcd299 into merged_master (Bitcoin PR bitcoin/bitcoin#27981) 2025-07-04 17:32:08 +02:00
Byron Hambly
6c55760a2d Merge 7ef2d4ee4d into merged_master (Bitcoin PR bitcoin/bitcoin#28244) 2025-07-04 17:24:18 +02:00
Byron Hambly
27a302a296 Merge a62f5ee86c into merged_master (Bitcoin PR bitcoin/bitcoin#27675) 2025-07-04 09:56:00 +02:00
Byron Hambly
c3b515614f Merge b8ee2fa02e into merged_master (Bitcoin PR bitcoin/bitcoin#28240) 2025-07-04 09:36:30 +02:00