Commit graph

185 commits

Author SHA1 Message Date
Byron Hambly
80b3fcae86 Merge 80fc1af096 into merged_master (Bitcoin PR bitcoin/bitcoin#26289) 2025-04-01 09:10:14 +02:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Tom Trevethan
3f43afa4b9 Merge 7d51560003 into merged_master (Bitcoin PR bitcoin/bitcoin#26298) 2025-03-25 12:09:21 +00: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
Byron Hambly
8499b13762
lint: fix lint issues 2024-12-03 14:02:33 +02:00
Byron Hambly
54b236050d Merge e9035f867a into merged_master (Bitcoin PR bitcoin/bitcoin#25717)
The new minchainwork test was modified to use bitcoin regtest instead of
elements, which required a few changes and a FIXME.
2024-11-22 14:26:38 +02:00
Byron Hambly
12dbf6cb9d Merge f6fdedf850 into merged_master (Bitcoin PR bitcoin/bitcoin#25648) 2024-10-24 20:20:13 +02:00
Byron Hambly
f88268fb7c Merge da23320998 into merged_master (Bitcoin PR bitcoin/bitcoin#25651) 2024-10-24 14:21:48 +02:00
Byron Hambly
715350d30c Merge 1eedde157f into merged_master (Bitcoin PR bitcoin/bitcoin#25638) 2024-10-17 17:43:57 +02:00
Byron Hambly
2081703f71 Merge 92c8e1849d into merged_master (Bitcoin PR bitcoin/bitcoin#25494) 2024-10-17 17:06:13 +02:00
Byron Hambly
b81762fcb2 Merge 8d4a058ac4 into merged_master (Bitcoin PR bitcoin/bitcoin#23997) 2024-10-17 10:15:38 +02:00
James Dorfman
f6f9f6b155 Merge 7ba0850c49 into merged_master (Bitcoin PR bitcoin/bitcoin#25036) 2024-10-15 17:03:37 +00:00
James Dorfman
17851700b4 Merge e4e201dfd9 into merged_master (Bitcoin PR bitcoin/bitcoin#25290) 2024-09-19 18:56:19 +00:00
James Dorfman
c6fee1dac3 Merge 38c63e3683 into merged_master (Bitcoin PR bitcoin/bitcoin#25338) 2024-09-10 18:55:20 +00:00
James Dorfman
5c24574c48 Merge aac9c259b0 into merged_master (Bitcoin PR bitcoin/bitcoin#25065) 2024-09-09 16:46:26 +00:00
James Dorfman
8667ac6db7 Merge 2642dee136 into merged_master (Bitcoin PR bitcoin/bitcoin#15936) 2024-09-06 15:45:51 +00:00
James Dorfman
bfb0f5d1e1 Merge 640eb772e5 into merged_master (Bitcoin PR bitcoin/bitcoin#25064) 2024-08-13 21:57:29 +00:00
James Dorfman
66bc45020f Merge 4d0c00dffd into merged_master (Bitcoin PR bitcoin/bitcoin#25168) 2024-08-13 20:10:21 +00:00
James Dorfman
06a6044137 Merge 0de36941ec into merged_master (Bitcoin PR bitcoin/bitcoin#25153) 2024-08-13 06:00:38 +00:00
James Dorfman
d4aa6eba2f Merge dbdc83ae01 into merged_master (Bitcoin PR bitcoin/bitcoin#24909) 2024-08-01 18:03:20 +00:00
James Dorfman
847807539e Merge c5c4fb3182 into merged_master (Bitcoin PR bitcoin/bitcoin#24758) 2024-07-29 16:46:56 +00:00
James Dorfman
b3a377c2d0 Merge 0da559e02e into merged_master (Bitcoin PR bitcoin/bitcoin#24661) 2024-07-08 15:17:32 +00:00
Byron Hambly
fa21dc5b5d Merge 601bfc417d into merged_master (Bitcoin PR bitcoin/bitcoin#24515) 2023-10-16 10:58:18 +00:00
Byron Hambly
7d91422a87 Merge 848b11615b into merged_master (Bitcoin PR bitcoin/bitcoin#22834) 2023-07-03 09:33:46 +00:00
Byron Hambly
ccd7b72d79 Merge e30b6ea194 into merged_master (Bitcoin PR bitcoin/bitcoin#24067) 2023-06-28 14:48:32 +00:00
Byron Hambly
7878ba47b9 Merge c561f2f06e into merged_master (Bitcoin PR bitcoin/bitcoin#23497) 2023-06-19 09:28:31 +00:00
Byron Hambly
47626b5a64 Merge 623745ca74 into merged_master (Bitcoin PR bitcoin/bitcoin#23912) 2023-06-14 15:44:11 +00:00
Byron Hambly
01c3d7fbec Merge f7367b88e1 into merged_master (Bitcoin PR bitcoin/bitcoin#23842) 2023-06-14 06:43:35 +00:00
Byron Hambly
413786c613 Merge 8c0bd871fc into merged_master (Bitcoin PR bitcoin/bitcoin#23785) 2023-06-13 14:30:53 +00:00
Byron Hambly
f97b7f0c64 Merge 84d921e79c into merged_master (Bitcoin PR bitcoin/bitcoin#23465) 2023-06-06 09:00:13 +00:00
Byron Hambly
858b1793b6 Merge 42b25025fa into merged_master (Bitcoin PR bitcoin/bitcoin#23644) 2023-06-02 11:28:46 +00:00
Byron Hambly
5a723e538b Merge 1c06e1a7b6 into merged_master (Bitcoin PR bitcoin/bitcoin#23437) 2023-06-01 09:15:23 +00:00
James Dorfman
c134b5a012 Merge 064c729a96 into merged_master (Bitcoin PR bitcoin/bitcoin#23512) 2023-05-31 06:23:55 +00:00
Byron Hambly
002abaf5a3 Merge 4018e23aa7 into merged_master (Bitcoin PR bitcoin/bitcoin#23573) 2023-05-30 15:39:59 +00:00
Byron Hambly
61e7d675db Merge cf63d635b1 into merged_master (Bitcoin PR bitcoin/bitcoin#23499) 2023-05-26 10:39:53 +00:00
Byron Hambly
c8c72768d0 Merge 7f0f853373 into merged_master (Bitcoin PR bitcoin/bitcoin#23005) 2023-05-25 08:59:33 +00:00
Byron Hambly
0b69a1e205 Merge 1ba74123f9 into merged_master (Bitcoin PR bitcoin/bitcoin#23004) 2023-05-25 08:24:05 +00:00
Byron Hambly
8299bec8a2 Merge c001da306b into merged_master (Bitcoin PR bitcoin/bitcoin#23325) 2023-05-14 10:52:15 +00:00
James Dorfman
4ffc594d4a Merge a9f6428708 into merged_master (Bitcoin PR bitcoin/bitcoin#23003) 2023-05-11 05:35:51 +00:00
Byron Hambly
eea9829aa6 Merge 825f4a64e6 into merged_master (Bitcoin PR bitcoin/bitcoin#22976) 2023-04-24 11:40:49 +00:00
James Dorfman
7e2135c61c Merge 488e745560 into merged_master (Bitcoin PR bitcoin/bitcoin#12677) 2023-04-22 02:01:59 +00:00
Byron Hambly
8d6c4da78c Merge 528e08119f into merged_master (Bitcoin PR bitcoin/bitcoin#22219) 2023-04-21 09:23:54 +00:00
Byron Hambly
b70d32b713 Merge e9d6eb1b80 into merged_master (Bitcoin PR bitcoin/bitcoin#22217) 2023-04-10 13:07:29 +00:00
James Dorfman
640ebd5e5a Merge 62cb4009c2 into merged_master (Bitcoin PR bitcoin/bitcoin#22215) 2023-04-10 02:27:52 +00:00
Andrew Chow
80fc1af096
Merge bitcoin/bitcoin#26289: Use util::Result in for calculating mempool ancestors
47c4b1f52a mempool: log/halt when CalculateMemPoolAncestors fails unexpectedly (stickies-v)
5481f65849 mempool: add AssumeCalculateMemPoolAncestors helper function (stickies-v)
f911bdfff9 mempool: use util::Result for CalculateMemPoolAncestors (stickies-v)
66e028f739 mempool: use util::Result for CalculateAncestorsAndCheckLimits (stickies-v)

Pull request description:

  Upon reviewing the documentation for `CTxMemPool::CalculateMemPoolAncestors`, I noticed `setAncestors` was meant to be an `out` parameter but actually is an `in,out` parameter, as can be observed by adding `assert(setAncestors.empty());` as the first line in the function and running `make check`. This PR fixes this unexpected behaviour and introduces refactoring improvements to make intents and effects of the code more clear.

  ## Unexpected behaviour
  This behaviour occurs only in the package acceptance path, currently only triggered by `testmempoolaccept` and `submitpackage` RPCs.

  In `MemPoolAccept::AcceptMultipleTransactions()`, we first call `PreChecks()` and then `SubmitPackage()` with the same `Workspace ws` reference. `PreChecks` leaves `ws.m_ancestors` in a potentially non-empty state, before it is passed on to `MemPoolAccept::SubmitPackage`. `SubmitPackage` is the only place where `setAncestors` isn't guaranteed to be empty before calling `CalculateMemPoolAncestors`. The most straightforward fix is to just forcefully clear `setAncestors` at the beginning of CalculateMemPoolAncestors, which is done in the first bugfix commit.

  ## Improvements
  ### Return value instead of out-parameters
  This PR updates the function signatures for `CTxMemPool::CalculateMemPoolAncestors` and `CTxMemPool::CalculateAncestorsAndCheckLimits` to use a `util::Result` return type and eliminate both the `setAncestors` `in,out`-parameter as well as the error string. It simplifies the code and makes the intent and effects more explicit.

  ### Observability
  There are 7 instances where we currently call `CalculateMemPoolAncestors` without actually checking if the function succeeded because we assume that it can't fail, such as in [miner.cpp](69b10212ea/src/node/miner.cpp (L399)). This PR adds a new wrapper `AssumeCalculateMemPoolAncestors` function that logs such unexpected failures, or in case of debug builds even halts the program. It's not crucial to the objective, more of an observability improvement that seems sensible to add on here.

ACKs for top commit:
  achow101:
    ACK 47c4b1f52a
  w0xlt:
    ACK https://github.com/bitcoin/bitcoin/pull/26289/commits/47c4b1f52ab8d95d7deef83050bad49d1e3e5990
  glozow:
    ACK 47c4b1f52a
  furszy:
    light code review ACK 47c4b1f5
  aureleoules:
    ACK 47c4b1f52a

Tree-SHA512: d908dad00d1a5645eb865c4877cc0bae74b9cd3332a3641eb4a285431aef119f9fc78172d38b55c592168a73dae83242e6af3348815f7b37cbe2d448a3a58648
2023-01-03 16:30:55 -05:00
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
- 2021: f47dda2c58
- 2020: fa0074e2d8
- 2019: aaaaad6ac9
2022-12-24 23:49:50 +00:00
stickies-v
f911bdfff9
mempool: use util::Result for CalculateMemPoolAncestors
Avoid using setAncestors outparameter, simplify function signatures
and avoid creating unused dummy strings.
2022-12-13 15:42:49 +00:00
fanquake
7d51560003
Merge bitcoin/bitcoin#26298: refactor: Move src/interfaces/*.cpp files to libbitcoin_common.a
b19c4124b3 refactor: Rename ambiguous interfaces::MakeHandler functions (Ryan Ofsky)
dd6e8bd71c build: remove BOOST_CPPFLAGS from libbitcoin_util (fanquake)
82e272a109 refactor: Move src/interfaces/*.cpp files to libbitcoin_common.a (Ryan Ofsky)

Pull request description:

  These belong in `libbitcoin_common.a`, not `libbitcoin_util.a`, because they aren't general-purpose utilities, they just contain some common glue code that is used by both the node and the wallet. Another reason not to include these in `libbitcoin_util.a` is to prevent them from being used by the kernel library.

  Also rename ambiguous `MakeHandler` functions to `MakeCleanupHandler` and `MakeSignalHandler`. Cleanup function handler was introduced after boost signals handler, so original naming didn't make much sense.

  This just contains a move-only commit, and a rename commit. There are no actual code or behavior changes.

  This PR is an alternative to #26293, and solves the same issue of removing a boost dependency from the _util_ library. The advantages of this PR compared to #26293 are that it keeps the source directory structure more flat, and it avoids having to change #includes all over the codebase.

ACKs for top commit:
  hebasto:
    ACK b19c4124b3

Tree-SHA512: b3a1d33eedceda7ad852c6d6f35700159d156d96071e59acae2bc325467fef81476f860a8855ea39cf3ea706a1df2a341f34fb2dcb032c31a3b0e9cf14103b6a
2022-12-07 14:54:23 +00:00