aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-05-11Merge bitcoin/bitcoin#27627: [24.x] qt: 24.1rc3 translations updatev24.1rc3fanquake
a86b45cafaabd8eb4957b84a0d70484a597eacc7 qt: 24.1rc3 translations update (Hennadii Stepanov) Pull request description: This PR pulls the recent translations from the [Transifex.com](https://www.transifex.com/bitcoin/bitcoin) using the [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) tool. According to our [Release Process docs](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-every-release-candidate), it is supposed to be merged before `v24.1rc3` tagging. Will keep this PR updated regularly until merging. The Dutch translation `bitcoin_nl.ts` has been damaged, therefore its changes were rejected manually. ACKs for top commit: jarolrod: ACK a86b45cafaabd8eb4957b84a0d70484a597eacc7 Tree-SHA512: 64bdd4b1d2ec6d925d9972081492d33ebbab6a19cde1c2e5d1022c89f58390618be843de5bec3344b92dda54192352c86ab1e354001f638f32d961a09500576f
2023-05-11qt: 24.1rc3 translations updateHennadii Stepanov
2023-05-11net_processing: Boost inv trickle rateAnthony Towns
If transactions are being added to the mempool at a rate faster than 7tx/s (INVENTORY_BROADCAST_PER_SECOND) then peers' inventory_to_send queue can become relatively large. If this happens, increase the number of txids we include in an INV message (normally capped at 35) by 5 for each 1000 txids in the queue. This will tend to clear a temporary excess out reasonably quickly; an excess of 4000 invs to send will be cleared down to 1000 in about 30 minutes, while an excess of 20000 invs would be cleared down to 1000 in about 60 minutes. Github-Pull: #27610 Rebased-From: 5b3406094f2679dfb3763de4414257268565b943
2023-05-11txmempool: have CompareDepthAndScore sort missing txs firstAnthony Towns
We use CompareDepthAndScore to choose an order of txs to inv. Rather than sorting txs that have been evicted from the mempool at the end of the list, sort them at the beginning so they are removed from the queue immediately. Github-Pull: #27610 Rebased-From: 228e9201efb5574b1b96bb924de1d2e8dd1317f3
2023-05-11p2p: Avoid prematurely clearing download state for other peersSuhas Daftuar
Github-Pull: #27608 Rebased-From: 52e52071e01f4e98d87a47e1d5f3c5c3cc6dbaf4
2023-04-18doc: fix/improve warning helps in {create,load,unload,restore}walletJon Atack
- clarify that there can be multiple warning messages - specify the correct wallet action - describe the use of newlines as delimiters Github-Pull: #27279 Rebased-From: f73782a9032a462a71569e9424db9bf9eeababf3
2023-04-18bugfix: rest: avoid segfault for invalid URIpablomartin4btc
`evhttp_uri_parse` can return a nullptr, for example when the URI contains invalid characters (e.g. "%"). `GetQueryParameterFromUri` passes the output of `evhttp_uri_parse` straight into `evhttp_uri_get_query`, which means that anyone calling a REST endpoint in which query parameters are used (e.g. `rest_headers`) can cause a segfault. This bugfix is designed to be minimal and without additional behaviour change. Github-Pull: #27468 Rebased-From: 11422cc5720c8d73a87600de8fe8abb156db80dc
2023-04-17Don't return OutputType::UNKNOWN in ParseOutputTypePttn
Fixes https://github.com/bitcoin/bitcoin/issues/27472 Signed-off-by: Pttn <28868425+Pttn@users.noreply.github.com> Github-Pull: #27473 Rebased-From: 0d6383fda04a99726654945a737bbb1369e0e44a
2023-03-13qt: 24.1rc1 translations updateHennadii Stepanov
2023-02-27wallet, rpc: Update migratewallet help text for encrypted walletsAndrew Chow
Github-Pull: #26595 Rebased-From: 9486509be65f09174a0cb50a337cac58a0c09de4
2023-02-27wallet: Be able to unlock the wallet for migrationAndrew Chow
Since migration reloads the wallet, the wallet will always be locked unless the passphrase is given. migratewallet can now take the passphrase in order to unlock the wallet for migration. Github-Pull: #26595 Rebased-From: 7fd125b27d48e410509f3009e2eb9fa5cd6729dd
2023-02-27rpc: Allow users to specify wallet name for migratewalletAndrew Chow
Github-Pull: #26595 Rebased-From: 6bdbc5ff590de18dfb47c31190baad879f68fef7
2023-02-27wallet: Allow MigrateLegacyToDescriptor to take a wallet nameAndrew Chow
An overload of MigrateLegacyToDescriptor is added which takes the wallet name. The original that took a wallet pointer is still available, it just gets the name, closes the wallet, and calls the new overload. Github-Pull: #26595 Reabsed-From: dbfa34540372033d95036a02b7025ddd33f540aa
2023-02-27i2p: use consistent number of tunnels with i2pd and Java I2PVasil Dimov
The default number of tunnels in the Java implementation is 2 and in the C++ i2pd it is 5. Pick a mid-number (3) and explicitly set it in order to get a consistent behavior with both routers. Do this for persistent sessions which are created once at startup and can be used to open up to ~10 outbound connections and can accept up to ~125 incoming connections. Transient sessions already set number of tunnels to 1. Suggested in: https://github.com/bitcoin/bitcoin/issues/26754#issuecomment-1367356129 https://geti2p.net/en/docs/api/samv3 Alleviates: https://github.com/bitcoin/bitcoin/issues/26754 Github-Pull: #26837 Rebased-From: 3c1de032de01e551992975eb374465300a655f44
2023-02-27i2p: lower the number of tunnels for transient sessionsVasil Dimov
This will lower the load on the I2P network. Since we use one transient session for connecting to just one peer, a higher number of tunnels is unnecessary. This was suggested in: https://github.com/bitcoin/bitcoin/issues/26754#issuecomment-1365449401 https://github.com/bitcoin/bitcoin/issues/26754#issuecomment-1367356129 The options are documented in: https://geti2p.net/en/docs/protocol/i2cp#options A tunnel is unidirectional, so even if we make a single outbound connection we still need an inbound tunnel to receive the messages sent to us over that connection. Alleviates: https://github.com/bitcoin/bitcoin/issues/26754 Github-Pull: #26837 Rebased-From: 801b405f85b413631427c2d8cc1f8447309ea5d8
2023-02-27i2p: reuse created I2P sessions if not usedVasil Dimov
In the case of `i2pacceptincoming=0` we use transient addresses (destinations) for ourselves for each outbound connection. It may happen that we * create the session (and thus our address/destination too) * fail to connect to the particular peer (e.g. if they are offline) * dispose the unused session. This puts unnecessary load on the I2P network because session creation is not cheap. Is exaggerated if `onlynet=i2p` is used in which case we will be trying to connect to I2P peers more often. To help with this, save the created but unused sessions and pick them later instead of creating new ones. Alleviates: https://github.com/bitcoin/bitcoin/issues/26754 Github-Pull: #26837 Rebased-From: b906b64eb76643feaede1da5987a0c4d466c581b
2023-02-22wallet: reuse change dest when recreating TX with avoidpartialspendsMatthew Zipkin
Github-Pull: #27053 Rebased-From: 14b4921a91920df25b19ff420bfe2bff8c56f71e
2023-02-20Zero out wallet master key upon lockJohn Moffett
When an encrypted wallet is locked (for instance via the RPC `walletlock`), the docs indicate that the key is removed from memory. However, the vector (with a secure allocator) is merely cleared. This allows the key to persist indefinitely in memory. Instead, manually fill the bytes with zeroes before clearing. Github-Pull: #27080 Rebased-From: 3a11adc7004d21b3dfe028b190d83add31691c55
2023-02-20Correctly limit overview transaction listJohn Moffett
The way that the main overview page limits the number of transactions displayed (currently 5) is not an appropriate use of Qt. If it's run with a DEBUG build of Qt, it'll result in a segfault in certain relatively common situations. Instead of artificially limiting the rowCount() in the subclassed proxy filter, we hide/unhide the rows in the displaying QListView upon any changes in the sorted proxy filter. Github-Pull: bitcoin-core/gui/pull/704 Rebased-From: 08209c039ff4ca5be4982da7a2ab7a624117ce1a
2023-02-20Add missing includes to fix gcc-13 compile errorMarcoFalke
Github-Pull: #26924 Rebased-From: fadeb6b103cb441e0e91ef506ef29febabb10715
2023-02-20addrdb: Only call Serialize() onceMartin Zumsande
The previous logic would call it once for serializing into the filestream, and then again for serializing into the hasher. If AddrMan was changed in between these calls by another thread, the resulting peers.dat would be corrupt with non-matching checksum and data. Fix this by using HashedSourceWriter, which writes the data to the underlying stream and keeps track of the hash in one go. Github-Pull: #26909 Rebased-From: 5eabb61b2386d00e93e6bbb2f493a56d1b326ad9
2023-02-20hash: add HashedSourceWriterMartin Zumsande
This class is the counterpart to CHashVerifier, in that it writes data to an underlying source stream, while keeping a hash of the written data. Github-Pull: #26909 Rebased-From: da6c7aeca38e1d0ab5839a374c26af0504d603fc
2023-02-20For feebump, ignore abandoned descendant spendsJohn Moffett
To be eligible for fee-bumping, a transaction must not have any of its outputs (eg - change) spent in other unconfirmed transactions in the wallet. However, this check should not apply to abandoned transactions. A new test case is added to cover this case. Github-Pull: #26675 Rebased-From: f9ce0eadf4eb58d1e2207c27fabe69a5642482e7
2023-02-20wallet: Skip rescanning if wallet is more recent than tipAndrew Chow
If a wallet has key birthdates that are more recent than the currrent chain tip, or a bestblock height higher than the current tip, we should not attempt to rescan as there is nothing to scan for. Github-Pull: #26679 Rebased-From: 378400953424598fd78ccec5ba8cc38bc253c550
2023-02-20wallet: fully migrate address book entries for watchonly/solvable walletsSebastian Falbesoner
Currently `migratewallet` migrates the address book (i.e. labels and purposes) for watchonly and solvable wallets only in RAM, but doesn't persist them on disk. Fix this by adding another loop for both of the special wallet types after which writes the corresponding NAME and PURPOSE entries to the database in a single batch. Github-Pull: #26761 Rebased-From: d5f4ae7fac0bceb0c9ad939b9a4fbdb85da0bf95
2023-01-20Merge bitcoin/bitcoin#26457: [24.x] backport rpc: skip getpeerinfo for a ↵fanquake
peer without CNodeStateStats e72313e6b3fbf865e0eaa9aee0a555b7a7fe6850 rpc: Require NodeStateStats object in getpeerinfo (Martin Zumsande) Pull request description: Backports #26515. ACKs for top commit: fanquake: ACK e72313e6b3fbf865e0eaa9aee0a555b7a7fe6850 Tree-SHA512: 28e885ea299fe8a3a7538628d413c434bc42c251a2c1ae238bca0652709f5bd781eb157675171ab538f6e2f6f720f1c184200ac3857f6c78f48858949eed49da
2023-01-11rpc: Require NodeStateStats object in getpeerinfoMartin Zumsande
There is no situation in which CNodeStateStats could be missing for a legitimate reason - this can only happen if there is a race condition between peer disconnection and the getpeerinfo call, in which case the disconnected peer doesn't need to be included in the response. Github-Pull: bitcoin#26515 Rebased-From: 6fefd49
2022-12-21qt: Load PSBTs using istreambuf_iterator rather than istream_iteratorAndrew Chow
istream_iterator eats whitespace charactesr which causes parsing failures for PSBTs that contain the bytes corresponding to those characters. Github-Pull: bitcoin-core/gui#687 Rebased-From: bb5ea1d9a954b7b9f443ee8fbbb04549cd0b08a7
2022-12-05test: Coin Selection, duplicated preset inputs selectionfurszy
This exercises the bug inside CoinsResult::Erase that ends up on (1) a wallet crash or (2) a created and broadcasted tx that contains a reduced recipient's amount. This is covered by making the wallet selects the preset inputs twice during the coin selection process. Making the wallet think that the selection process result covers the entire tx target when it does not. It's actually creating a tx that sends more coins than what inputs are covering for. Which, combined with the SFFO option, makes the wallet incorrectly reduce the recipient's amount by the difference between the original target and the wrongly counted inputs. Which means, a created and relayed tx sending less coins to the destination than what the user inputted. Github-Pull: #26560 Rebased-From: cf793846978a8783c23b66ba6b4f3f30e83ff3eb
2022-12-05test: wallet, coverage for CoinsResult::Erase functionfurszy
Github-Pull: #26560 Rebased-From: 341ba7ffd8cdb56b4cde1f251768c3d2c2a9b4e9
2022-12-05wallet: bugfix, 'CoinsResult::Erase' is erasing only one output of the setfurszy
The loop break shouldn't have being there. Github-Pull: #26560 Rebased-From: f930aefff9690a1e830d897d0a8c53f4219ae4a8
2022-12-02[net processing] Assume that TxRelay::m_tx_inventory_to_send is empty pre-verackdergoegge
This commit documents our assumption about TxRelay::m_tx_inventory_to_send being empty prior to version handshake completion. The added Assume acts as testing oracle for our fuzzing tests to potentially detect if the assumption is violated. Github-Pull: #26569 Rebased-From: ce63fca13e9b500e9f687d80a457175ac967a371
2022-12-02[net processing] Ensure transaction announcements are only queued for fully ↵dergoegge
connected peers Github-Pull: #26569 Rebased-From: 845e3a34c49abcc634b5a10ccdd6b10fb4fcf449
2022-12-01wallet: Explicitly say migratewallet on encrypted wallets is unsupportedAndrew Chow
Github-Pull: #26594 Rebased-From: 5e65a216d1fd00c447757736d4f2899d235e731a
2022-12-01wallet: Avoid null pointer deref when cleaning up migratewalletAndrew Chow
If migratewallet fails, we do a cleanup which removes the watchonly and solvables wallets if they were created. However, if they were not, their pointers are nullptr and we don't check for that, which causes a segfault during the cleanup. So check that they aren't nullptr before cleaning them up. Github-Pull: #26594 Rebased-From: 86ef7b3c7be84e4183098f448c77ecc9ea7367ab
2022-11-17Fixes bitcoin#26490 by preventing notificationsJohn Moffett
MacOS 13 sends a window focus change notification after the main window has been destroyed but before the QTApplication has been destroyed. This results in the menu bar receiving a notification despite it no longer existing. The solution is to pass the main window as context when subscribing to the notifications. Qt automatically unsubscribes to notifications if the sender OR context is destroyed. Github-Pull: bitcoin-core/gui#680 Rebased-From: 8a5014cd8a05b3ab86ae34a47653a82ce11bdf17
2022-11-09qt: 24.0rc4 translations updateHennadii Stepanov
2022-11-07rpc: doc: add missing option "bech32m" for `change_type` parametersSebastian Falbesoner
Affects the help of the `fundrawtransaction`, `send` and `walletcratefundedpsbt` RPCs. Github-Pull: #26449 Rebased-From: c3b1fe59dbc7abe45973e282cddf3677514e220f
2022-11-04psbt: Include output pubkey in additional pubkeys to signAndrew Chow
In addition to the pubkeys in hd_keypaths and tap_bip32_keypaths, also see if the descriptor can produce a SigningProvider for the output pubkey. Also slightly refactors this area to reduce code duplication. Github-Pull: #26418 Rebased-From: 8781a1b6bbd0af3cfdf1421fd18de5432494619a
2022-11-04sign: Fill in taproot pubkey info for all script path sigsAndrew Chow
Taproot pubkey info was not being added for multi_a signing. The filling of this info is moved into the common function CreateTaprootScriptSig so that any signing of taproot scripts will include the pubkey info. Github-Pull: #26418 Rebased-From: 323890d0d7db2628f9dc6eaeba6e99ce0a12e1f5
2022-11-01Merge bitcoin/bitcoin#26434: [24.x] [gui] Bugfix: Check for readlink buffer ↵fanquake
overflow and handle gracefully e049fd76f0d57c1e6400fbfbaf4cc6ebe540f16f Bugfix: Check for readlink buffer overflow and handle gracefully (Luke Dashjr) Pull request description: Identical commit taken as-is from https://github.com/bitcoin/bitcoin/pull/25548 for backport ACKs for top commit: hebasto: ACK e049fd76f0d57c1e6400fbfbaf4cc6ebe540f16f Tree-SHA512: 37e63d570de898187c1bc8dd311c299c527adea51faa08aa6a3923bdb9390e3263902ace3d52a1cfc34ac2ba84e9358961574f886be1f64b5749a62e3c50ad57
2022-10-31Merge bitcoin/bitcoin#26410: [24.x] rc3 backportsfanquake
d5701900fcf70220701a1686588114db165dce1c rpc: make `address` field optional (w0xlt) e4b8c9b2bf2118064e68d33f6b7207e721ae03dd rpc: add non-regression test about deriveaddresses crash when index is 2147483647 (muxator) bf2bf73bcbc5277074f1211c20b71995a175c314 rpc: fix crash in deriveaddresses when derivation index is 2147483647 (muxator) b04f5f960893983400e07b96dbe9fe68383a21d2 test: Test for out of bounds vout in sendall (Andrew Chow) dedee6af572471b9beeebca9543934e788484b2e wallet: Check utxo prevout index out of bounds in sendall (Andrew Chow) 931db785ee6f5c34e0f053314bc8c70b01642b72 test: Test that sendall works with watchonly spending specific utxos (Andrew Chow) bbe864a13a2e5ce15674eda5c3760ee851120c63 wallet: Correctly check ismine for sendall (Andrew Chow) 4b7d30d026815dbe2330cd3e2edc044835a3eaed Adjust `.tx/config` for new Transifex CLI (Hennadii Stepanov) Pull request description: Backports: * https://github.com/bitcoin/bitcoin/pull/26321 * https://github.com/bitcoin/bitcoin/pull/26344 * https://github.com/bitcoin/bitcoin/pull/26275 * https://github.com/bitcoin/bitcoin/pull/26349 ACKs for top commit: instagibbs: ACK https://github.com/bitcoin/bitcoin/pull/26410/commits/d5701900fcf70220701a1686588114db165dce1c hebasto: ACK d5701900fcf70220701a1686588114db165dce1c, I've cherry-picked commits manually and got zero diff with this PR branch. Tree-SHA512: dad64f4074b4f06d666c0f2d804eda92df241bcce0a49c28486311a151f2e9d46b75e1bce02de570dcc85957c9ce936debb2a4faa045800c9757c6c495115d7c
2022-10-31Merge bitcoin/bitcoin#26379: qt: 24.0rc3 translations updatefanquake
33a61018b2e3618f5eb72b7c5aaf25f8d98762fc qt: 24.0rc3 translations update (Hennadii Stepanov) Pull request description: This PR pulls the recent translations from the [Transifex.com](https://www.transifex.com/bitcoin/bitcoin) using the [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) tool. According to our [Release Process docs](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-every-release-candidate), it is supposed to be merged (just) before `v24.0rc3` tagging. Will keep this PR updated regularly until merging. Top commit has no ACKs. Tree-SHA512: ab8c44961356333cb60e102f54852b9721fb0d4a9dbe719c049007f522218391e29898c698b7e142512f98d21ef4c6b500b00c6ce107600690421ab2ade1cc70
2022-10-30qt: 24.0rc3 translations updateHennadii Stepanov
2022-10-28rpc: make `address` field optionalw0xlt
Github-Pull: #26349 Rebased-From: eb679a7896ce00e322972a011b023661766923b9
2022-10-28rpc: fix crash in deriveaddresses when derivation index is 2147483647muxator
2147483647 is the maximum positive value of a signed int32, and - currently - the maximum value that the deriveaddresses bitcoin RPC call accepts as derivation index due to its input validation routines. Before this change, when the derivation index (and thus range_end) reached std::numeric_limits<int_32_t>::max(), the "i" variable in the for cycle (which is declared as int, and as such 32 bits in size on most platforms) would be incremented at the end of the first iteration and then warp back to -2147483648. This caused SIGABRT in bitcoind and a core dump. This change assigns "i" an explicit size of 64 bits on every platform, sidestepping the problem. Fixes #26274. Github-Pull: #26275 Rebased-From: addf9d6502db12cebcc5976df3111cac1a369b82
2022-10-28wallet: Check utxo prevout index out of bounds in sendallAndrew Chow
Github-Pull: #26344 Rebased-From: b132c85650afb2182f2e58e903f3d6f86fd3fb22
2022-10-28wallet: Correctly check ismine for sendallAndrew Chow
sendall should be using a bitwise AND for sendall's IsMine check rather than an equality as IsMine will never return ISMINE_ALL. Github-Pull: #26344 Rebased-From: 6bcd7e2a3b52f855db84cd23b5ee70d27be3434f
2022-10-24[net processing] Handle IsContinuationOfLowWorkHeadersSync return value ↵dergoegge
correctly when new headers sync is started
2022-10-13psbt: Only include m_tap_tree if it has scriptsAndrew Chow
Github-Pull: #25858 Rebased-From: 30ff25cf37eec4b09ab40424eb5d6a4a80410955