aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-24Merge bitcoin/bitcoin#26033: [23.x] Prevent data race for `pathHandlers`MacroFake
38d4601fe826069ee43b341e9d467beb7d14b5f0 Prevent data race for `pathHandlers` (Hennadii Stepanov) Pull request description: Backport of https://github.com/bitcoin/bitcoin/pull/25983 to the 23.x branch. ACKs for top commit: dergoegge: ACK 38d4601fe826069ee43b341e9d467beb7d14b5f0 Tree-SHA512: b235d6d2cb374baf1b54c09f4cd2feca7b6c1588d081532e987fd5def8ed0dee4b8255112b130a77aca633ec6a63cfd81f215b2e7a403c213eb6048a54774d26
2022-09-07Prevent data race for `pathHandlers`Hennadii Stepanov
Github-Pull: bitcoin/bitcoin#25983 Rebased-From: 4296dde28757d88a7076847484669fb202b47bc8
2022-08-12Disallow encryption of watchonly walletsAndrew Chow
Watchonly wallets do not have any private keys to encrypt. It does not make sense to encrypt such wallets, so disable the option to encrypt them. This avoids an assertion that can be hit when encrypting watchonly descriptor wallets. Github-Pull: bitcoin-core/gui#631 Rebased-From: 4c495413e138ec1dd6874e41b44e689f0c15e0e3
2022-06-22p2p: always set nTime for self-advertisementsMartin Zumsande
If we self-advertised to an inbound peer with the address they gave us, nTime was left default-initialized, so that our peer wouldn't relay it any further along. Github-Pull: #25314 Rebased-From: 99b9e5f3a9fa29bbc1e45fc958470fbcc207ef23
2022-06-09rpc: fix inappropriate warning for address type p2sh-segwit in ↵brunoerg
createmultisig and addmultisigaddress Github-Pull: #25220 Rebased-From: eaf6f630c0190c634b5f1c85f749437f4209cc36
2022-05-30Merge bitcoin/bitcoin#25241: [23.x] rpc: Capture potentially large UniValue ↵laanwj
by ref for rpcdoccheck 7fcac96597218691724002c2b8ecb3dbcf60bf06 rpc: Capture potentially large UniValue by ref for rpcdoccheck (Martin Zumsande) Pull request description: ACKs for top commit: fanquake: ACK 7fcac96597218691724002c2b8ecb3dbcf60bf06 Tree-SHA512: 7b60d35c84a47ff2b16aed06b4ea82ff3f60cc24409e2927b9ed618f8f939252903417ef93b711171e22b15daf5d857964687fde25ec554153337c996e5e27fa
2022-05-30rpc: Capture potentially large UniValue by ref for rpcdoccheckMartin Zumsande
Github-Pull: 25237 Rebased-From: 20ff4991e548630d7bb5e491fa4d69ec49369872
2022-04-14qt: 23.0rc5 translations updatelaanwj
Tree-SHA512: 86a246bf5a817084f077ace118edad16dc48d06ec8d39476d82d6d6c5010bde9ec91eec00d7bd9736fc3ecfd1b67629f06e38798d484e6a0f09768553a52a231
2022-04-08qt: 23.0rc4 translations updatelaanwj
Tree-SHA512: 1bf7ac70963fc6361b5cd117612355e6d4b1862721441003eb7b11f8366a706cb83d45a46533bfad421d7ea0dd12931b4e37881818eb0f0be845de19b823f98c
2022-04-08RPC: Switch getblockfrompeer back to standard param name blockhashLuke Dashjr
This commit partially reverts 923312fbf6a89efde1739da0b7209694d4f892ba. Github-Pull: #24806 Rebased-From: 88917f93cc01b5e881072b0e476b74d20b7673c4
2022-04-08Put lock logging behind DEBUG_LOCKCONTENTION preprocessor directiveJon Atack
Github-Pull: #24770 Rebased-From: 39a34b6877945908759f6a2322f60852e521e2ee
2022-04-01Merge bitcoin/bitcoin#24725: 23.0: rc4 backportMarcoFalke
1448c99380bbb83f2cf0410470e75049d0e0c627 wallet: Postpone NotifyWalletLoaded() for encrypted wallets (Hennadii Stepanov) 4f3ba8517a7e8c8f823617149d12e72cb32c8d0d wallet, refactor: Add wallet::NotifyWalletLoaded() function (Hennadii Stepanov) Pull request description: ACKs for top commit: Sjors: ACK 1448c99380bbb83f2cf0410470e75049d0e0c627 hebasto: ACK 1448c99380bbb83f2cf0410470e75049d0e0c627 jarolrod: ACK https://github.com/bitcoin/bitcoin/commit/1448c99380bbb83f2cf0410470e75049d0e0c627 Tree-SHA512: 84d908ff40f0048394f74499a9640904eb244bae975648221a883ab6ef6c5d5d7c178c17e5e420b565000c6d9cea26769fa9dd7c53ae10e32fa15748940ea796
2022-03-31wallet: Postpone NotifyWalletLoaded() for encrypted walletsHennadii Stepanov
Too early NotifyWalletLoaded() call in CWallet::Create() results the notification goes before DescriptorScriptPubKeyMans were created and added to an encrypted wallet. Co-authored-by: Andrew Chow <achow101-github@achow101.com> Github-Pull: bitcoin/bitcoin#24711 Rebased-From: 0c12f0116ca802f55f5ab43e6c4842ac403b9889
2022-03-31wallet, refactor: Add wallet::NotifyWalletLoaded() functionHennadii Stepanov
This change is a prerequisite for the following bugfix. Github-Pull: bitcoin/bitcoin#24711 Rebased-From: aeee419c6aae085cacd75343c1ce23486b2b8916
2022-03-31qt: 23.0rc3 translations updatelaanwj
Tree-SHA512: 110fab39faae351f10a9bb3a8a852d29f1e8e4bae27b790a52198fc39c5e1a2261c0fe8f0289f4c626e3d39f237c9410ae80f311bdcf446f778c680bc0fdc367
2022-03-31Merge bitcoin/bitcoin#24512: 23.x backportsfanquake
174af33d5d78cfe341b688f5393d9acc8c4aaf6b util: Add inotify_rm_watch to syscall sandbox (AllowFileSystem) (Hennadii Stepanov) ded10fe3eae2ad8058d0cc8f1cee1ad1d34bb507 build: Fix Boost.Process test for Boost 1.78 (Hennadii Stepanov) 26c2f23f36228e334d17c43a0cb61f76cc545c3d build: Fix Boost.Process detection on macOS arm64 (Hennadii Stepanov) 85f85c7e5fce1ac1682bf62808d37f3da23614f7 util: add linkat to syscall sandbox (AllowFileSystem) (fanquake) eaa04194b979635a3d8590a8409084159d1e6576 contrib: fix signet miner (sighash mismatch) (Sebastian Falbesoner) 235b04259414fd708c31bbe0cab28ba09bcd25f1 rpc: Exclude descriptor when address is excluded (MarcoFalke) b05a59b69fd51dd6a7ebc79dc0d11dc2af47a006 ci: Temporarily use clang-13 to work around clang-14 TSan bug (MarcoFalke) 65b966743c62914df7fd9b7f028f1f5bb3683eda doc, init: add links to doc/cjdns.md (Jon Atack) 7a553d4e657d52e2d15b53a4b54b4ca5ecde2f04 doc: update i2p.md with cjdns, improve local addresses section (Jon Atack) 4148396229db008419f895161b6c7310a44d563b doc: update tor.md with cjdns and getnodeaddresses, fix tor grep, (Jon Atack) 4690e8af1300daba276c7b426030d4c69d27d73b doc: create initial doc/cjdns.md for cjdns how-to documentation (Jon Atack) 5d24f612d1f7f5f1258216e3b7c569399c657abb Clarify in -maxtimeadjustment that only outbound peers influence time data (Jon Atack) b1646f1bb573031ca587081276d9fe7c4873b8c9 test: set segwit height back to 0 on regtest (Martin Zumsande) ef6a37b7c4b942f2db95809a299700e410b94460 rpc: rename getdeploymentinfo status-next to status_next (Jon Atack) 2a6fcf9c136f7a0c6ba12010ff1769acd07804cf init, doc: improve -onlynet help and tor/i2p documentation (Jon Atack) Pull request description: Backport the following to 23.x: - #24468 - #24528 - #24527 - #24609 - #24555 - #24663 - #24572 - #24636 - #24553 - #24659 - #24521 - #24523 - #24690 - #24710 Possibly also: - #24579 - #24691 ACKs for top commit: laanwj: List-of-commits ACK 174af33d5d78cfe341b688f5393d9acc8c4aaf6b, I think we should merge this and move forward with rc3.. hebasto: ACK 174af33d5d78cfe341b688f5393d9acc8c4aaf6b Tree-SHA512: 5a493e1652b780b527767d6ca9e67012abd2fa5573496e85e0d8aa4bed3eb332bfcd72610b8dfb954ff274d42450623233c96c479de2085b9c8344ba5abf1935
2022-03-31util: Add inotify_rm_watch to syscall sandbox (AllowFileSystem)Hennadii Stepanov
Github-Pull: bitcoin#24690 Rebased-From: f05a4cd
2022-03-31build: Fix Boost.Process test for Boost 1.78Hennadii Stepanov
Github-Pull: bitcoin#24523 Rebased-From: 532c64a
2022-03-31util: add linkat to syscall sandbox (AllowFileSystem)fanquake
Github-Pull: bitcoin#24659 Rebased-From: 9809db3
2022-03-31rpc: Exclude descriptor when address is excludedMarcoFalke
Github-Pull: bitcoin#24636 Rebased-From: faf37c2
2022-03-31doc, init: add links to doc/cjdns.mdJon Atack
Github-Pull: bitcoin#24663 Rebased-From: daae288
2022-03-28Clarify in -maxtimeadjustment that only outbound peers influence time dataJon Atack
Github-Pull: bitcoin#24609 Rebased-From: 1bba72d
2022-03-23options: flip listenonion to false if not listeningVasil Dimov
If the user has unchecked "Allow incoming connections" in `Settings->Options...->Network` then `fListen=false` is saved in `~/.config/Bitcoin/Bitcoin-Qt.conf`. This flips `-listen` to `false` during startup, but leaves `-listenonion` to `true`. This flipping of `-listen` is done in `OptionsModel::Init()` after `InitParameterInteraction()` has been executed which would have flipped `-listenonion`, should it have seen `-listen` being `false` (this is a difference between `bitcoind` and `bitcoin-qt`). Fixes: https://github.com/bitcoin-core/gui/issues/567 Github-Pull: bitcoin-core/gui#568 Rebased-From: 7f90dc26c8938f348938929b6d8bf1ea6f149209
2022-03-17gui: restore Send for external signerSjors Provoost
Before this change the send confirmation dialog would keep the Send option disabled. The Create Unsigned choice would actually send. This is potentially confusing. With this change the Create Unsigned button will not attempt to sign and always produce a PSBT. The Send button will attempt to sign, and only return a PSBT if more signatures are needed. When using an external signer, the Create Unsigned option only appears when PSBT controls are enabled in the wallet settings. This commit maintains the pre-existing behavior of filling the PSBT (without signing) even when not using an external signer. Closes #551 Co-authored-by: Jon Atack <jon@atack.com> Github-Pull: bitcoin-core/gui#555 Rebased-From: 2efdfb88aab6496dcf2b98e0de30635bc6bade85
2022-03-17refactor: helper function signWithExternalSigner()Sjors Provoost
Does not change behavior. Review hint: git show --color-moved --color-moved-ws=allow-indentation-change Github-Pull: bitcoin-core/gui#555 Rebased-From: 4b5a6cd14967b8ec3cb525e4cb18628de6c15091
2022-03-17move-only: helper function to present PSBTSjors Provoost
This commit does not change behavior. Review hint: git show --color-moved --color-moved-ws=allow-indentation-change Github-Pull: bitcoin-core/gui#555 Rebased-From: 026b5b4523317fdefc69cf5cec55f76f18ad0c0a
2022-03-13test: set segwit height back to 0 on regtestMartin Zumsande
This was changed in #22818 from 0 to 1. Since it changes BLOCK_OPT_WIT of the genesis block, older versions of bitcoin core would not read regtest directories created with newer versions without a reindex. Github-Pull: bitcoin#24527 Rebased-From: 5ce3057
2022-03-13rpc: rename getdeploymentinfo status-next to status_nextJon Atack
Github-Pull: bitcoin#24528 Rebased-From: 5d7c69b
2022-03-13init, doc: improve -onlynet help and tor/i2p documentationJon Atack
and harmonize them as follows - s/outgoing/automatic outbound/ - s/Incoming/Inbound and manual/ (are not affected by this option.) - s/only through network/only to network/ - s/this option. This option/this option. It/ - s/network types/networks/ and also pick up a few nits in doc/p2p-bad-ports.md Github-Pull: bitcoin#24468 Rebased-From: a1db99a
2022-03-09qt: Avoid crash on startup if int specified in settings.jsonRyan Ofsky
Fix GUI startup crash reported by Rspigler in https://github.com/bitcoin/bitcoin/issues/24457 that happens if settings.json contains an integer value for any of the configuration options which GUI settings can currently clash with (-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy, -proxy, -onion, -onion, -lang, and -prune). Fix is a one-line change in ArgsManager::GetArg. Github-Pull: bitcoin/bitcoin#24498 Rebased-From: 5b1aae12ca4a99c6b09349981a4902717a6a5d3e
2022-03-09test: Add tests for GetArg methods / settings.json type coercionRyan Ofsky
Just add tests. No changes to application behavior. Tests will be updated in the next commit changing & improving current behavior. Include a Qt test for GUI startup crash reported by Rspigler in https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg behavior that happens if settings.json contains an integer value for any of the configuration options which GUI settings can currently clash with (-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy, -proxy, -onion, -onion, -lang, and -prune). Github-Pull: bitcoin/bitcoin#24498 Rebased-From: 84b0973e35dae63cd1b60199b481e24d54e58c97
2022-03-03qt: Pull translations for 0.23rc1v23.0rc1laanwj
Tree-SHA512: 8366ebbb3603f3f021285f62df75996883458273b24db4e84ff56a3cb56b54cef474f640ea1f48ebc29dbde0593bd78256b9830555a288ba7e4a0a88e07f729e
2022-03-02net: only assume all local addresses if listening on anyVasil Dimov
If `-bind=` is provided then we would bind only to a particular address and should not add all the other addresses of the machine to the list of local addresses. Fixes https://github.com/bitcoin/bitcoin/issues/20184 (case 4.)
2022-03-02net: fix GetListenPort() to derive the proper portVasil Dimov
`GetListenPort()` uses a simple logic: "if `-port=P` is given, then we must be listening on `P`, otherwise we must be listening on `8333`". This is however not true if `-bind=` has been provided with `:port` part or if `-whitebind=` has been provided. Thus, extend `GetListenPort()` to return the port from `-bind=` or `-whitebind=`, if any. Fixes https://github.com/bitcoin/bitcoin/issues/20184 (cases 1. 2. 3. 5.)
2022-03-02net: pass Span by value to CaptureMessage()Vasil Dimov
Span is lightweight and need not be passed by const reference.
2022-03-02net: make CaptureMessage() mockableVasil Dimov
Rename `CaptureMessage()` to `CaptureMessageToFile()` and introduce a `std::function` variable called `CaptureMessage` whose value can be changed by unit tests, should they need to inspect message contents.
2022-03-02timedata: rename variables to match the coding styleVasil Dimov
Rename the local variables in `src/timedata.cpp`: `setKnown` -> `g_sources` `vTimeOffsets` -> `g_time_offsets` `fDone` -> `g_warning_emitted`
2022-03-02timedata: make it possible to reset the stateVasil Dimov
Add a new function `TestOnlyResetTimeData()` which would reset the internal state used by `GetTimeOffset()`, `GetAdjustedTime()` and `AddTimeData()`. This is needed so that unit tests that call `AddTimeData()` can restore the state in order not to confuse other tests that rely on it. Currently `timedata_tests/addtimedata` is the only test that modifies the state (via `AddTimeData()`) and also the only test that relies on that state.
2022-03-02Merge bitcoin/bitcoin#24375: Do not use `LocalTestingSetup` in getarg_tests ↵MarcoFalke
test file. 5d7f22595ff2de9b9883e468e3ce7182fc3f183b Do not use `LocalTestingSetup` in getarg_tests test file. (Kiminuo) Pull request description: Avoid using a test fixture in getarg_tests for better readability. Change was implemented by _kiminuo_ and posted https://github.com/bitcoin/bitcoin/pull/24306#issuecomment-1036643216 ACKs for top commit: kiminuo: ACK 5d7f22595ff2de9b9883e468e3ce7182fc3f183b Tree-SHA512: 0fd98622010e6923e91c66447a1d0861bf344a65d86a313dff7d428c089b1740a25f699327f6ed4c163255f270bcbd4f7be962bb551862214f9b9e395d40df04
2022-03-02Merge bitcoin/bitcoin#24165: p2p: extend inbound eviction protection by ↵laanwj
network to CJDNS peers b7be28cac50046b9f2ddfe63ecafccc80649a36c test: add combined CJDNS/I2P/localhost/onion eviction protection tests (Jon Atack) 0a1bb84770b403ab5cbd9d5474c76f91ce58e8f6 test: add tests for inbound eviction protection of CJDNS peers (Jon Atack) 0c00c0c981fc0b6cec101e68e8c1aeda1ccf33bb test: fix off-by-one logic in an eviction protection test (Jon Atack) f7b8094d611531c6b41a94715dbc01f56257ccd2 p2p: extend inbound eviction protection by network to CJDNS peers (Jon Atack) Pull request description: Extend inbound eviction protection for peers connected over CJDNS, as is the case for peers connected via onion, localhost, and I2P since #21261 and #20197. CJDNS peers seem to have better min ping latency than onion and I2P peers but still higher than that of unencrypted IPv4/6 peers and can be disadvantaged under our eviction criteria. They are also very few in number, which is a further reason to protect them, as the goal of this logic is to favorise the diversity of our peer connections. CJDNS support was added in #23077 for the upcoming v23 release. ACKs for top commit: laanwj: Concept and code review ACK b7be28cac50046b9f2ddfe63ecafccc80649a36c w0xlt: tACK b7be28c Tree-SHA512: 89ebdd217602e16ae14b9bd0d5a25fc09f9b2384c951f820bc0f5a6d8452bbc9042065db817d5d5296c0ad22988491a83fc5b9a611e660c40ebd4f03448c4061
2022-03-02Merge bitcoin/bitcoin#23304: wallet: Derive inactive HD chains in additional ↵laanwj
places c4d76c6faa3adf06f192649e169ca860ce420d30 tests: Tests for inactive HD chains (Andrew Chow) 8077862c5e8a3ed501f0baabc33536eb16922ceb wallet: Refactor TopUp to be able to top up inactive chains too (Andrew Chow) 70134eb34f58f0c572e7c3775e292d408f03b5ab wallet: Properly set hd chain counters when loading (Andrew Chow) 961b9e4e40019a87eaa11c8a9c3305870f7a6d75 wallet: Parse hdKeypath if key_origin is not available (Andrew Chow) 0652ee73ec880a66ec88bde007ee03c0b9d1b074 Add size check on meta.key_origin.path (Rob Fielding) Pull request description: Currently inactive HD chains are only derived from at the time a key in that chain is found to have been used. However, at that time, the wallet may not be able to derive keys (e.g. it is locked). Currently we would just move on and not derive any new keys, however this could result in missing funds. This PR resolves this problem by adding memory only variables to `CHDChain` which track the highest known index. `TopUp` is modified to always try to top up the inactive HD chains, and this process will use the new variables to determine how much to top up. In this way, after an encrypted wallet is unlocked, the inactive HD chains will be topped up and hopefully funds will not be missed. Note that because these variables are not persisted to disk (because `CHDChain`s for inactive HD chains are not written to disk), if an encrypted wallet is not unlocked in the same session as a key from an inactive chain is found to be used, then it will not be topped up later unless more keys are found. Additionally, wallets which do not have upgraded key metadata will not derive any keys from inactive HD chains. This is resolved by using the derivation path string in `CKeyMetadata.hdKeypath` to determine what indexes to derive. ACKs for top commit: laanwj: Code review ACK c4d76c6faa3adf06f192649e169ca860ce420d30 Tree-SHA512: b2b572ad7f1b1b2847edece09f7583543d63997e18ae32764e5a27ad608dd64b9bdb2d84ea27137894e986a8e82f047a3dba9c8015b74f5f179961911f0c4095
2022-03-02Merge bitcoin/bitcoin#23542: net: open p2p connections to nodes that listen ↵laanwj
on non-default ports 36ee76d1afbb278500fc8aa01606ec933b52c17d net: remove unused CNetAddr::GetHash() (Vasil Dimov) d0abce9a50dd4f507e3a30348eabffb7552471d5 net: include the port when deciding a relay destination (Vasil Dimov) 2e38a0e6865187d1f0d0f016d3df7cce414a7c4f net: add CServiceHash constructor so the caller can provide the salts (Vasil Dimov) 97208634b96f2d9a55f2ead7b0ef407da729d7bd net: open p2p connections to nodes that listen on non-default ports (Vasil Dimov) Pull request description: By default, for mainnet, the p2p listening port is 8333. Bitcoin Core has a strong preference for only connecting to nodes that listen on that port. Remove that preference because connections over clearnet that involve port 8333 make it easy to detect, analyze, block or divert Bitcoin p2p traffic before the connection is even established (at TCP SYN time). For further justification see the OP of: https://github.com/bitcoin/bitcoin/pull/23306 ACKs for top commit: laanwj: Concept and light code review ACK 36ee76d1afbb278500fc8aa01606ec933b52c17d prayank23: ACK https://github.com/bitcoin/bitcoin/pull/23542/commits/36ee76d1afbb278500fc8aa01606ec933b52c17d stickies-v: tACK 36ee76d1a jonatack: ACK 36ee76d1afbb278500fc8aa01606ec933b52c17d glozow: utACK 36ee76d1afbb278500fc8aa01606ec933b52c17d Tree-SHA512: 7f45ab7567c51c19fc50fabbaf84f0cc8883a8eef84272b76435c014c31d89144271d70dd387212cc1114213165d76b4d20a5ddb8dbc958fe7e74e6ddbd56d11
2022-03-01Merge bitcoin/bitcoin#22834: net: respect -onlynet= when making outbound ↵laanwj
connections 0eea83a85ec6b215d44facc2b16ee1b035275a6b scripted-diff: rename `proxyType` to `Proxy` (Vasil Dimov) e53a8505dbb6f9deaae8ac82793a4fb760a1e0a6 net: respect -onlynet= when making outbound connections (Vasil Dimov) Pull request description: Do not make outbound connections to hosts which belong to a network which is restricted by `-onlynet`. This applies to hosts that are automatically chosen to connect to and to anchors. This does not apply to hosts given to `-connect`, `-addnode`, `addnode` RPC, dns seeds, `-seednode`. Fixes https://github.com/bitcoin/bitcoin/issues/13378 Fixes https://github.com/bitcoin/bitcoin/issues/22647 Supersedes https://github.com/bitcoin/bitcoin/pull/22651 ACKs for top commit: naumenkogs: utACK 0eea83a85ec6b215d44facc2b16ee1b035275a6b prayank23: reACK https://github.com/bitcoin/bitcoin/pull/22834/commits/0eea83a85ec6b215d44facc2b16ee1b035275a6b jonatack: ACK 0eea83a85ec6b215d44facc2b16ee1b035275a6b code review, rebased to master, debug built, and did some manual testing with various config options on signet Tree-SHA512: 37d68b449dd6d2715843fc84d85f48fa2508be40ea105a7f4a28443b318d0b6bd39e3b2ca2a6186f2913836adf08d91038a8b142928e1282130f39ac81aa741b
2022-02-28qt: Pre-branch translation updates for 23.xlaanwj
Pull the translations from transifex once before the 23.x branch-off, so that master has at least somewhat-relevant translations.
2022-02-28Merge bitcoin/bitcoin#24365: wallet: Don't generate keys for wallets with ↵laanwj
private keys disabled during upgradewallet c7376cc8d728f3a7c40f79bd57e7cef685def723 tests: Test upgrading wallet with privkeys disabled (Andrew Chow) 3d985d4f43b5344f998bcf6db22d02782e647a2a wallet: Don't generate keys when privkeys disabled when upgrading (Andrew Chow) Pull request description: When we're upgrading a wallet, we shouldn't be trying to generate new keys for wallets where private keys are disabled. Fixes #23610 ACKs for top commit: laanwj: Code review ACK c7376cc8d728f3a7c40f79bd57e7cef685def723 benthecarman: tACK c7376cc8d728f3a7c40f79bd57e7cef685def723 this fixed the issue for me Tree-SHA512: fa07cf37df9196ff98671bb1ce5c9aa0bab46495066b4dab796d7e8e5d5c7adb414ff56adae4fd3e15658a610995bd19a9e1edb00c46144b0df635c5b343f3a6
2022-02-28Merge bitcoin/bitcoin#24403: Avoid implicit-integer-sign-change in ↵MarcoFalke
VerifyLoadedChainstate fa7991601c93761bc12ef33b672a927d48a95569 Fixup style of VerifyDB (MarcoFalke) fa462ea787d124c56d6ba7ef79a9b5b23f0411c5 Avoid implicit-integer-sign-change in VerifyLoadedChainstate (MarcoFalke) Pull request description: This happens when checking all blocks (`-1`). To test: ``` ./configure CC=clang CXX=clang++ --with-sanitizers=undefined,integer make UBSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" ./test/functional/rpc_blockchain.py ACKs for top commit: theStack: Code-review ACK fa7991601c93761bc12ef33b672a927d48a95569 brunoerg: crACK fa7991601c93761bc12ef33b672a927d48a95569 Tree-SHA512: bcbe6becf2fbedd21bbde83a544122e79465937346802039532143b2e4165784905a8852c0ccb088b964874df5e5550931fdde3629cbcee3ae237f2f63c43a8e
2022-02-28Merge bitcoin/bitcoin#24417: net: Update hardcoded seeds for 23.xfanquake
d80dc12097ee2f16e3edfcf39363cc4d240e5c57 net: Update hardcoded seeds for 23.x (laanwj) 9f27157894ee689736d0d0936d1af1620fd8f7d8 contrib: make-seeds updates for 23.x (laanwj) Pull request description: Update hardcoded P2P network seeds for 23.x, and update the generation script and documentation as necessary Tool output: ``` IPv4 IPv6 Onion Pass 469910 72944 0 Initial 469910 72944 0 Skip entries with invalid address 469910 72944 0 After removing duplicates 469909 72944 0 Skip entries from suspicious hosts 165760 65113 0 Enforce minimal number of blocks 160668 63183 0 Require service bit 1 4951 1376 0 Require minimum uptime 4406 1051 0 Require a known and recent user agent 4307 1031 0 Filter out hosts with multiple bitcoin ports ERR: Could not resolve ASN for "2001:678:7dc:8::2": The DNS query name does not exist: 8.0.0.0.c.d.7.0.8.7.6.0.1.0.0.2.origin6.asn.cymru.com. 512 134 0 Look up ASNs and limit results per ASN and per net ```. ACKs for top commit: achow101: ACK d80dc12097ee2f16e3edfcf39363cc4d240e5c57 jonatack: ACK d80dc12097ee2f16e3edfcf39363cc4d240e5c57 reviewed the changes and ran the README steps Tree-SHA512: c651b0501cc28d397cc0778eff6aed4273669082d6ef207ce58ce198b443be66532bf1e8d618ccae3ba671ae4cccfd9b4dd2dfebacc97f3c3bd4e9fa58a3d7a3
2022-02-28Merge bitcoin/bitcoin#24418: Chainparams update for 23.xMarcoFalke
dca693e08e66279c5497cb3d30285ed41ae6983c Update nMinimumChainWork, defaultAssumeValid for 23.x (laanwj) 85e71a3baab613eab059c99485bf04c2ab2ce621 Update chainTxData for 23.x (laanwj) 37282dcf789fac0bcc4c3445ac9deec33797bb93 Update m_assumed_* chain parameters for 23.x (laanwj) Pull request description: Update chain parameters for upcoming major release. See [doc/release-process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md) for review instructions. - `m_assumed_blockchain_size`, `m_assumed_chain_state_size`: ``` bitcoin$ du -h . 105M ./blocks/index 415G ./blocks 4.5G ./chainstate 420G . bitcoin$ python3 Python 3.9.10 (main, Jan 16 2022, 17:12:18) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 420 * 1.1 462.00000000000006 >>> 5 * 1.1 5.5 ``` - `chainTxData`: ``` cli getchaintxstats 4096 000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091 { "time": 1645542140, "txcount": 712531200, "window_final_block_hash": "000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091", "window_final_block_height": 724466, "window_block_count": 4096, "window_tx_count": 6950257, "window_interval": 2404071, "txrate": 2.891036496010309 } ``` - `nMinimumChainWork`, `defaultAssumeValid`: ``` $ cli getblockhash 724466 # was two from the tip at the time 000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091 $ cli getblockheader 000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091 { "hash": "000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091", "confirmations": 3, "height": 724466, "version": 939515908, "versionHex": "37ffe004", "merkleroot": "35a08d9647972e7c3ec39ee7f4ab434f03445de7c446a4d1acc1254b4546bbbe", "time": 1645542140, "mediantime": 1645539567, "nonce": 188699556, "bits": "170a1078", "difficulty": 27967152532434.23, "chainwork": "00000000000000000000000000000000000000002927cdceccbd5209e81e80db", "nTx": 1948, "previousblockhash": "000000000000000000075e26c23c2ecec4e34699411ccd712ff6f2d252f65a78", "nextblockhash": "0000000000000000000905369cd69f68323e3e8da2933a78bea0b2cdb8baa89f" } ``` ACKs for top commit: Sjors: ACK dca693e08e66279c5497cb3d30285ed41ae6983c achow101: ACK dca693e08e66279c5497cb3d30285ed41ae6983c prayank23: ACK https://github.com/bitcoin/bitcoin/pull/24418/commits/dca693e08e66279c5497cb3d30285ed41ae6983c darosior: ACK dca693e08e66279c5497cb3d30285ed41ae6983c -- only checked mainnet (on muliple nodes). Didn't do a reindex. Tree-SHA512: 6d5d59f00717fce5f7ce10ec8d59f806ef11b0af21440cec112f70c8e13ebb884ba6c70e744e691fcc31fe7aec7aae968268c9207ccc820d64fdf7e7f98f0cff
2022-02-27fuzz: FuzzedFileProvider::write should not return negative valueeugene
Doing so can lead to a glibc crash. Also the manpage for fopencookie warns against this: https://man7.org/linux/man-pages/man3/fopencookie.3.html