Commit Graph

37921 Commits

Author SHA1 Message Date
Luke Dashjr
0f88ee0361 Merge 15155 via test_external_bcli 2023-11-15 23:49:11 +00:00
Luke Dashjr
52874632dc Merge 13789 via bugfix_asm_pragmas 2023-11-15 23:49:11 +00:00
Luke Dashjr
38be3bf313 Merge 5416 via sys_libsecp256k1 2023-11-15 23:49:11 +00:00
Luke Dashjr
0a46aec36d Merge 2241 via sys_leveldb 2023-11-15 23:49:11 +00:00
Luke Dashjr
0d2f1ba753 Merge 5872 via subdir_incl_compat 2023-11-15 23:49:11 +00:00
Luke Dashjr
91e2ab762b Bugfix: macOS: Open Finder automatically when DMG is mounted 2023-11-15 19:54:34 +00:00
Luke Dashjr
063b1e6a04 net: Remove forcedinbound limit antifeature 2023-11-10 21:47:00 +00:00
Matthew Zipkin
421566f7d0 net: add forced_inbound to getpeerinfo
Github-Pull: #27600
Rebased-From: 8c2026848da910fdebff0a9f73e29f1f6ae81e43
2023-11-09 23:40:04 +00:00
Matthew Zipkin
ae08cb4b89 net: only allow 8 simultaneous forced inbound connections
Github-Pull: #27600
Rebased-From: 75868022a904c1f77871abf962bf9b88a9c5faf6
2023-11-09 23:39:46 +00:00
Matthew Zipkin
0c50a71fe9 test: cover ForceInbound permission success even when connections are full
Github-Pull: #27600
Rebased-From: 6b6bcaf0b9ae0a7adaf96bf791aaafc6b5e9f000
2023-11-09 23:10:56 +00:00
Matthew Zipkin
594140cda3 net: nodes with ForceInbound permission force eviction
Github-Pull: #27600
Rebased-From: 8bc203073a0b8b7e1a6851bcf3f1688e54b10a73
2023-11-09 23:10:43 +00:00
Matthew Zipkin
6870964457 net: add new permission ForceInbound
Only inbound nodes with this permission set will call
`SelectNodeToEvict()` with force=true, so when connections are full
there is an increased liklihood of opening a slot for the new inbound.
Extends NoBan permission.

Github-Pull: #27600
Rebased-From: 99399b3cbfef584df0444972834b22ce87aa63af
2023-11-09 23:09:47 +00:00
Matthew Zipkin
f6e710a244 eviction: track one random unprotected node to evict if forced
Accomplished by adding a bool argument `force` to SelectNodeToEvict()

Github-Pull: #27600
Rebased-From: 0c0f2a2c3664d5ea81ee31230ddca40863dd76dd
2023-11-09 23:08:45 +00:00
pablomartin4btc
17415da9db gui: add validation to cli-side commmands
Add a validation for cli-side commands for the follwing cases:

