Commit Graph

21759 Commits

Author SHA1 Message Date
MarcoFalke
f27bb545e7 Merge #17327: test: add rpc_fundrawtransaction logging
ff22751417c6fbbd22f4eefd0e23431a83335c13 test: rm ascii art in rpc_fundrawtransaction (Jon Atack)
94fcc08541cf58bee864ab7c28a6c77e42472f17 test: add rpc_fundrawtransaction logging (Jon Atack)

Pull request description:

  `test/functional/rpc_fundrawtransaction.py` is fairly slow to run and has no logging, so it can appear to be stalled.

  This commit adds info logging at each test to provide feedback on the test run.

ACKs for top commit:
  instagibbs:
    utACK ff22751417
  jnewbery:
    tACK ff22751417c6fbbd22f4eefd0e23431a83335c13

Tree-SHA512: f4fabad8ef51c29981351bb4e66fb0c0e0517418a4a15892ef804df11d16b2d2ae1a1abc958d2b121819850278de90a2003b0edb8d7098d00360b89fa76e9062
2022-05-31 12:06:32 -04:00
Wladimir J. van der Laan
37ef9bb465 Merge #17282: contrib: remove accounts from bash completion
dd94cc46e4377b14515be24894fd1cb42e233151 contrib: remove accounts from bash completion (fanquake)

Pull request description:

  Also removes `setgenerate`.

ACKs for top commit:
  jonasschnelli:
    utACK dd94cc46e4377b14515be24894fd1cb42e233151

