Commit Graph

40768 Commits

Author SHA1 Message Date
Luke Dashjr
6cb66cd455 Merge branch 'fix_cjdns_addnode_detect-27' into fix_cjdns_addnode_detect2-27 2024-05-15 19:53:27 +00:00
Jon Atack
ac5c317924 test: add GetAddedNodeInfo() CJDNS regression unit test
Github-Pull: #30085
Rebased-From: d0b047494c
2024-05-15 19:50:16 +00:00
Jon Atack
4421251d7d 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-15 19:50:16 +00:00
Martin Zumsande
acf242b062 test: add coverage for -reindex and assumeutxo
Co-authored-by: Fabian Jahr <fjahr@protonmail.com>

Github-Pull: #29726
Rebased-From: b7ba60f81a
2024-05-15 19:36:12 +00:00
Martin Zumsande
6ec27a6673 init, validation: Fix -reindex option with an existing snapshot
This didn't work for two reasons:
1.) GetSnapshotCoinsDBPath() was used to retrieve the path.
    This requires coins_views to exist, but the initialisation only happens later
    (in CompleteChainstateInitialization) so the node hits an assert in
    CCoinsViewDB& CoinsDB() and crashes.

2.) The snapshot was already activated, so it has the mempool attached.
    Therefore, the mempool needs to be transferred back to the ibd
    chainstate before deleting the snapshot chainstate.

Github-Pull: #29726
Rebased-From: e57f951805
2024-05-15 19:36:12 +00:00
Roman Zeyde
4842324b7d RPC: Keep .cookie if it was replaced after being generated
Github-Pull: #28784
Rebased-From: d95dde9441fb791046394ed3784a840a54ef2ab9
2024-05-15 17:56:41 +00:00
Luke Dashjr
b228803dcf Bugfix: configure: Correct check for fuzz binary needing a main function 2024-05-15 17:50:53 +00:00
Luke Dashjr
4fcbd58ba5 GUI: Avoid unnecessary BIP 21 references (Knots supports BIP 20 also) 2024-05-15 17:07:59 +00:00
Luke Dashjr
e310e17cad Diff-minimise 2024-05-15 16:47:00 +00:00
Luke Dashjr
7f59fa85fc Revert "build: disable external-signer for Windows"
This reverts commit 308aec3e56.
2024-05-15 16:47:00 +00:00
Luke Dashjr
27d2a53e5f Revert "test: Remove Windows-specific code from system_tests/run_command"
This reverts commit 51bc1c7126.
2024-05-15 16:47:00 +00:00
Luke Dashjr
88fe778d9d BufferedFile: fclose at destruction
This is currently indirectly implied by src/bench/load_external.cpp:LoadExternalBlockFile
	"The file will be closed by LoadExternalBlockFile()."
2024-05-15 16:14:59 +00:00
Luke Dashjr
857532797f configure: Check that libsecp256k1 is new enough and error clearly if not 2024-05-15 00:06:04 +00:00
Luke Dashjr
7c70b396b1 configure: Add unsupported --with-system-libsecp256k1 configure flag 2024-05-15 00:06:03 +00: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
Luke Dashjr
e83f30e97c Bump default dbfilesize to 128 MiB
The default max file size for LevelDB is 2 MiB, which results in the
LevelDB compaction code generating ~4 disk cache flushes per second when
syncing with the Bitcoin network.
These disk cache flushes are triggered by fdatasync() syscall issued by the
LevelDB compaction code when reaching the max file size.

If the database is on a HDD this flush rate brings the whole system to a
crawl.
It also results in very slow throughput since 2 MiB * 4 flushes per second
is about 8 MiB / second max throughput, while even an old HDD can pull
100 - 200 MiB / second streaming throughput.

Increase the default db file size for LevelDB to 128 MiB instead so the flush
rate drops to about 1 flush / 2 seconds and the system no longer gets so
sluggish.

The db file size value chosen also matches the MAX_BLOCKFILE_SIZE file
size setting already used by the block storage.
2024-05-08 04:09:28 +00:00
Luke Dashjr
11d641b364 Merge branch 'dbfilesize_param' into dbfilesize_128 2024-05-08 04:07:02 +00:00
Luke Dashjr
9160cc0b1f Add option dbfilesize to control LevelDB target ("max") file size 2024-05-08 04:04:07 +00:00
willcl-ark
1cc2de7e27 gui: fix misleading signmessage error with segwit
As described in #10542 (and numerous other places), message signing in
Bitcoin Core only supports message signing using P2PKH addresses, at
least until a new message-signing standard is agreed upon.

Therefore update the possibly-misleading error message presented to the
user in the GUI to detail more specifically the reason their message
cannot be signed, in the case that a non P2PKH address is entered.

Github-Pull: gui#819
Rebased-From: fb9f150759
2024-05-07 18:21:29 +00:00
Luke Dashjr
fb9f45e19e Bugfix: QA: mempool_fee_histogram: Compare to actual vsize/fee rather than hard-coding a particular constant 2024-05-06 15:01:01 +00: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
Luke Dashjr
3dde40d756 Diff-minimise (revert doc update) 2024-04-24 02:40:03 +00:00
Luke Dashjr
f90a84d615 Bugfix: JSON-RPC request Content-Type is application/json 2024-04-24 02:38:39 +00:00
Matthew Zipkin
99a5703b2b test: cover unix sockets in zmq interface
Github-Pull: #27679
Rebased-From: 791dea204e
2024-04-24 02:09:26 +00:00
Matthew Zipkin
dabf896ea8 zmq: accept unix domain socket address for notifier
Based on Github-Pull: #27679
Based on: c87b0a0ff4
2024-04-24 02:09:26 +00:00
Matthew Zipkin
584f254413 QA/netutil: Add test_unix_socket
Part of "test: cover UNIX sockets in feature_proxy.py"
	Github-Pull: #27375
	Commit: bfe5192891
2024-04-24 02:09:26 +00:00
Matthew Zipkin
8300cf27f5 netbase: define ADDR_PREFIX_UNIX
Part of "extend Proxy class to wrap UNIX socket as well as TCP"
	Github-Pull: #27375
	Commit: a89c3f59dc
2024-04-24 02:09:26 +00:00
Luke Dashjr
fd5c5cfe7d Merge remote-tracking branch 'origin-pull/28020/head' into HEAD 2024-04-24 02:09:19 +00:00
Luke Dashjr
d15b753382 Diff-minimise 2024-04-23 20:56:03 +00:00
Matthew Zipkin
f9e091fc85 blockstorage: do not flush block to disk if it is already there
test: ensure we can reindex from read-only block files now

Github-Pull: #27039
Rebased-From: dfcef536d0
2024-04-23 20:56:03 +00:00
Ava Chow
5204a1a601 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-04-21 19:17:38 +00:00
laanwj
7af5125276 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.

Github-Pull: #29850
Rebased-From: f2e3662e57
2024-04-21 19:08:22 +00:00
Luke Dashjr
c155102244 Bugfix: RPC: Return all warnings in get{blockchain,mining,network}info 2024-04-21 19:03:29 +00: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