Commit Graph

40985 Commits

Author SHA1 Message Date
Sjors Provoost 4357158c47
wallet: return and display signer error
Both RPC and GUI now render a useful error message instead of (silently) failing.

Replace bool with util::Result<void> to clarify that this either succeeds or returns an error message.
2024-04-16 17:47:43 +02:00
Sjors Provoost dc55531087
wallet: compare address returned by displayaddress
Update external signer documentation to reflect this requirement, which HWI already implements.
2024-04-16 17:47:43 +02:00
Sjors Provoost 6c1a2cc09a
test: use h marker for external signer mock
Consistent with #26076
2024-04-16 17:47:43 +02:00
Greg Sanders 016ed248ba fuzz: explicitly cap the vsize of RBFs for diagram checks 2024-04-16 11:27:59 -04:00
MarcoFalke fa4c69669e
test: Fix failing univalue float test 2024-04-16 16:35:12 +02:00
Matthew Zipkin fb4cc5f423
netbase: clean up Proxy logging 2024-04-16 10:24:02 -04:00
Sebastian Falbesoner 2088777ba0 remove unneeded cwd option from cpp-subprocess 2024-04-16 14:25:00 +02:00
Sebastian Falbesoner 03ffb09c31 remove unneeded bufsize option from cpp-subprocess 2024-04-16 14:25:00 +02:00
Sebastian Falbesoner 79c3036373 remove unneeded close_fds option from cpp-subprocess 2024-04-16 14:25:00 +02:00
Sebastian Falbesoner 62db8f8e5a remove unneeded session_leader option from cpp-subprocess 2024-04-16 14:25:00 +02:00
Sebastian Falbesoner 80d008c66d remove unneeded defer_spawn option from cpp-subprocess
For our use-case, there doesn't seem to be any need for this.
2024-04-16 14:25:00 +02:00
Sebastian Falbesoner cececad7b2 remove unneeded preexec function option from cpp-subprocess
We don't seem to ever need this, so remove it.
2024-04-16 14:25:00 +02:00
Sebastian Falbesoner 633e45b2e2 remove unneeded shell option from cpp-subprocess
We don't use this option and it's not supported on Windows anyways,
so we can get as well rid of it.
2024-04-16 14:25:00 +02:00
merge-script c7567d9223
Merge bitcoin/bitcoin#29886: doc: archive 27.0 release notes
c08754971d doc: archive 27.0 release notes (fanquake)

Pull request description:

ACKs for top commit:
  laanwj:
    ACK c08754971d
  stickies-v:
    ACK c08754971d

Tree-SHA512: ee910a35f0e74e02e8297ed655766995fbf5dc03ce3a9efd90986c22fea3693dedd0d2941fbcc94007cd77548985ac1c1d202644e822d1408f72faccb1472d80
2024-04-16 11:51:43 +01:00
glozow c3c1e15831 [doc] restore comment about why we check if ptx HasWitness before caching rejected txid 2024-04-16 10:11:01 +01:00
glozow 6f4da19cc3 guard against MempoolAcceptResult::m_replaced_transactions
It should never be a nullopt when the transaction result is valid -
Assume() this is the case. However, as a belt-and-suspenders just in
case it is nullopt, use an empty list.
2024-04-16 10:09:45 +01:00
fanquake c08754971d
doc: archive 27.0 release notes 2024-04-16 09:10:33 +01:00
Sebastian Falbesoner 60ca5d5508 test: p2p: add test for rejected tx request logic (`m_recent_rejects` filter) 2024-04-15 22:48:32 +02:00
glozow e9dc511a7e fixup: get all utxos up front in fill_mempool, discourage wallet mixing
Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
2024-04-15 18:22:32 +02:00
glozow 07720b1cdd
Merge bitcoin/bitcoin#29869: rpc, bugfix: Enforce maximum value for setmocktime
c2e0489b71 [rpc, bugfix] Enforce maximum value for setmocktime (dergoegge)