Tree-SHA512: 218aa06841f4a347bb083c7f408c07fe80df7a30f7ce7a1126ec95971a9b66aff7c3c049d269da2c15f629bbde80e8c303bf6562bd5c1a36a6f6fd61ce9133e2
2022-05-31 12:06:32 -04:00
UdjinM6
edc8621619
Merge pull request #4820 from Munkybooty/misc-backports-18
backport: Misc backports 18
2022-05-30 19:35:27 +03:00
UdjinM6
c20c40fab4
chore(tests): Create/destroy g_txindex in TestChainSetup (#4855) 2022-05-30 19:29:52 +03:00
Wladimir J. van der Laan
0e68ae560e Merge #17648: doc: rename wallet-tool references to bitcoin-wallet
e7ad4a2f8c07a82d6424b473f0d51dbd8f897b10 doc: rename wallet-tool references to bitcoin-wallet (Wilson Ccasihue S)

Pull request description:

  Fix. text reference to executable bitcoin-wallet instead of wallet-tool, there is not a wallet-tool at bin/ folder.

ACKs for top commit:
  fanquake:
    ACK e7ad4a2f8c07a82d6424b473f0d51dbd8f897b10 - thanks for following up.

Tree-SHA512: aed41b08947728a4ff3a97a62858ee7c86e2e5d57dcbbd0aab492dae3d8a548bb60541924e68cf3a0aa3d53d7db0012b489462b466919cd83f05b2aa88b7fff7
2022-05-30 19:09:39 +07:00
Konstantin Akimov
3511d69609 qt: adds more setPlaceholderText by form .ui instead code aproach 2022-05-30 19:09:39 +07:00
MarcoFalke
e043d4b98b Merge #17702: gui: Move static placeholder texts to forms
a652dc5521e2caf5734ffb797c7f2fc80685fef1 qt: Normalize placeholder to avoid using "address book" in sendcoinsentry (Wladimir J. van der Laan)
67f36e0b2ce0f99b90578e7e1dd9e0624026bcfa gui: Move static placeholder texts to forms (Wladimir J. van der Laan)

Pull request description:

  There was an issue around the time of Qt 4.6 when placeholder text was introduced, that caused a compile failure when it was specified in the form.

  As a workaround the placeholder texts were moved to the code.

  Qt 4 hasn't been relevant to us for ages. So move all (non-parametrized) placeholder texts to the form files instead.

  It's better to keep this kind of text content together. Translate/no-translate status is kept as it is.

  Proof that they still work:
  ![win1](https://user-images.githubusercontent.com/126646/70428014-0e80b300-1a76-11ea-9a6d-be78a0bf14ed.png)

  ![win2](https://user-images.githubusercontent.com/126646/70428019-10e30d00-1a76-11ea-8016-ffa0c4eafe34.png)

  ![win3](https://user-images.githubusercontent.com/126646/70428021-13456700-1a76-11ea-9449-9413487e39f6.png)

  ![win4](https://user-images.githubusercontent.com/126646/70428025-150f2a80-1a76-11ea-92ad-be5f3c171c43.png)

ACKs for top commit:
  hebasto:
    Re-ACK a652dc5521e2caf5734ffb797c7f2fc80685fef1, `tooltip` and `placeholderText` are identical now.
  MarcoFalke:
    ACK a652dc5521e2caf5734ffb797c7f2fc80685fef1 🚿
  fanquake:
    ACK a652dc5521e2caf5734ffb797c7f2fc80685fef1 - checked that placeholder text still appears.

Tree-SHA512: 7d3c1faeef2eb5d4b195d9d78f2a3f161296d869e5059b5e8d308167e3c6c668a3ebabec93dc592762ba15bfc86d51985e20c4e17f1065c8dce84fec036ff5ee
2022-05-30 19:09:39 +07:00
fanquake
4c1477c7b3 Merge #17694: ui: disable 3rd-party tx-urls when wallet disabled
48a5c92f9ef6634375a3f52812cf3d511c37699d ui: disable 3rd-party tx-urls when wallet disabled (Harris)

Pull request description:

  This PR closes #17683 by removing 3rd-party Url-Label and -TextBox from Display Options in wallet-disabled mode.

ACKs for top commit:
  laanwj:
    Code review ACK 48a5c92f9ef6634375a3f52812cf3d511c37699d
  fanquake:
    ACK 48a5c92f9ef6634375a3f52812cf3d511c37699d - tested with and without wallet (compiled out and `-disablewallet`).

Tree-SHA512: 3cc89825409fc0a3eec501c4dab5ff1caaa4ce410746a4b6ab200222fff986f4483eab90cda53a98a144be6acf1b6ca8650ab18242c39446f3335b3a9a537066
2022-05-30 19:09:39 +07:00
MarcoFalke
f1995b6ef9 Merge #17647: lcov: filter depends from coverage reports
f736f6920b160c9e7d7072500ddd0459c5181f86 lcov: filter /usr/lib64 from coverage report (nijynot)
a5a705b46dd32f93857e916311e3b71cae8be6b7 lcov: filter depends from coverage report (nijynot)

Pull request description:

  If you build the binaries with the `depends` folder and then generate coverage reports with `make cov`, `depends` will be included in the coverage reports. Coverage of the dependencies are not that interesting and should be filtered.

ACKs for top commit:
  laanwj:
    code review ACK f736f6920b160c9e7d7072500ddd0459c5181f86
  MarcoFalke:
    ACK f736f6920b160c9e7d7072500ddd0459c5181f86 🐇

Tree-SHA512: 57c3e09f32e71523afff6ddc4f92bc35ab7b783f26f7a7380ae7556222954111cccce4c6dbc99305c424818f91e15bf5fe3532a7dca1daaa8ad71315d1dd857c
2022-05-30 19:09:39 +07:00
Wladimir J. van der Laan
7b0981e210 Merge #17699: Make env data logging optional
0ccad08fb25e00fcf41ffbad6ce2501e363a0033 Make env data logging optional (Pieter Wuille)

Pull request description:

  The dynamic env feeding logging is a bit chatty, make it dependent on `-debug=rand`.

ACKs for top commit:
  practicalswift:
    ACK 0ccad08fb25e00fcf41ffbad6ce2501e363a0033 -- less noise is good and diff looks correct
  laanwj:
    ACK 0ccad08fb25e00fcf41ffbad6ce2501e363a0033
  promag:
    ACK 0ccad08fb25e00fcf41ffbad6ce2501e363a0033.
  jonatack:
    ACK 0ccad08fb25e00fcf41ffbad6ce2501e363a0033, was considering to propose this.

Tree-SHA512: 01d7f9ac134852c2c0d5f66f96ee4395f0ff7a60573e648f3d01054073624042148c8e8b9f69a29c9a41c296e1f4be77c2015a642ee4113a2fd8779b62aa137d
2022-05-30 19:09:39 +07:00
MarcoFalke
166be67407 Merge #17685: tests: Fix bug in the descriptor parsing fuzzing harness (descriptor_parse)
6338c0203416a5f86e9422b6cd479da8af277f2f tests: Fix fuzzing harness for descriptor parsing (descriptor_parse) (practicalswift)

Pull request description:

  Fix bug in the descriptor parsing fuzzing harness (`descriptor_parse`) by making sure `secp256k1_context_verify` is properly initialized (via `ECCVerifyHandle`).

  Background:

  When fuzzing `Parse(…)` with `libFuzzer` I eventually reached the test case `combo(020000000000000000000000000000000000000000000000000000000000000000)`. That input triggers a call to `CPubKey::IsFullyValid()` which in turns requires an initialized `secp256k1_context_verify`.

  The fuzzing harness did not fulfil that pre-condition prior to this commit (sorry, my fault!) :)

  Before:

  ```
  $ mkdir descriptors/
  $ echo -n 'combo(020000000000000000000000000000000000000000000000000000000000000000)' > descriptors/input
  $ UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1" src/test/fuzz/descriptor_parse -runs=1 descriptors/
  …
  pubkey.cpp:210:38: runtime error: null pointer passed as argument 1, which is declared to never be null
  secp256k1/include/secp256k1.h:305:3: note: nonnull attribute specified here
      #0 0x561c032ccf25 in CPubKey::IsFullyValid() const src/pubkey.cpp:210:12
      #1 0x561c022139c3 in (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) src/script/descriptor.cpp:674:24
      #2 0x561c02207680 in (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) src/script/descriptor.cpp:730:42
      #3 0x561c0220080e in (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) src/script/descriptor.cpp:774:23
      #4 0x561c021ffb07 in Parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FlatSigningProvider&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool) src/script/descriptor.cpp:994:16
      #5 0x561c0218d5d4 in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/descriptor_parse.cpp:20:9
  …
  $
  ```

  After:

  ```
  $ mkdir descriptors/
  $ echo -n 'combo(020000000000000000000000000000000000000000000000000000000000000000)' > descriptors/input
  $ UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1" src/test/fuzz/descriptor_parse -runs=1 descriptors/
  …
  Done 2 runs in 0 second(s)
  $
  ```

ACKs for top commit:
  paymog:
    ACK 6338c0203416a5f86e9422b6cd479da8af277f2f
  MarcoFalke:
    ACK 6338c0203416a5f86e9422b6cd479da8af277f2f 🕊

Tree-SHA512: bf24c404e1f64183761b057d2f210c3db85277f4415122977c315d7d6835acb5e897b5d64032615e9e44ad4a16dfe857e94481f6e4b57b6dfa8cb37adb2528a5
2022-05-30 19:09:39 +07:00
Wladimir J. van der Laan
6ae64262a8 Merge #17658: depends: add ability to skip building qrencode
c8becb82805ed1483e009eba682f19fe9e8b8c9c depends: add ability to skip building qrencode (fanquake)

Pull request description:

  Similar to other depends packages, add the ability to skip building `qrencode` by passing `NO_QR=1`. Same as #16089.

ACKs for top commit:
  promag:
    ACK c8becb82805ed1483e009eba682f19fe9e8b8c9c.
  hebasto:
    ACK c8becb82805ed1483e009eba682f19fe9e8b8c9c, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 86c7a87a31b1b2e65be2b79f533ce49f8b0074cf31331411cb3d32bb542d0b99e69605482ad75e4d1be5f2c8c613f17ba9ff17195a6b48f45365f5eb35df8bf9
2022-05-30 19:09:39 +07:00
fanquake
00fbb89b10 Merge #17650: util: remove unwanted fields from bitcoin-cli -getinfo
01c87015597021bf1c0856f7f6be175bdde844b2 util: remove unwanted fields from bitcoin-cli -getinfo (malevolent)

Pull request description:

  Removed the following fields from -getinfo: protocolversion, walletversion and keypoololdest. This change closes #17314 .

ACKs for top commit:
  laanwj:
    ACK 01c87015597021bf1c0856f7f6be175bdde844b2
  achow101:
    ACK 01c87015597021bf1c0856f7f6be175bdde844b2
  practicalswift:
    ACK 01c87015597021bf1c0856f7f6be175bdde844b2 -- diff looks correct

Tree-SHA512: c98f2e8a3fee04d46766f70cb88f4e49e892a4424eff8940a7d48e9e808597b702427225788f984f5c3641591fd8d86acee56774afde1d57a4259c31d971ea08
2022-05-30 19:09:39 +07:00
MarcoFalke
c5c5b520cb Merge #17670: Move events_hasher into RNGState()
8bda0960f94dfb6462fc810cd61a8a065730eb79 Move events_hasher into RNGState() (Pieter Wuille)

Pull request description:

  This moves `events_hasher` and `events_mutex` into `RNGState()` in random.cpp. This guarantees (through the existing `GetRNGState()` function) that the mutex is always created before any events are added, even when that happens inside global initializers.

  Fixes the issue reported here: https://github.com/bitcoin/bitcoin/pull/17573#issuecomment-561828251, and includes the annotation from #17666).

ACKs for top commit:
  MarcoFalke:
    re-ACK 8bda0960f94dfb6462fc810cd61a8a065730eb79 🥈
  sipsorcery:
    re-ACK 8bda0960f94dfb6462fc810cd61a8a065730eb79.

Tree-SHA512: 78702d668764df19e9d61d87d82eca71cceca87d5351b740e13e732a1c18a3d53d7fbaaf63245266da597370bfebec9fa6a4749c15ec5a78dcfe6122c33553ed
2022-05-30 19:09:39 +07:00
Wladimir J. van der Laan
3c9bf2e02b Merge #17573: Seed RNG with precision timestamps on receipt of net messages.
02d8c56a18b9a2960888d6ec1209955105bae847 Seed RNG with precision timestamps on receipt of net messages. (Matt Corallo)

Pull request description:

  See title. Exposes a generic dead-simple "SeedEvent" interface, but currently just used for net messages.

ACKs for top commit:
  sipa:
    utACK 02d8c56a18
  laanwj:
    ACK 02d8c56a18b9a2960888d6ec1209955105bae847
  meshcollider:
    utACK 02d8c56a18b9a2960888d6ec1209955105bae847

Tree-SHA512: 28eb39a201ee2b13393c5c64dbf7c1913f3482f095969ef5141bfe549ce77dd63bb5f14738f6eedb296c686ea36014aa157b9c5e8059710a318590f30e9caa14
2022-05-30 19:09:39 +07:00
MarcoFalke
910dc0c2a6 Merge #14653: rpcwallet: Add missing transaction categories to rpc helptexts
f3f6dde56e Test coinbase category in wallet rpcs (andrewtoth)
e982f0b682 Add all category options to wallet rpc help (andrewtoth)

Pull request description:

  The current helptext for `listtransactions`, `listsinceblock` and `gettransaction` only list two of the five possible options for `category`. This incorrectly implies that these are the only two options, and can cause problems if the other three options aren't accounted for. Also, some of the documentation is incorrect when specifying which options are returned for which categories.

  This PR updates the helptext for these RPCs and adds a functional regression test for the cases when the other three categories are returned.

Tree-SHA512: 67dd7ff6269a3b0f17f5d1a61b0ae1fb1f3778f05e1c440bfbb9b3a005c9c6d740abcace20f3d597cf2bd6779c494448690f13fab0bd2340f206213bc7890b51
2022-05-30 01:11:05 -04:00
MarcoFalke
26ea934aef Merge #14829: travis: Enable functional tests in the ThreadSanitizer (TSan) build job
eaf4070e3a Add suppression for InterruptRPC (fRPCRunning) data race (practicalswift)
5e5138a721 travis: Use trap and set -e errtrace (Chun Kuan Lee)
069752b726 build: Enable functional tests in the ThreadSanitizer (TSan) build job (practicalswift)

Pull request description:

  Enable functional tests in the ThreadSanitizer (TSan) build job.

  This is a follow-up to @MarcoFalke's #14764 which added TSan but for unit tests only.

Tree-SHA512: dcc24d311fa124772c3036b16c2bf94732ece36c3e22b4bb8fe941772e52157ab2b1a90b1880b81079c2eef2d344ca7e1da58324b75dbf82d16204d591ad49fb
2022-05-30 01:11:05 -04:00
MeshCollider
22ebfbd6bf Merge #14821: Replace CAffectedKeysVisitor with descriptor based logic
0e75f44a0 Replace CAffectedKeysVisitor with descriptor based logic (Pieter Wuille)

Pull request description:

  It seems we don't need a custom visitor pattern anymore to find what keys are affected by a script. Instead, infer the descriptor, and see which keys it expands to.

Tree-SHA512: 8a52f61fb74e8ebfd8d02e759629e423ced6bd7d9a9ee7c4bdd2cca8465bc27b951cc69c8d835244a611ba55c6d22f83b81acef05487cb988c88c0951b797699
2022-05-30 01:11:05 -04:00
MarcoFalke
3476d826e7 Merge #14857: wallet_keypool_topup.py: Test for all keypool address types
0dcac51049 wallet_keypool_topup.py: Test for all keypool address types (Gregory Sanders)

Pull request description:

  To protect against regressions if key scanning is changed.

Tree-SHA512: d1c4bb033bafd97203a3f68fb262a501442be947907d67902f0391fbdec39c095196403c7675e602806cc68d7e2d1f552ab339a58346162379978d06dad1c4bb
2022-05-30 01:11:05 -04:00
Jonas Schnelli
13ff3d6291 Merge #14608: qt: Remove the "Pay only required fee..." checkbox
a16f44c04 qt: Remove "Pay only required fee" checkbox (Hennadii Stepanov)
8711cc0c7 qt: Improve BitcoinAmountField class (Hennadii Stepanov)

Pull request description:

  Ref #13280
  This PR removes the "Pay only the required fee..." checkbox from the custom transaction fee section in the "Send" tab. Instead, a minimum value will be enforced on the custom fee input box.

  All comments from #13280 are addressed.

  Before:
  ![screenshot from 2018-10-30 16-42-18](https://user-images.githubusercontent.com/32963518/47726622-866d8e80-dc63-11e8-8670-3f97ff0fa5da.png)

  After:
  ![screenshot from 2018-10-30 16-40-37](https://user-images.githubusercontent.com/32963518/47726633-8f5e6000-dc63-11e8-82cf-5b9ff4aae91d.png)

  cc: @promag @MarcoFalke @Sjors

Tree-SHA512: 073577d38d8353b10e8f36fb52e3c6e81dd45d25d84df9b9e4f78f452ff0bdbff3e225bdd6122b5a03839ffdcc2a2a08175f81c2541cf2d12918536abbfa3fd1
2022-05-30 01:11:05 -04:00
Wladimir J. van der Laan
d413109da5 Merge #13558: Drop unused GetType() from CSizeComputer
893628be0166b4096b6e52f516e0f65bb63a75a2 Drop minor GetSerializeSize template (Ben Woosley)
da74db0940720407fafaf3582bbaf9c81a4d3b4d Drop unused GetType() from CSizeComputer (Ben Woosley)

Pull request description:

  Based on conversation in #13462, it seems the serialization `GetType` has very narrow use/effect. In every case except for `CAddress`, which specifically relates to a network peer's address, not a wallet address etc., the serialized representation of an object is irrespective of its destination / type.

  This removes the unused `GetType` method from `CSizeComputer` as a step to further narrowing that use.

Tree-SHA512: e72b8e9e5160396691e05aeaee3aba5a57935a75bd5005cfcc7fb51c936f3d1728a397f999da5c36696506dd815fafa5c738f3894df8864f25f91f639eba9c3d
2022-05-30 01:11:03 -04:00
Wladimir J. van der Laan
70e749cd98 Merge #13248: [gui] Make proxy icon from statusbar clickable
Clicking on the proxy icon will open settings showing the network tab
              Create enum Tab in OptionsModel
              Use new connect syntax
              Use lambda for private slots
2022-05-30 01:10:43 -04:00
UdjinM6
c6b734f99c
fix(qt): Disable "Show address QR code" menu items/buttons when no qrencode support was compiled in (#4854) 2022-05-29 23:42:18 +03:00
PastaPastaPasta
604cdbc447
Merge pull request #4642 from Munkybooty/backports-0.18-pr19
Backports 0.18 pr19
2022-05-29 15:05:15 -05:00
PastaPastaPasta
e7b6ab67f2
Merge pull request #4703 from kittywhiskers/assumeutxo2
merge bitcoin#16240...21526: assumeutxo project backports (part 2)
2022-05-29 14:39:11 -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