Commit Graph

40862 Commits

Author SHA1 Message Date
Luke Dashjr
aed813cc1b Flush dbcache early if system is under memory pressure
No point forcing memory to get pushed out to swap just to cache db changes when we can write the db changes out instead
2024-05-15 23:00:40 +00:00
Luke Dashjr
ea8bfa036c Diff-minimise 2024-05-15 22:58:12 +00:00
w0xlt
7ebac24002 test: add test for dump human-readable dumptxoutset
Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
Co-authored-by: brunoerg <brunoely.gc@gmail.com>
2024-05-15 22:58:12 +00:00
w0xlt
ce9524f0b5 rpc: allow dumptxoutset to dump human-readable data
Co-authored-by: Shashwat Vangani <shaavan.github@gmail.com>
Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
2024-05-15 22:58:11 +00:00
Luke Dashjr
21a3dd4198 Diff-minimise 2024-05-15 22:52:48 +00:00
Elichai Turkel
8463aef09f Optimized siphash implementation
Github-Pull: #18014
Rebased-From: 409c2e345225716a29c856b24e1c232a643a52ef
2024-05-15 22:52:41 +00:00
Luke Dashjr
25ea55c25d GUI: Add a warning prompt when sending to an already-used address 2024-05-15 22:40:50 +00:00
Luke Dashjr
668e18bf70 GUI: Use warning indicator for send coins entries with reused addresses 2024-05-15 22:40:50 +00:00
Luke Dashjr
bde17b6138 GUI: Implement BitcoinAddressUnusedInWalletValidator 2024-05-15 22:40:50 +00:00
Luke Dashjr
4b943c42fd GUI: QValidatedLineEdit: Add support for a warning-but-valid state 2024-05-15 22:40:50 +00:00
Luke Dashjr
42e4f13246 GUI: WalletModel: Wrap checkAddressForUsage and findAddressUsage 2024-05-15 22:40:50 +00:00
Luke Dashjr
0ba948aa4f GUI: SendConfirmationDialog: Enable changing the actual buttons used
Both buttons can be replaced with other standard buttons
2024-05-15 22:40:49 +00:00
Luke Dashjr
08ce9ecf45 GUI: SendConfirmationDialog: Defer button setup until exec 2024-05-15 22:40:49 +00:00
Luke Dashjr
86c5b4f00a GUI: Add GUIUtil::dateStr 2024-05-15 22:40:49 +00:00
Luke Dashjr
82908e28a5 interfaces/wallet: Add checkAddressForUsage and findAddressUsage 2024-05-15 22:40:49 +00:00
Luke Dashjr
9378ceaac6 Merge branch 'getaddressinfo_txids' into HEAD 2024-05-15 22:40:39 +00:00
Evan Klitzke
79e4722e62 Try to use posix_fadvise with CBufferedFile
This primarily affects blocks when bitcoin is launched with -reindex, as
that causes the block files to be loaded as CBufferedFile objects one at
a time as the reindex progresses.

Co-Authored-By: Luke Dashjr <luke-jr+git@utopios.org>

Github-Pull: #14485
Rebased-From: 289e88b3133107f8a54184d8316559c7cf8ddb12
2024-05-15 21:46:18 +00:00
Luke Dashjr
b2321063e0 Merge branch 'bufferedfile_fclose' into HEAD 2024-05-15 21:44:51 +00:00
furszy
6e24242027 wallet: default wallet migration, modify inconvenient backup filename
On default legacy wallets, the backup filename starts with an "-" due
to the wallet name being empty. This is inconvenient for systems who
treat what follows the initial "-" character as flags.

Github-Pull: #29586
Rebased-From: a951dba3a9
2024-05-15 21:09:13 +00:00
Luke Dashjr
38fc092d97 Diff-minimise 2024-05-15 20:02:17 +00:00
fanquake
0eeba0aa28 depends: qt 5.15.13
I need to try and patch around Qts buildsystem to keep #21778 moving
along (the issue being that even when you tell Qt to build using
Clang on Linux, it still calls out to GCC, breaking our ability to have
a macOS release build env that doesn't have a GCC toolchain installed,
and thus no ld binary).

Before trying to patch Qt any further, update to the latest LTS
release, and update the current patch set.

Github-Pull: #29732
Rebased-From: 430f319f73
2024-05-15 20:02:17 +00:00
Jon Atack
9f05a705fc test: AddNode() CJDNS regression unit tests
Rebased-From: be4541abe5
2024-05-15 19:54:45 +00:00
Jon Atack
b5efac03db p2p, bugfix: correctly detect CJDNS addnode entries in AddNode()
Rebased-From: 28823f30dc
2024-05-15 19:54:44 +00:00
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