Commit Graph

22112 Commits

Author SHA1 Message Date
Odysseas Gabrielides
145a974a22
fix!: llmqTypeInstantSend deactivation prevention if used for other purposes (#4848) 2022-05-28 23:29:45 -05:00
Odysseas Gabrielides
228633a99c
fix!: Return FinalCommitment in qrinfo (instead of simply quorumHash) (#4850) 2022-05-28 23:29:33 -05:00
Odysseas Gabrielides
24ba5ce6ca
Adjusted keepOldConnections value for llmq_devnet (#4851) 2022-05-28 23:29:12 -05:00
Konstantin Akimov
e4dbd22532
docs/build: Kubuntu 22.04 build fix (#4843)
* Fix build of qtbase in contrib for Gcc 11.x

It adds a patch with missing include <limits> in qtbase/src/tools/moc/generator.cpp

* Merge bitcoin/bitcoin#23716: test: replace hashlib.ripemd160 with an own implementation

5b559dc7ecf37ab1604b75ec8ffe8436377a5fb1 Swap out hashlib.ripemd160 for own implementation (Pieter Wuille)
ad3e9e1f214d739e098c6ebbd300da5df1026a44 Add pure Python RIPEMD-160 (Pieter Wuille)

Pull request description:

  Closes #23710.

ACKs for top commit:
  jamesob:
    ACK 5b559dc7ec, pending CI

Tree-SHA512: dcd4ea2027eac572f7ab0da434b081b9a5d6b78675e559258a446b4d254b29d93c4d2cc12da4a28303543d6d99f5f2246fde4052e84af81d18e04399b137b39e

* Updates doc for Unix build: added missing dependency bison

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2022-05-28 23:27:04 -05:00
Odysseas Gabrielides
3fcfe3f176
fix!: Return FinalCommitment in qrinfo (instead of simply quorumHash) (#4850) 2022-05-28 11:37:20 -05:00
Odysseas Gabrielides
145fee358d
Adjusted keepOldConnections value for llmq_devnet (#4851) 2022-05-27 22:51:32 +03:00
Odysseas Gabrielides
acb1dd6179
fix!: llmqTypeInstantSend deactivation prevention if used for other purposes (#4848) 2022-05-26 23:16:13 +03:00
Konstantin Akimov
d8cc65bd4d
feat(qt): UI fixes for window "Wallet Repair" (#4846)
* Qt: fix layout of components on "Wallet Repair" window

* Qt: refactor ui xml config

It orders components accordingly their positions on windows and fixes space indentation
2022-05-25 10:12:40 -05:00
fanquake
0cb7934d88 Merge #17242: refactor: Remove unused cacheSigStore from CheckInputsFromMempooAndCache
0a433fc876d82df1005f175c1254fff62f0f36f8 [validation] Remove unused cacheSigStore from CheckInputsFromMempoolAndCache (John Newbery)

Pull request description:

  CheckInputsFromMempoolAndCache() is only called in one place, and
  cacheSigStore is set to true in that call site. Remove the argument
  entirely.

  Also improve commenting.

ACKs for top commit:
  MarcoFalke:
    unsigned ACK 0a433fc876d82df1005f175c1254fff62f0f36f8 Comment looks good
  jamesob:
    ACK 0a433fc876
  laanwj:
    ACK 0a433fc876d82df1005f175c1254fff62f0f36f8
  fanquake:
    ACK 0a433fc876d82df1005f175c1254fff62f0f36f8. Checked that `CheckInputsFromMempoolAndCache` is only called once, in `MemPoolAccept::ConsensusScriptChecks`, and that `cacheSigStore` is true.

Tree-SHA512: e4b4d2550e35df55c8f8fa4c539174cc2d3728112ddb937cb2ff759d8630a01566b5ec42a70a82e33994e6586f5a457a75a59f64b15d27c65331c723cbb097af
2022-05-23 02:23:02 -04:00
Wladimir J. van der Laan
1d1cca6fb0 Merge #17080: consensus: Explain why fCheckDuplicateInputs can not be skipped and remove it
fa928134075220254a15107c1d9702f4e66271f8 consensus: Explain why fCheckDuplicateInputs can not be skipped and remove it (MarcoFalke)

Pull request description:

  As a follow up to CVE-2018-17144, this removes the unused `fCheckDuplicateInputs` parameter and explains why the test can not be disabled. Apart from protecting against a dumb accident in the future, this should document the logic in the code. There is a technical write-up that explains how the underlying coins database behaves if this test is skipped: https://bitcoincore.org/en/2018/09/20/notice/#technical-details. However, it does not explicitly mention why the test can not be skipped. I hope my code comment does that.

ACKs for top commit:
  jnewbery:
    ACK fa928134075220254a15107c1d9702f4e66271f8
  amitiuttarwar:
    utACK fa928134075220254a15107c1d9702f4e66271f8
  Empact:
    Code review ACK fa92813407
  promag:
    ACK fa928134075220254a15107c1d9702f4e66271f8.

Tree-SHA512: fc1ef670f1a467c543b84f704b9bd8cc7a59a9f707be048bd9b4e85fe70830702aa560a880efa2c840bb43818ab44dfdc611104df04db2ddc14ff92f46bfb28e
2022-05-23 02:23:02 -04:00
MarcoFalke
22ae9fde91 Merge #14794: tests: Add AddressSanitizer (ASan) Travis build
6541d59ddc Add LSan suppression warnings (practicalswift)
ff7212ec32 Add ASan Travis build (practicalswift)
ebd3bf2590 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
2022-05-23 02:15:51 -04:00
Wladimir J. van der Laan
3dbc611e55 Merge #14993: rpc: Fix data race (UB) in InterruptRPC()
6c10037f72073eecc674c313580ef50a4f1e1e44 rpc: Fix data race (UB) in InterruptRPC() (practicalswift)

Pull request description:

  Fix data race (UB) in `InterruptRPC()`.

  Before:

  ```
  $ ./configure --with-sanitizers=thread
  $ make
  $ test/functional/test_runner.py feature_shutdown.py
  …
  SUMMARY: ThreadSanitizer: data race rpc/server.cpp:314 in InterruptRPC()
  …
  ALL                 | ✖ Failed  | 2 s (accumulated)
  ```

  After:

  ```
  $ ./configure --with-sanitizers=thread
  $ make
  $ test/functional/test_runner.py feature_shutdown.py
  …
  ALL                 | ✓ Passed  | 3 s (accumulated)
  ```

Tree-SHA512: b139ca1a0480258f8caa7730cabd7783a821d906630f51487750a6b15b7842675ed679747e1ff1bdade77d248807e9d77bae7bb88da54d1df84a179cd9b9b987
2022-05-23 02:15:51 -04:00
Wladimir J. van der Laan
15df1dcbe4 Merge #13966: gui: When private key is disabled, only show watch-only balance
82d6c5aad gui: Show watch-only eye instead of HD disabled (Chun Kuan Lee)
fe1ff5026 Hide spendable label if priveate key is disabled (Chun Kuan Lee)

Pull request description:

  If a wallet is in private key disabled mode, the spendable balance is always zero, it does not have to show on GUI. Show the watch-only balance at normal balance column if a wallet is in that mode.

  ![image](https://user-images.githubusercontent.com/11154118/45662527-dfaab400-bb34-11e8-98c8-c06ac5c0b08a.png)

Tree-SHA512: 8b535427d26d3f8e61081f50e4773bd25656be042d378fd34cf647e9a0065cb4dfb67a8ab9fb4fbf5f196390df8cb983ebf2f0fa8a6503b7c046c56bec87ba72
2022-05-23 02:15:51 -04:00
MarcoFalke
a557022252 Merge #14092: tests: Dry run bench_bitcoin as part "make check" to allow for quick identification of assertion/sanitizer failures in benchmarking code
dfef0df840 tests: Dry run bench_bitcoin (-evals=1 -scaling=0: <1 second running time) as part "make check" to allow for quick identification of assertion/sanitizer failures in benchmarking code (practicalswift)
00c6306a61 Remove RUN_BENCH logic (practicalswift)

Pull request description:

  Dry run `bench_bitcoin` (`-evals=1 -scaling=0`: <1 second running time) as part `make check` to allow for quick identification of assertion/sanitizer failures or crashes in benchmarking code.

  This is already tested in Travis but it is nice to have it locally too. The cost is near zero.

Tree-SHA512: 1f51b86b34bf97f75785f2694891d80f1bfb3e050211e6f6c35d8d9bc80c75bdebaa5ebfa51855ac0cf76d8773c3026bc576f60d0227afb0e646d728b83abde7
2022-05-23 02:15:41 -04:00
MarcoFalke
26d6ace1c2 Merge #14212: build: Remove libssl from LDADD unless gui
cccc362d62 build: Remove libssl from LDADD unless gui (MarcoFalke)

Pull request description:

  libssl is only used by the gui, so no need to LDADD it to the other tools and binaries

  Follow up of the commit which removed rpcssl: 40b556d374

Tree-SHA512: 9dbdf4faf40699cea3a37349ac83dbcacdaa062f5338416ff4ba77924c47d9e148b27218165c5aa3584a1ef4899e0fa237ff571208aa0b98803761e802d1e5dc
2022-05-23 02:15:41 -04:00
Wladimir J. van der Laan
d3d2d5fa17 Merge #15456: Enable PID file creation on WIN
3f5ad622e5fe0781a70bee9e3322b23c2352e956 Enable PID file creation on Windows - Add available WIN PID function - Consider WIN32 in each relevant case - Add new preprocessor definitions to suppress warning - Update error message for generic OS (riordant)

Pull request description:

  # Introduction

  As discussed with @laanwj on IRC:

  - PID file creation was never enabled for Windows, as the `pid_t` filetype is not available for it. However, the WIN32 API contains the header [`Processthreadsapi.h`](https://github.com/CodeShark/x86_64-w64-mingw32/blob/master/include/processthreadsapi.h) which in turn contains the function [`GetCurrentProcessId()`](https://docs.microsoft.com/en-gb/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getcurrentprocessid). ~~This function is called at a higher level by [`_getpid()`](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/getpid?view=vs-2017)~~ EDIT: `_getpid()` is not available to the MSVC compiler used in the AppVeyor build. As a result, I have changed the function call to`GetCurrentProcessId()`, which performs the same function and is available to both MinGW & MSVC.
  This allows one to capture the PID in Windows, without any additional includes - the above function is already available.

  - Within this PR, I have added a separate line that calls `GetCurrentProcessId()` in the case of a WIN compilation, and the usual `getpid()` otherwise. All code blocks processing PID file logic that avoid WIN32 have been changed to consider it. I have also updated the preprocessor definitions in `libbitcoin_server.vcxproj.in` to suppress a warning related to `std::strerror` for the MSVC build, that was causing the AppVeyor build to fail (see @fanquake comment below).

  # Rationale
  - Consistency between OS's running Bitcoin
      - Applications which build off of `bitcoind`, such as novel front-end clients, often need access to the PID in order to control the daemon. Instead of designing some alternate way of doing this for one system, it should be consistent between all of them.

  In collaboration with @joernroeder

Tree-SHA512: 22fcbf866e99115d12ed29716e68d200d4c118ae2f7b188b7705dc0cf5f0cd0ce5fb18f772744c6238eecd9e6d0922c615e2f0e12a7fe7c810062a79d97aa6a2
2022-05-23 02:15:41 -04:00
Wladimir J. van der Laan
8a62dfc196 Merge #15477: doc: Remove misleading hint in getrawtransaction
9999879f56c88ca2837f5d18e6688917ba96e9e2 refactor: Use RPCHelpMan::IsValidNumArgs in getrawtransaction (MarcoFalke)
fa9ff8fe212ae40a1ef4980455bf916bc044fee2 doc: Remove misleading hint in getrawtransaction (MarcoFalke)

Pull request description:

  For 0.18.0

  I asked this line to be added in #15159, which was wrong because getmempoolentry does not return the raw transaction hex.

Tree-SHA512: 7ac85500c8192314347b7283cd369196bb959c124863642b6c1ce73d5662b1cbe4f42ded9c374dac6657458ab70b01810caf1235dd1d2b404bf376ebf09efa69
2022-05-23 02:15:41 -04:00
Kittywhiskers Van Gogh
22934231dc merge bitcoin#19604: Pass mempool pointer to UnloadBlockIndex/GetCoinsCacheSizeState 2022-05-23 10:40:35 +05:30
Kittywhiskers Van Gogh
cbdc7e09ba merge bitcoin#19589: Avoid useless mempool query in gettxoutproof 2022-05-23 10:40:35 +05:30
Kittywhiskers Van Gogh
faaf840016 partial bitcoin#19204: Reduce inv traffic during IBD 2022-05-23 10:40:35 +05:30
Kittywhiskers Van Gogh
2fb3a9fbf5 merge bitcoin#18637: allow cache resize after init
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-05-23 10:39:43 +05:30
Kittywhiskers Van Gogh
c1ed4cbdae merge bitcoin#18615: Avoid accessing free'd memory in validation_chainstatemanager_tests 2022-05-23 10:39:43 +05:30
Kittywhiskers Van Gogh
35ee0b4b89 merge bitcoin#19323: Fix regression in *txoutset* in GUI console 2022-05-23 10:39:43 +05:30
Kittywhiskers Van Gogh
8b38752be3 merge bitcoin#19056: Make gettxoutsetinfo/GetUTXOStats interruptible 2022-05-23 10:39:43 +05:30
Kittywhiskers Van Gogh
0fbe1a2b95 merge bitcoin#18809: Do not advertise dumptxoutset as a way to flush the chainstate 2022-05-23 10:39:43 +05:30
Kittywhiskers Van Gogh
3ba8431900 merge bitcoin#16899: UTXO snapshot creation (dumptxoutset)
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-05-23 10:38:33 +05:30
PastaPastaPasta
22a24ab5b7
Merge pull request #4801 from kittywhiskers/deglobalization2
backport: bitcoin#18038, #14193, #17564, #17999, #18740, #19096, #16426, #17737, #18698: deglobalization backports (part 2)
2022-05-19 11:36:36 -05:00
UdjinM6
7e74de3d28
chore(qt): 19671 follow-up: drop zapwallettxes from gui (#4841) 2022-05-18 23:28:49 +03:00
UdjinM6
e66d539fa5
Merge pull request #4842 from PastaPastaPasta/v18-backports-rc4
[v18] chore: backports to v18 branch and bump version to rc4
2022-05-18 22:37:23 +03:00
pasta
905b32fffd chore: bump to rc4 2022-05-18 12:49:20 -05:00
Odysseas Gabrielides
414e40d29f fix!: incorrect CalcCbTxMerkleRootQuorums with rotation (#4833)
* Fix for CalcCbTxMerkleRootQuorums with rotation

* Added check for merkleRootQuorums in feature_llmq_rotation

* Correct logging

* Update test/functional/feature_llmq_rotation.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* Update test/functional/feature_llmq_rotation.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* lint: fix python linter

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: pasta <pasta@dashboost.org>
2022-05-18 12:48:15 -05:00
Odysseas Gabrielides
73cf7ff978
fix!: incorrect CalcCbTxMerkleRootQuorums with rotation (#4833)
* Fix for CalcCbTxMerkleRootQuorums with rotation

* Added check for merkleRootQuorums in feature_llmq_rotation

* Correct logging

* Update test/functional/feature_llmq_rotation.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* Update test/functional/feature_llmq_rotation.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* lint: fix python linter

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: pasta <pasta@dashboost.org>
2022-05-18 12:45:15 -05:00
UdjinM6
a3f4f57027 fix(qt): include upgradetohd into "no history" list (#4832) 2022-05-18 10:37:47 -05:00
UdjinM6
ab49fc938e wallet: Fix wallet autobackup on start (#4831)
19324 follow-up (merged via 4714) - `AutoBackupWallet()` call was unreachable.

NOTE: It's safe to call it after `Verify()` because 18918 backport moved salvage logic out of `Verify*()`.
2022-05-18 10:37:42 -05:00
UdjinM6
1ddddb0c1e mnsync: drop regtest-only "quick sync" mode (#4824) 2022-05-18 10:37:38 -05:00
UdjinM6
070ef357c0 wallet: fix metadata updates on HD derivation (#4819)
* wallet: Use temporary structure to update metadata correctly while generating new hd keys

* wallet: Make sure to never update an already existing key_origin while deriving hd keys
2022-05-18 10:37:33 -05:00
UdjinM6
1d2c9da931 Merge pull request #4817 from UdjinM6/drop_0
build: switch to classical `major.minor.patch` semver
2022-05-18 10:37:18 -05:00
strophy
72d53af11a ci: fix docker context (#4816) 2022-05-18 10:35:25 -05:00
Kittywhiskers Van Gogh
7f2cfaeadd rpc: remove remnant BlockIndex global invocations 2022-05-18 20:53:41 +05:30
Kittywhiskers Van Gogh
761305d44d merge bitcoin#18698: Make g_chainman internal to validation 2022-05-18 20:53:41 +05:30
Kittywhiskers Van Gogh
8b9e784a64 merge bitcoin#17737: Add ChainstateManager, remove BlockManager global
Co-authored-by: "UdjinM6 <UdjinM6@users.noreply.github.com>"
2022-05-18 20:53:40 +05:30
Kittywhiskers Van Gogh
f2300bc9cf merge bitcoin#16426: Reverse cs_main, cs_wallet lock order and reduce cs_main locking
Co-authored-by: "UdjinM6 <UdjinM6@users.noreply.github.com>"
2022-05-18 20:53:35 +05:30
Kittywhiskers Van Gogh
f8924cebb8 merge bitcoin#19096: Remove g_rpc_chain global 2022-05-18 20:50:50 +05:30
Kittywhiskers Van Gogh
1a65972c2e merge bitcoin#18740: Remove g_rpc_node global 2022-05-18 20:50:50 +05:30
Kittywhiskers Van Gogh
465ea129bc merge bitcoin#17564: Use mempool from node context instead of global 2022-05-18 20:49:34 +05:30
Kittywhiskers Van Gogh
a250f2c977 merge bitcoin#14193: Add missing mempool locks
Co-authored-by: "UdjinM6 <UdjinM6@users.noreply.github.com>"
2022-05-18 20:49:34 +05:30
Kittywhiskers Van Gogh
6390cae926 merge bitcoin#18038: Mempool tracks locally submitted transactions to improve wallet privacy 2022-05-18 20:49:34 +05:30
PastaPastaPasta
bb4be52b48
Merge pull request #4679 from Munkybooty/backports-0.19-pr12
backport: 0.19 pr12
2022-05-18 10:07:50 -05:00
UdjinM6
4612b04e20
Merge pull request #4821 from Munkybooty/backports-0.20
backport: v0.20 pr1
2022-05-17 23:12:48 +03:00
MarcoFalke
d601dab32d Merge #15988: Add test for ArgsManager::GetChainName
f6bb11fd37 Add test for ArgsManager::GetChainName (Russell Yanofsky)
4b331159df Add unit test NextString, ForEachNoDup functions (Russell Yanofsky)
05bfee3451 util_SettingsMerge test cleanup (Russell Yanofsky)

Pull request description:

  There was some test coverage previously, but it was limited and didn't test conflicting and negated arguments.

ACKs for commit f6bb11:
  MarcoFalke:
    re-utACK f6bb11fd37f8a2c985786b688ea07699ba75780e

Tree-SHA512: d03596614dc48584c7a9440117b107c6abb23fd4c7fa15fb4015351ec3de08b2656bc956ce05310663675672343d7a6aff35421657f29172080c7005045680b0
2022-05-17 12:58:23 -04:00