Pull request description:

  The maximum value for our mocktime must be representable in nanoseconds, otherwise we end up with negative values returned from `NodeClock::now()`.

  Found through fuzzing:

  ```
  $ echo "c2V0bW9ja3RpbWVcZTptYf9w/3NldG3///////////////9p////ZP///ymL//////89////Nv9L////////LXkBAABpAA==" | base64 --decode > rpc-8cab9148ab4418ebd1923c213e9d3fe9c9b49b39.crash
  $ FUZZ=rpc ./src/test/fuzz/fuzz rpc-8cab9148ab4418ebd1923c213e9d3fe9c9b49b39.crash
  fuzz_libfuzzer: util/time.cpp:28: static NodeClock::time_point NodeClock::now(): Assertion `ret > 0s' failed.
  ```

ACKs for top commit:
  maflcko:
    re-ACK c2e0489b71
  brunoerg:
    crACK c2e0489b71
  glozow:
    ACK c2e0489b71

Tree-SHA512: d7e237ca37bedd74a6b085fb6e726a142705371044c77488f593f35afe70aeca756fdba86920294b1d322c7a9b2cde9ce4e1b7d410a6ccc1fd7c6f3a6e77200a
2024-04-15 15:06:17 +01:00
glozow df609a344e
Merge bitcoin/bitcoin#29699: test: check disconnection when sending sendaddrv2 after verack
b4c9ace6ff test: check disconnection when sending sendaddrv2 after verack (brunoerg)

Pull request description:

  This PR adds test coverage for:
  71b63195b3/src/net_processing.cpp (L3796-L3807)

ACKs for top commit:
  maflcko:
    lgtm ACK b4c9ace6ff
  byaye:
    Tested ACK b4c9ace6ff

Tree-SHA512: 2ad49a269cb64794b8d626941cf532acafdbe6e97f3da5ccb52f3201a6773d2f5e3d7d62ce4289334b85d578790d4dd5833f6b8ba54bd49a8418a20aee0c3e5f
2024-04-15 15:04:07 +01:00
merge-script 22c86140f8
Merge bitcoin/bitcoin#29848: ci: use Clang 16 for Valgrind
ad21f22948 ci: use clang-16 for Valgrind (fanquake)

Pull request description:

  Switch to Ubuntu Noble.
  Valgrind 3.19 -> 3.22
  Clang 14 -> Clang 16

ACKs for top commit:
  maflcko:
    lgtm ACK ad21f22948

Tree-SHA512: ec79ef9faaec97e34529ae36fff7798f859daca6a1e3563bc50e5d56a56ee4525c736976158a6e950c5b9f810c498d54ab128df984f42441e706033906c2ea3e
2024-04-15 14:26:59 +01:00
StevenMia b1ee4a557b chore: fix some typos in comments
Signed-off-by: StevenMia <flite@foxmail.com>
2024-04-15 20:12:54 +08:00
merge-script 58446e1d92
Merge bitcoin/bitcoin#28874: doc: fixup help output for -upnp and -natpmp
92f88a9629 doc: fixup NAT-PMP help doc (fanquake)
02395edca9 init: remove redundant upnp #ifdef (fanquake)

Pull request description:

  This is a very belated followup to #26896 (which removed the configure options for setting the upnp and natpmp runtime default) and corrects the `-help` docs for `-upnp` and `-natpmp`.

ACKs for top commit:
  davidgumberg:
    ACK 92f88a9629
  hernanmarino:
    ACK 92f88a9629

Tree-SHA512: 795dc8a8703bf322b5831d845de85f2428ee0dd45d3064b48ff47d147147381af26c0a9d00c596db12009b254763844b209989daf4e7470d20e8a1753b640966
2024-04-15 13:10:18 +01:00
MarcoFalke fae0db555c
refactor: Use chrono type for g_mock_time
This avoids verbose casts in the lines where the symbol is used.
2024-04-15 13:34:31 +02:00
MarcoFalke fa382d3dd0
test: Add missing Assert(mock_time_in >= 0s) to SetMockTime
Also, inline the deprecated alias to avoid having the two go out of sync
again in the future.
2024-04-15 13:34:27 +02:00
merge-script 3abee5eceb
Merge bitcoin/bitcoin#29856: ci: Bump s390x to ubuntu:24.04
fadf7e90dc ci: Bump s390x to ubuntu:24.04 (MarcoFalke)

Pull request description:

  Now that most other CI tasks are rolled to 24.04, roll this one as well.
  Also, re-enable feature_init.

ACKs for top commit:
  fanquake:
    ACK fadf7e90dc - finished running after ~5 hours.

Tree-SHA512: d69f40227ba982eaaccc1e144ba05d3c8c4a096ac401077df3db5cf3276d1e146a438e4e0237dda876b3644fc7f0accd724a19e3c1cdb94c30c679899137280e
2024-04-15 10:04:42 +01:00
merge-script d29fc3a245
Merge bitcoin/bitcoin#29823: minisketch: update subtree to 3472e2f5ec75ace39ce9243af6b3fee233a67492
4722b7c715 build: remove minisketch clz check (fanquake)
1eea10a6d2 Squashed 'src/minisketch/' changes from a571ba20f9..3472e2f5ec (fanquake)

Pull request description:

  https://github.com/sipa/minisketch/pull/81 will fix #29799.
  Minor build cleanups after https://github.com/sipa/minisketch/pull/80.

ACKs for top commit:
  dergoegge:
    utACK 4722b7c715
  hebasto:
    ACK 4722b7c715, I have verified the subtree update and reviewed the build system changes. Both look OK.

Tree-SHA512: eabd82e5a13cc4f32155319df97368f2e8c93320a4265b6c372efcb1ea4e756f6693df7c02498c8ea989ccd376a20277fa110c66d0754cb9bca5e54d18e0a965
2024-04-15 10:00:24 +01:00
dergoegge c2e0489b71 [rpc, bugfix] Enforce maximum value for setmocktime 2024-04-15 09:51:06 +01:00
MarcoFalke fa6ab0d020
rpc: Reword SighashFromStr error message 2024-04-15 10:01:15 +02:00
fanquake ad21f22948
ci: use clang-16 for Valgrind
Switch to Ubuntu Noble.
2024-04-14 10:39:14 +01:00
MarcoFalke fadf7e90dc
ci: Bump s390x to ubuntu:24.04
Re-enable feature_init
2024-04-12 16:30:45 +02:00
fanquake 4722b7c715
build: remove minisketch clz check 2024-04-12 14:28:34 +02:00
fanquake e58e1323a8
Update minisketch subtree to latest master 2024-04-12 14:27:45 +02:00
fanquake 1eea10a6d2 Squashed 'src/minisketch/' changes from a571ba20f9..3472e2f5ec
3472e2f5ec Merge sipa/minisketch#81: Avoid overflowing shift by special casing inverse of 1
653d8b2e26 Avoid overflowing shift by special casing inverse of 1
33b7c200b9 Merge sipa/minisketch#80: Add c++20 version of CountBits
4a48f31a37 Merge sipa/minisketch#83: ci: Fix "s390x (big-endian)" task
82b6488acb Add c++20 version of CountBits
0498084d31 ci: Fix "s390x (big-endian)" task
71709dca9e Merge sipa/minisketch#82: ci: Fix `x86_64-w64-mingw32` task
9e6127fa98 Merge sipa/minisketch#74: Avoid >> above type width in BitWriter
ed420bc170 ci: Fix `x86_64-w64-mingw32` task
fe1040f227 Drop -Wno-shift-count-overflow compile flag
154bcd43bd Avoid >> above type width in BitWriter
67b87acdb6 Merge sipa/minisketch#78: ci: Update macOS image for CI
7de7250416 ci: Update macOS image for CI
83d812ea9f Merge sipa/minisketch#73: ci: Use correct variable to designate C++ compiler
e051a7d690 ci: Install wine32 package for Windows tests
2d2c695d78 build: Drop unused `CC` variable
1810fcbd11 ci: Use correct variable to designate C++ compiler
022b959049 Merge sipa/minisketch#77: Add missing include
08443c4892 Add missing include

git-subtree-dir: src/minisketch
git-subtree-split: 3472e2f5ec75ace39ce9243af6b3fee233a67492
2024-04-12 14:27:45 +02:00
Hennadii Stepanov dd3e0fa125
build: Fix false positive `CHECK_ATOMIC` test for clang-15 2024-04-12 09:52:06 +02:00
merge-script 0de63b8b46
Merge bitcoin/bitcoin#29849: Fix typos in `subprocess.hpp`
13f5391bbb Fix typos in `subprocess.hpp` (Hennadii Stepanov)

Pull request description:

  Resolves one item in the https://github.com/bitcoin/bitcoin/pull/28981#pullrequestreview-1991272752:
  >    - Remove linter exclusions and fix all issues.

  Based on upstream https://github.com/arun11299/cpp-subprocess/pull/101.

ACKs for top commit:
  fanquake:
    ACK 13f5391bbb

Tree-SHA512: 2ee27a5b7d1ba6f47a5148add155c918eadaaffb94a4b5dd3edea00e63440b87291c559361bf25a8db1567debff78cf7e9466dc34f14331ca1d426994837df93
2024-04-11 16:18:39 +02:00
glozow bdb33ec519
Merge bitcoin/bitcoin#29735: AcceptMultipleTransactions: Fix workspace not being set as client_maxfeerate failure
4ba1d0b553 fuzz: Add coverage for client_maxfeerate (Greg Sanders)
91d7d8f22a AcceptMultipleTransactions: Fix workspace client_maxfeerate (Greg Sanders)
f3aa5bd5eb fill_mempool: assertions and docsctring update (Greg Sanders)
a3da63e8fe Move fill_mempool to util function (Greg Sanders)
73b68bd8b4 fill_mempool: remove subtest-specific comment (Greg Sanders)

Pull request description:

  Bug causes an `Assume()` failure due to the expectation that the individual result should be invalid when done over `submitpackage` via rpc.

  Bug introduced by https://github.com/bitcoin/bitcoin/pull/28950 , and I discovered it rebasing https://github.com/bitcoin/bitcoin/pull/28984 since it's easier to hit in that test scenario.

  Tests in place were only checking `AcceptSingleTransaction`-level checks due to package evaluation only triggering when minfee is too high for the parent transaction.

  Added test along with fix, moving the fill_mempool utility into a common area for re-use.

ACKs for top commit:
  glozow:
    reACK 4ba1d0b553
  theStack:
    ACK 4ba1d0b553
  ismaelsadeeq:
    re-ACK 4ba1d0b553  via [diff](4fe7d150eb..4ba1d0b553)

Tree-SHA512: 3729bdf7f25d04e232f173ccee04ddbb2afdaafa3d04292a01cecf58fb11b3b2bc133e8490277f1a67622b62d17929c242dc980f9bb647896beea4332ee35306
2024-04-11 14:46:52 +02:00
laanwj f2e3662e57 net: Decrease nMaxIPs when learning from DNS seeds
Limit number of IPs learned from a single DNS seed to 32, to prevent the results from
one DNS seed from dominating AddrMan. Note that the number of results from a UDP DNS query is
bounded to 33 already, but it is possible for it to use TCP where a potentially enormous
number of results can be returned.

Closes #16070.
2024-04-11 14:43:30 +02:00
Hennadii Stepanov 13f5391bbb
Fix typos in `subprocess.hpp` 2024-04-11 14:03:37 +02:00
stickies-v c6be144c4b
Remove timedata
With the introduction and usage of TimeOffsets, there is no more need
for this file. Remove it.
2024-04-10 17:01:27 +02:00
dergoegge 92e72b5d0d
[net processing] Move IgnoresIncomingTxs to PeerManagerInfo 2024-04-10 17:01:27 +02:00
dergoegge 7d9c3ec622
[net processing] Introduce PeerManagerInfo
For querying statistics/info from PeerManager. The median outbound time
offset is the only initial field.
2024-04-10 17:01:27 +02:00
stickies-v ee178dfcc1
Add TimeOffsets helper class
This helper class is an alternative to CMedianFilter, but without a
lot of the special logic and exceptions that we needed while it was
still used for consensus.
2024-04-10 17:01:27 +02:00
stickies-v 55361a15d1
[net processing] Use std::chrono for type-safe time offsets 2024-04-10 16:15:46 +02:00
dergoegge 038fd979ef
[net processing] Move nTimeOffset to net_processing 2024-04-10 16:15:46 +02:00
fanquake a0dc2ebcda
guix: replace GCC unaligned VMOV patch with binutils patch
Rather than invasively patching GCC. Given we have binutils 2.38
available, we can patch it to flip the default for
`-muse-unaligned-vector-move`.
2024-04-10 13:59:43 +02:00
merge-script 3f6a6da3b0
Merge bitcoin/bitcoin#29844: depends: remove no longer needed patch for Boost::Process
95c594f4e9 depends: remove no longer needed patch for Boost::Process (Sebastian Falbesoner)

Pull request description:

  As Boost::Process has been replaced by cpp-subprocess (PR #28981), this patch touches an unused code part and is hence not needed anymore.

ACKs for top commit:
  hebasto:
    ACK 95c594f4e9, I have reviewed the code and it looks OK.
  fanquake:
    ACK 95c594f4e9

Tree-SHA512: 0309b826f8c260e4180624f17302e51329fc4bd7a5431997d6d27d468dd5f7dbcd9db6a742efaba33ba30dbe361830eb1446fdbec927505ccf42412f9211934e
2024-04-10 12:31:02 +02:00
Sebastian Falbesoner 95c594f4e9 depends: remove no longer needed patch for Boost::Process
As Boost::Process has been replaced by cpp-subprocess (PR #28981), this
patch touches an unused code part and is hence not needed anymore.
2024-04-10 12:20:31 +02:00
merge-script 0a9cfd1752
Merge bitcoin/bitcoin#28981: Replace Boost.Process with cpp-subprocess
d5a715536e build: remove boost::process dependency for building external signer support (Sebastian Falbesoner)
70434b1c44 external_signer: replace boost::process with cpp-subprocess (Sebastian Falbesoner)
cc8b9875b1 Add `cpp-subprocess` header-only library (Hennadii Stepanov)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/24907.

  This PR is based on **theStack**'s [work](https://github.com/bitcoin/bitcoin/issues/24907#issuecomment-1466087049).

  The `subprocess.hpp` header has been sourced from the [upstream repo](https://github.com/arun11299/cpp-subprocess) with the only modification being the removal of convenience functions, which are not utilized in our codebase.

  Windows-related changes will be addressed in subsequent follow-ups.

ACKs for top commit:
  achow101:
    reACK d5a715536e
  Sjors:
    re-tACK d5a715536e
  theStack:
    Light re-ACK d5a715536e
  fanquake:
    ACK d5a715536e - with the expectation that this code is going to be maintained as our own. Next PRs should:

Tree-SHA512: d7fb6fecc3f5792496204190afb7d85b3e207b858fb1a75efe483c05260843b81b27d14b299323bb667c990e87a07197059afea3796cf218ed8b614086bd3611
2024-04-10 12:03:06 +02:00