Commit graph

165 commits

Author SHA1 Message Date
Tom Trevethan
041eaa0342 Merge 335798c496 into merged_master (Bitcoin PR bitcoin/bitcoin#31397) 2026-04-10 00:57:49 +01:00
ivanlele
f5e0886059
Merge 604bf2ea37 into merged_master (Bitcoin PR bitcoin/bitcoin#28121) 2026-04-09 13:22:06 +00:00
ivanlele
b6c4218280
Merge c9a7418a8d into merged_master (Bitcoin PR bitcoin/bitcoin#31096) 2026-04-08 11:05:56 +00:00
ivanlele
83750eb16f
Merge 0903ce8dbc into merged_master (Bitcoin PR bitcoin/bitcoin#30592) 2026-04-02 15:05:13 +00:00
ivanlele
76b45e4393
Merge 27d12cf17f into merged_master (Bitcoin PR bitcoin/bitcoin#31043) 2026-04-02 09:28:28 +00:00
ivanlele
bdc30de302
Merge 5ea335a97f into merged_master (Bitcoin PR bitcoin/bitcoin#30793) 2026-03-27 14:08:02 +00:00
ivanlele
5489305052
Merge 870447fd58 into merged_master (Bitcoin PR bitcoin/bitcoin#30212) 2026-03-11 14:14:02 +00:00
ivanlele
56873dd96c
Merge d2c8d161b4 into merged_master (Bitcoin PR bitcoin/bitcoin#30344) 2026-03-03 13:40:54 +00:00
ikripaka
006073614d
Merge 011a895a82 into merged_master (Bitcoin PR bitcoin/bitcoin#29015) 2026-02-27 22:51:31 +00:00
ivanlele
d4f37a57c0
Merge 09fe1435d9 into merged_master (Bitcoin PR bitcoin/bitcoin#29997) 2026-02-24 16:52:23 +00:00
Tom Trevethan
b64d8b87c8 Merge 6300438a2e into merged_master (Bitcoin PR bitcoin/bitcoin#30115) 2026-02-23 23:41:30 +00:00
ivanlele
51e3c1c05c
Merge f5fc3190fb into merged_master (Bitcoin PR bitcoin/bitcoin#29086) 2026-02-20 13:59:29 +00:00
ivanlele
c9e3e8f7fd
Merge 43003255c0 into merged_master (Bitcoin PR bitcoin/bitcoin#29292) 2026-02-20 09:47:20 +00:00
ivanlele
d7c379e545
Merge 99d7538cdb into merged_master (Bitcoin PR bitcoin/bitcoin#30012) 2026-02-19 14:26:08 +00:00
Tom Trevethan
1834ebd66c Merge 19b968f743 into merged_master (Bitcoin PR bitcoin/bitcoin#29722) 2026-02-16 23:04:14 +00:00
ivanlele
f4c50a5539
Merge 0f89e86516 into merged_master (Bitcoin PR bitcoin/bitcoin#29667) 2026-02-16 15:09:17 +00:00
ivanlele
1e1ba55cfb
Merge 5d045c31a5 into merged_master (Bitcoin PR bitcoin/bitcoin#28950) 2026-02-16 12:56:07 +00:00
Byron Hambly
a8fa0d7b5e
Merge c265aad5b5 into merged_master (Bitcoin PR bitcoin/bitcoin#29434) 2025-12-04 09:03:33 +02:00
Byron Hambly
474dd0f6f9 Merge 7143d43884 into merged_master (Bitcoin PR bitcoin/bitcoin#28948) 2025-12-03 19:08:52 +00:00
Byron Hambly
dc732e22fa
Merge 651fb034d8 into merged_master (Bitcoin PR bitcoin/bitcoin#29260) 2025-11-18 13:39:34 +02:00
Byron Hambly
18bd83f1e1
Merge 1b2dedbf5c into merged_master (Bitcoin PR bitcoin/bitcoin#29040) 2025-11-17 17:28:17 +02:00
Byron Hambly
87ebe0f079
Merge 6b3927f79a into merged_master (Bitcoin PR bitcoin/bitcoin#28848) 2025-11-11 14:08:55 +02:00
Byron Hambly
26b9abc2f2
Merge b5a271334c into merged_master (Bitcoin PR bitcoin/bitcoin#28922) 2025-11-11 08:56:23 +02:00
Byron Hambly
d55f2b27cb
Merge dd5f5713bc into merged_master (Bitcoin PR bitcoin/bitcoin#28391) 2025-11-06 11:13:40 +02:00
Byron Hambly
d0c39be53c
Merge e77339632e into merged_master (Bitcoin PR bitcoin/bitcoin#28136) 2025-11-06 09:36:00 +02:00
Byron Hambly
844aef93dd
Merge 6391644b66 into merged_master (Bitcoin PR bitcoin/bitcoin#28737) 2025-11-05 17:40:44 +02:00
Byron Hambly
f5d048649c
test: fix wallet_fundrawtransaction.py
left some FIXMEs for when sendall is upgraded to support blinded
addresses
2025-10-28 10:52:40 +02:00
Byron Hambly
6a28ada7c0
Merge 54bdb6e074 into merged_master (Bitcoin PR bitcoin/bitcoin#27609) 2025-08-06 15:48:27 +02:00
Byron Hambly
55a7304319
Merge f29091410d into merged_master (Bitcoin PR bitcoin/bitcoin#28379) 2025-08-04 10:43:30 +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
7a5c3b2cf3 Merge e4a855c4e0 into merged_master (Bitcoin PR bitcoin/bitcoin#28289) 2025-07-04 18:26:34 +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
4cc9a6cc6b Merge cd43a8444b into merged_master (Bitcoin PR bitcoin/bitcoin#27460) 2025-07-04 09:05:08 +02:00
Byron Hambly
fed3cadc7b Merge e410fb711c into merged_master (Bitcoin PR bitcoin/bitcoin#27822) 2025-06-27 21:53:11 +02:00
Byron Hambly
a40347d7f5 Merge e0a70c5b4f into merged_master (Bitcoin PR bitcoin/bitcoin#27605) 2025-06-20 09:50:22 +02:00
Byron Hambly
e23e51f9ef Merge 369d4c03b7 into merged_master (Bitcoin PR bitcoin/bitcoin#27254) 2025-04-12 12:19:09 +02:00
Tom Trevethan
c222787622 Merge b7702bd546 into merged_master (Bitcoin PR bitcoin/bitcoin#25943) 2025-04-08 20:00:25 +00:00
Tom Trevethan
0775b2afba Merge 0f670e0eae into merged_master (Bitcoin PR bitcoin/bitcoin#27127) 2025-04-07 12:04:59 +00:00
Byron Hambly
27a72d99f5 Merge 7799f53542 into merged_master (Bitcoin PR bitcoin/bitcoin#26039) 2025-04-02 23:02:13 +02:00
Byron Hambly
7daea6099f Merge 26002570ab into merged_master (Bitcoin PR bitcoin/bitcoin#26646) 2025-04-01 21:20:32 +02:00
Byron Hambly
80b3fcae86 Merge 80fc1af096 into merged_master (Bitcoin PR bitcoin/bitcoin#26289) 2025-04-01 09:10:14 +02:00
Tom Trevethan
387af571cd Merge 1ff79292e3 into merged_master (Bitcoin PR bitcoin/bitcoin#26609) 2025-03-24 23:33:59 +00:00
Byron Hambly
da8b6f2f7f
Merge d0b1f613c2 into merged_master (Bitcoin PR bitcoin/bitcoin#17786) 2025-03-03 11:12:31 +02:00
Byron Hambly
ca0a68b350
Merge UP TO 551c8e9526 into merged_master (UP TO bitcoin/bitcoin#26349)
Includes FIXMEs for a few functional tests
2025-02-05 09:50:17 +02:00
merge-script
335798c496
Merge bitcoin/bitcoin#31397: p2p: track and use all potential peers for orphan resolution
86d7135e36 [p2p] only attempt 1p1c when both txns provided by the same peer (glozow)
f7658d9b14 [cleanup] remove p2p_inv from AddTxAnnouncement (glozow)
063c1324c1 [functional test] getorphantxs reflects multiple announcers (glozow)
0da693f7e1 [functional test] orphan handling with multiple announcers (glozow)
b6ea4a9afe [p2p] try multiple peers for orphan resolution (glozow)
1d2e1d709c [refactor] move creation of unique_parents to helper function (glozow)
c6893b0f0b [txdownload] remove unique_parents that we already have (glozow)
163aaf285a [fuzz] orphanage multiple announcer functions (glozow)
22b023b09d [unit test] multiple orphan announcers (glozow)
96c1a822a2 [unit test] TxOrphanage EraseForBlock (glozow)
04448ce32a [txorphanage] add GetTx so that orphan vin can be read (glozow)
e810842acd [txorphanage] support multiple announcers (glozow)
62a9ff1870 [refactor] change type of unique_parents to Txid (glozow)
6951ddcefd [txrequest] GetCandidatePeers (glozow)

Pull request description:

  Part of #27463.

  (Transaction) **orphan resolution** is a process that kicks off when we are missing UTXOs to validate an unconfirmed transaction. We currently request missing parents by txid; BIP 331 also defines a way to [explicitly request ancestors](https://github.com/bitcoin/bips/blob/master/bip-0331.mediawiki#handle-orphans-better).

  Currently, when we find that a transaction is an orphan, we only try to resolve it with the peer who provided the `tx`. If this doesn't work out (e.g. they send a `notfound` or don't respond), we do not try again. We actually can't, because we've already forgotten who else could resolve this orphan (i.e. all the other peers who announced the transaction).

  What is wrong with this? It makes transaction download less reliable, particularly for 1p1c packages which must go through orphan resolution in order to be downloaded.

  Can we fix this with BIP 331 / is this "duct tape" before the real solution?
  BIP 331 (receiver-initiated ancestor package relay) is also based on the idea that there is an orphan that needs resolution, but it's just a new way of communicating information. It's not inherently more honest; you can request ancestor package information and get a `notfound`. So ancestor package relay still requires some kind of procedure for retrying when an orphan resolution attempt fails. See the #27742 implementation which builds on this orphan resolution tracker to keep track of what packages to download (it just isn't rebased on this exact branch). The difference when using BIP 331 is that we request `ancpkginfo` and then `pkgtxns` instead of the parent txids.

  Zooming out, we'd like orphan handling to be:
  - Bandwidth-efficient: don't have too many requests out at once. As already implemented today, transaction requests for orphan parents and regular download both go through the `TxRequestTracker` so that we don't have duplicate requests out.
  - Not vulnerable to censorship: don't give up too easily, use all candidate peers. See e.g. https://bitcoincore.org/en/2024/07/03/disclose_already_asked_for/
  - Load-balance between peers: don't overload peers; use all peers available. This is also useful for when we introduce per-peer orphan protection, since each peer will have limited slots.

  The approach taken in this PR is to think of each peer who announces an orphan as a potential "orphan resolution candidate." These candidates include:
  - the peer who sent us the orphan tx
  - any peers who announced the orphan prior to us downloading it
  - any peers who subsequently announce the orphan after we have started trying to resolve it
  For each orphan resolution candidate, we treat them as having "announced" all of the missing parents to us at the time of receipt of this orphan transaction (or at the time they announced the tx if they do so after we've already started tracking it as an orphan). We add the missing parents as entries to `m_txrequest`, incorporating the logic of typical txrequest processing, which means we prefer outbounds, try not to have duplicate requests in flight, don't overload peers, etc.

ACKs for top commit:
  marcofleon:
    Code review ACK 86d7135e36
  instagibbs:
    reACK 86d7135e36
  dergoegge:
    Code review ACK 86d7135e36
  mzumsande:
    ACK 86d7135e36

Tree-SHA512: 618d523b86e60c3ea039e88326d50db4e55e8e18309c6a20e8f2b10ed9e076f1de0315c335fd3b8abdabcc8b53cbceb66fb59147d05470ea25b83a2b4bd9c877
2025-01-16 13:42:26 +00:00
glozow
e810842acd [txorphanage] support multiple announcers
Add ability to add and track multiple announcers per orphan transaction,
erasing announcers but not the entire orphan.

The tx creation code in orphanage_tests needs to be updated so that each
tx is unique, because the CountOrphans() check assumes that calling
EraseForPeer necessarily means its orphans are deleted.

Unused for now.
2025-01-06 09:02:05 -05:00
Matthew Zipkin
221c789e91
rpc: include verbose reject-details field in testmempoolaccept response 2024-12-04 14:37:37 -05:00
Ava Chow
c9a7418a8d
Merge bitcoin/bitcoin#31096: Package validation: accept packages of size 1
32fc59796f rpc: Allow single transaction through submitpackage (glozow)

Pull request description:

  There's no particular reason to restrict single transaction submissions with submitpackage. This change relaxes the RPC checks as enables the `AcceptPackage` flow to accept packages of a single transaction.

  Resolves #31085

ACKs for top commit:
  naumenkogs:
    ACK 32fc59796f
  achow101:
    ACK 32fc59796f
  glozow:
    ACK 32fc59796f

Tree-SHA512: ffed353bfdca610ffcfd53b40b76da05ffc26df6bac4b0421492e067bede930380e03399d2e2d1d17f0e88fb91cd8eb376e3aabebbabcc724590bf068d09807c
2024-12-03 17:46:23 -05:00
Byron Hambly
8499b13762
lint: fix lint issues 2024-12-03 14:02:33 +02:00
Byron Hambly
b80b3aeff4 Merge 3a7e0a210c into merged_master (Bitcoin PR bitcoin/bitcoin#24513) 2024-11-26 14:42:49 +02:00