* duplication of cli-command (and options: at the moment a user
  can specify -rpcwallet many times, only the last one will be
  taken into account,

* only 1 cli-command can run at a time (eg can't run -generate and
  -getinfo at the same time),

* no params starting with slash "-" will be accepted after a cli-command
  (this is the case for bitcoin-cli -generate 3 -rpcwallet=xyz).

Github-Pull: #26990
Rebased-From: 755320f75f2141909e84b62f420462c1c5b193e6
2023-11-09 23:01:58 +00:00
pablomartin4btc
efd7ea0f2e rpc, cli: improve error message on multiwallet mode
The primary objective is to provide users with clearer
and more informative error messages when encountering
the RPC_WALLET_NOT_SPECIFIED error, which occurs when
multiple wallets are loadad.

This commit also rectifies the error message consistency
by bringing the error message in line with the definition
established in protocol.h ("error when there are multiple
wallets loaded").

Github-Pull: #26990
Rebased-From: bf48c40c0ee62eb6343f8aff06a88322a33f2dd6
2023-11-09 23:01:57 +00:00
Luke Dashjr
883799b2e7 MOVEONLY: Avoid unnecessary conflict with rpccookieperms 2023-11-09 22:55:43 +00:00
Roman Zeyde
4ec79e3375 rpc: keep .cookie if it was not generated
Otherwise, starting bitcoind twice may cause the `.cookie`
file generated by the first instance to be deleted by the
second instance shutdown (after failing to obtain a lock).

Github-Pull: #28784
Rebased-From: d95dde9441fb791046394ed3784a840a54ef2ab9
2023-11-09 22:55:43 +00:00
Vasil Dimov
3e8eb74809 [test] Test i2p private key constraints
Github-Pull: #28695
Rebased-From: 5cf4d266d9
2023-11-07 21:26:13 +00:00
Luke Dashjr
8aab69be04 httpserver: Workaround libevent bug by tolerating specific failure to support IPv6 binds (for default bind only) 2023-11-07 19:52:39 +00:00
Luke Dashjr
9259ebee00 Bugfix: httpserver: Close listen socket if we fail to make an evhttp handle 2023-11-07 19:52:39 +00:00
Luke Dashjr
a4f9374aca httpserver: Check for and tolerate more possible system limitations 2023-11-07 19:52:39 +00:00
Luke Dashjr
9f25ed6f18 httpserver: Simplify my_bind_socket_with_handle 2023-11-07 19:52:39 +00:00
Luke Dashjr
cc37f0635d httpserver: Adapt my_bind_socket_with_handle to local code style 2023-11-07 19:52:39 +00:00
Luke Dashjr
5cdabb8f86 httpserver: Collapse bind_socket_ai into my_bind_socket_with_handle 2023-11-07 19:52:39 +00:00
Luke Dashjr
a6109d5931 httpserver: Only make a single bind_socket_ai call from my_bind_socket_with_handle 2023-11-07 19:52:39 +00:00
Luke Dashjr
a0427096a2 httpserver: Collapse make_addrinfo into my_bind_socket_with_handle 2023-11-07 19:52:39 +00:00
Luke Dashjr
d0a1e5bfd6 httpserver: Collapse bind_socket into my_bind_socket_with_handle 2023-11-07 19:52:39 +00:00
Luke Dashjr
100767324b httpserver: Preserve socket error from listen across closesocket cleanup 2023-11-07 19:52:39 +00:00
Luke Dashjr
68ab78ad2e httpserver: Clone evhttp_bind_socket_with_handle locally 2023-11-07 19:52:39 +00:00
Luke Dashjr
c6159e4c90 Merge branch 'http_bind_error' into http_bind_error+extra 2023-11-07 19:52:31 +00:00
Wladimir J. van der Laan
f2f455f3cf http: Fail initialization when any bind fails
Currently the HTTP server initialization (`HTTPBindAddresses`) fails
only when *all* bindings fail. So if multiple binds are specified
(`127.0.0.1` and `::1` by defeault) and one succeeds and the other
fails, the latter is essentially ignored.

This commit changes the error behavior to fail *if not all* binds could
be performed, which I think is more in line with how software normally
handles this and what users expect.
2023-11-07 19:50:20 +00:00
Luke Dashjr
e08455f529 guix: Exclude minisketch files from release tarball 2023-11-07 19:42:29 +00:00
Luke Dashjr
319091c4bf Remove embedded libminisketch (and its tests/fuzz) from build
libminisketch isn't actually used in 25.x, so ignore it
2023-11-07 19:42:25 +00:00
Sebastian Falbesoner
647bdfcf51
gui: fix crash on selecting "Mask values" in transaction view
This commits fixes a crash bug that can be caused with the following steps:
- change to the "Transactions" view
- right-click on an arbitrary transaction -> "Show transaction details"
- close the transaction detail window again
- select "Settings" -> "Mask values"

The problem is that the list of opened dialogs, tracked in the member
variable `m_opened_dialogs`, is only ever appended with newly opened
transaction detail dialog pointers, but never removed. This leads to
dangling pointers in the list, and if the "Mask values" menu item is
selected, a crash is caused in the course of trying to close the opened
transaction detail dialogs (see `closeOpenedDialogs()` method). Fix this
by removing the pointer from the list if the corresponding widget is
destroyed.

Github-Pull: https://github.com/bitcoin-core/gui/pull/774
Rebased-From: e26e665f9f
2023-11-01 13:09:52 +00:00
Andrew Chow
d7760e62cc gui: Check for private keys disabled before attempting unlock
Before trying to unlock a wallet, first check if it has private keys
disabled. If so, there is no need to unlock.

Note that such wallets are not expected to occur in typical usage.
However bugs in previous versions allowed such wallets to be created,
and so we need to handle them.

Github-Pull: gui#773
Rebased-From: 517c7f9cba
2023-10-28 18:46:19 +00:00
Mark Friedenbach
fed7cb557a [depends] Allow PATH with spaces in directory names.
Github-Pull: #28733
Rebased-From: 92f7e7f3633b9b128312a87179832d58f8fef896
2023-10-28 18:41:23 +00:00
dergoegge
272785aaea [net] Check i2p private key constraints
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: #28695
Rebased-From: cf70a8d565
2023-10-28 18:20:39 +00:00
Hennadii Stepanov
b6e8101816 build: Include config/bitcoin-config.h explicitly in util/trace.h
The `ENABLE_TRACING` macro is expected to be defined in the
`config/bitcoin-config.h` header.

Therefore, the current code is error-prone as it depends on whether the
`config/bitcoin-config.h` header was included before or not.

Github-Pull: #28693
Rebased-From: 6bdff429ec
2023-10-28 18:10:57 +00:00
stratospher
b9afa91336 rpc: getaddrmaninfo followups
- make `getaddrmaninfo` RPC public since it's not for development
  purposes only and regular users might find it useful
- add missing `all_networks` key to RPC help
- use clang format spacing

Github-Pull: #28565
Rebased-From: 3931e6abc3
2023-10-19 17:09:19 +00:00
Luke Dashjr
d34c665c69 Merge branch 'whitelist_outgoing-mini-25+knots' into p2p_forceinbound-25+knots 2023-10-19 16:50:52 +00:00
Luke Dashjr
74144bcf53 Adjust -whitelist to default to both incoming and outgoing connections 2023-10-19 16:43:54 +00:00
Luke Dashjr
f5e5abe37f Diff-minimisation 2023-10-19 16:43:54 +00:00
brunoerg
622ae61e0b test: add coverage for whitelisting outgoing connections
Github-Pull: #27114
Rebased-From: 51618c9c8a87f3a1cd7fcb9b4f7d4da96f182138
2023-10-19 16:43:54 +00:00
Luke Dashjr
7ca26240f1 Accept "in" and "out" flags to -whitelist to allow whitelisting outgoing connections
Github-Pull: #27114
Rebased-From: 22e64e8ab55310fa613946eaf3861b7211a493e1
2023-10-19 14:57:44 +00:00
Luke Dashjr
c1bd439b38 net_processing: Move extra service flag into InitializeNode
Github-Pull: #27114
Rebased-From: a3cdcf17f819f90f39df421de92b4e2fb9a966c5
2023-10-19 02:36:39 +00:00
Luke Dashjr
e11c4d433e net: Move NetPermissionFlags::Implicit verification to InitializePermissionFlag
Github-Pull: #27114
Rebased-From: 54b22e726273d9bf9699c823e24e61bbb94014f0
2023-10-19 02:28:57 +00:00
Anthony Towns
87cffd6789 p2p: Increase tx relay rate
In the presence of smaller transactions on the network, blocks can sustain a
higher relay rate than 7tx/second. In this event, the per-peer inventory queues
can grow too large.

This commit bumps the rate up to 14 tx/s (for inbound peers), increasing the
safety margin by a factor of 2.

Outbound peers continue to receive relayed transactions at 2.5x the rate of
inbound peers, for a rate of 35tx/second.

Co-Authored-By: Suhas Daftuar <sdaftuar@gmail.com>

Github-Pull: #28592
Rebased-From: 80489ba6e8430177db5c1d0c9148e83e410bd704
2023-10-19 01:49:45 +00:00
Sebastian Falbesoner
02a19ff924 gui: fix coin control input size accounting for taproot spends
Github-Pull: gui#766
Rebased-From: 00a52e6394
2023-10-19 01:46:56 +00:00
Pieter Wuille
4229b52c12 descriptors: disallow hybrid public keys
The descriptor documentation (doc/descriptors.md) and BIP380 explicitly
require that hex-encoded public keys start with 02 or 03 (compressed) or
04 (uncompressed). However, the current parsing/inference code permit 06
and 07 (hybrid) encoding as well. Fix this.

Github-Pull: #28587
Rebased-From: c1e6c542af
2023-10-18 18:58:23 +00:00
Luke Dashjr
a1cad5e4d6 Diff-minimise 2023-10-17 15:32:02 +00:00