Commit Graph

40629 Commits

Author SHA1 Message Date
Andrew Toth
793e8f5f87 rest: read raw block in rest_block and deserialize for json
Note that for speed this commit also removes the proof of work and
signet signature checks before returning the block in getblock.
It is assumed if a block is stored it will be valid.

Github-Pull: #26415
Rebased-From: e710cefd57
2024-06-10 14:05:11 +00:00
Andrew Toth
5417597c6c rpc: read raw block in getblock and deserialize for verbosity > 0
Note that for speed this commit also removes the proof of work and
signet signature checks before returning the block in getblock.
It is assumed if a block is stored it will be valid.

Github-Pull: #26415
Rebased-From: 95ce0783a6
2024-06-10 14:05:11 +00:00
Andrew Toth
b31a4a2a73 test: check more details on zmq raw block response
Github-Pull: #26415
Rebased-From: 0865ab8712
2024-06-10 14:05:11 +00:00
Andrew Toth
bbbcf92de2 zmq: read raw block with ReadRawBlockFromDisk
Github-Pull: #26415
Rebased-From: 38265cc14e
2024-06-10 14:05:11 +00:00
Andrew Toth
18aa12fb5c blockstorage: check nPos in ReadRawBlockFromDisk before seeking back
ReadRawBlockFromDisk assumes a non-null pos that has an nPos >= 8.
This simple check makes the function safer to call in the future,
so callers don't need to worry about causing UB if the pos is null.

Github-Pull: #26415
Rebased-From: da338aada7
2024-06-10 14:05:11 +00:00
fanquake
d756a384d2
doc: update manual pages for 27.1 2024-06-10 13:03:33 +01:00
fanquake
93bb18f1c8
build: bump version to v27.1 final 2024-06-10 13:03:33 +01:00
fanquake
fcf1241971
doc: update release notes for v27.1 final 2024-06-10 13:03:30 +01:00
fanquake
8d3448c59b build: ignore deprecated-declaration warnings in objc++ macOS code
These come from GUI code, and haven't/aren't being fixed, see discussion
in https://github.com/bitcoin-core/gui/issues/112. For now, just ignore
them entirely. Note that this only applies to ObjCXX code, so will not
hide any relevant warnings coming from C or CXX code (and they would be
unlikely in any case).

Alternative to #29362, which disables all compiler warnings, for macOS
builds in the CI.

Relevant output:
```bash
qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
                                                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
@interface NSUserNotificationCenter : NSObject {
           ^
3 warnings generated.
```

Github-Pull: #29577
Rebased-From: 8b7630cb1f
2024-06-08 01:56:52 +00:00
Hennadii Stepanov
cafe533fef build: Add missed definition for AM_OBJCXXFLAGS
Github-Pull: #29577
Rebased-From: bd8f0354ba
2024-06-08 01:56:49 +00:00
Luke Dashjr
b4849c67c1 doc: Update Qt version to 5.15.14 2024-06-04 17:50:03 +00:00
fanquake
a0d864340a depends: qt 5.15.14
Github-Pull: #30198
Rebased-From: b018bd779d
2024-06-04 17:47:09 +00:00
Hennadii Stepanov
f2e05cd2a9
depends: Update Boost download link
See: https://github.com/boostorg/boost-tasks/pull/3

Github-Pull: #30217
Rebased-From: ffbc173ca1
2024-06-04 11:17:16 +01:00
Hennadii Stepanov
ba35920542
build: Fix building fuzz binary on on SunOS / illumos
Github-Pull: #30216
Rebased-From: 3299abce94
2024-06-04 11:17:16 +01:00
merge-script
fccd32efe6
Merge bitcoin/bitcoin#30092: [27.x] Backports and rc1
22701a4346 doc: update manual pages for 27.1rc1 (fanquake)
9e919072bd build: bump version to 27.1rc1 (fanquake)
9b4640c4be doc: update release-notes.md for 27.1 (fanquake)
80032d6917 qt: 27.1rc1 translations update (Hennadii Stepanov)
423bd6dc68 windeploy: Renew certificate (Ava Chow)
77b2321ca0 depends: Fetch miniupnpc sources from an alternative website (Hennadii Stepanov)
31adcfa171 test: add GetAddedNodeInfo() CJDNS regression unit test (Jon Atack)
9cdb9edfb8 p2p, bugfix: detect addnode cjdns peers in GetAddedNodeInfo() (Jon Atack)
3c26058da2 crypto: disable asan for sha256_sse4 with clang and -O0 (Cory Fields)
0ba11cf908 rpc: move UniValue in blockToJSON (willcl-ark)
dedf319b08 gui: don't permit port in proxy IP option (willcl-ark)
d1289a1300 gui: fix create unsigned transaction fee bump (furszy)

Pull request description:

  Backports:
  * https://github.com/bitcoin-core/gui/pull/812
  * https://github.com/bitcoin-core/gui/pull/813
  * https://github.com/bitcoin/bitcoin/pull/30085
  * https://github.com/bitcoin/bitcoin/pull/30094
  * https://github.com/bitcoin/bitcoin/pull/30097
  * https://github.com/bitcoin/bitcoin/pull/30149
  * https://github.com/bitcoin/bitcoin/pull/30151

  Bump to 27.1rc1.

ACKs for top commit:
  stickies-v:
    re-ACK 22701a4346
  willcl-ark:
    reACK 22701a4346
  hebasto:
    re-ACK 22701a4346.

Tree-SHA512: 6eca44ba7e6664eb4677646597dfdaf56a241c8c3e95e0ab8929ee2fc3671303fc6c2634d359b4523dbd452ac5e54fd1f4c7c2bf7e9c5209395f8cb3b4753fb3
2024-05-29 09:16:55 +01:00
Luke Dashjr
fe21e5bc03 GUI: setWalletActionsEnabled: Keep historyAction disabled if privacy mode is already on 2024-05-28 20:52:06 +00:00
fanquake
22701a4346
doc: update manual pages for 27.1rc1 2024-05-28 12:28:11 +01:00
fanquake
9e919072bd
build: bump version to 27.1rc1 2024-05-28 12:28:11 +01:00
fanquake
9b4640c4be
doc: update release-notes.md for 27.1 2024-05-28 12:28:06 +01:00
Hennadii Stepanov
80032d6917
qt: 27.1rc1 translations update 2024-05-28 10:18:55 +01:00
Cory Fields
2ae23d32c7 rpc: avoid copying into UniValue
These are simple (and hopefully obviously correct) copies that can be moves
instead.

Github-Pull: #30115
Rebased-From: d7707d9843
2024-05-23 19:40:02 +00:00
Ava Chow
423bd6dc68
windeploy: Renew certificate
Github-Pull: #30149
Rebased-From: 9f4ff1e965
2024-05-23 13:28:44 +01:00
Hennadii Stepanov
77b2321ca0
depends: Fetch miniupnpc sources from an alternative website
The https://miniupnp.tuxfamily.org website is unavailable now.

Github-Pull: #30151
Rebased-From: 21b8a14d37
2024-05-23 09:44:19 +01:00
Jon Atack
31adcfa171
test: add GetAddedNodeInfo() CJDNS regression unit test
Github-Pull: #30085
Rebased-From: d0b047494c
2024-05-23 09:44:19 +01:00
Jon Atack
9cdb9edfb8
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-22 09:49:00 +01:00
Cory Fields
3c26058da2
crypto: disable asan for sha256_sse4 with clang and -O0
Clang is unable to compile the Transform function for that combination of
options.

Github-Pull: #30097
Rebased-From: 141df0a288
2024-05-16 08:41:52 +08: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