Commit Graph

21381 Commits

Author SHA1 Message Date
UdjinM6
9879322b99 qt: restore "wallet path on repair tab" logic 2022-03-06 12:39:01 +05:30
Kittywhiskers Van Gogh
d03a47820f merge bitcoin-gui#118: Remove BDB version from the Information tab
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-03-06 12:38:31 +05:30
Kittywhiskers Van Gogh
c0c3934ff0 merge bitcoin#19325: Refactor BerkeleyDatabase to introduce DatabaseBatch abstract class 2022-03-06 12:30:58 +05:30
Kittywhiskers Van Gogh
6248f8dd6c merge bitcoin#19320: Replace CDataStream& with CDataStream&& where appropriate 2022-03-06 12:30:58 +05:30
Kittywhiskers Van Gogh
a40b94755a merge bitcoin#19324: Move BerkeleyBatch static functions to BerkeleyDatabase 2022-03-06 12:30:58 +05:30
Kittywhiskers Van Gogh
619233127d merge bitcoin#19310: BerkeleyDatabase make BerkeleyDatabase::Create, CreateMock, and CreateDummy non-static functions 2022-03-06 12:30:58 +05:30
Kittywhiskers Van Gogh
a276282a77 merge bitcoin#19308: BerkeleyBatch Handle cursor internally 2022-03-06 12:30:58 +05:30
Kittywhiskers Van Gogh
7b9a69bd0f merge bitcoin#19292: refactor Read, Write, Erase, and Exists into non-template functions 2022-03-06 12:30:58 +05:30
Kittywhiskers Van Gogh
068fc48bdd merge bitcoin#19290: Move BDB specific things into bdb.{cpp/h} 2022-03-06 12:30:58 +05:30
UdjinM6
cf0142a6cf qt: drop salvage wallet from user interface 2022-03-06 12:30:58 +05:30
Kittywhiskers Van Gogh
07a4d48249 merge bitcoin#18918: Move salvagewallet into wallettool 2022-03-06 12:30:20 +05:30
Kittywhiskers Van Gogh
80777646d8
tests: (in)valid unit test vectors against IsTriviallyValid() evo calls (#4660)
* evo: resolve suggestions given in dash#4696

* evo: add known-good mainnet vectors for IsTriviallyValid()

* evo: add artificially malformed vectors for IsTriviallyValid()

* evo: add IsTriviallyValid() tests

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

* Make sure we deserialize the right type of a special tx in GetTxPayload, and debug assert

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-03-06 00:54:26 -06:00
MarcoFalke
878db7dde5 Merge #21397: fuzz: Bump FuzzedDataProvider.h
fa7dc7ae9595ea49a2b31a3baef9af674d8def60 fuzz: Bump FuzzedDataProvider.h (MarcoFalke)

Pull request description:

  Fixes #21309

ACKs for top commit:
  practicalswift:
    cr ACK fa7dc7ae9595ea49a2b31a3baef9af674d8def60

Tree-SHA512: 7805a943ab173d8f3f1e7e55d76a1cc60f63abf9fbf4d537bfeeb0dcf84ecdfb0417d789bd3f3a0c1603fea38884abb643b4b26c27b262e617e6c9a82894f42e
2022-03-05 13:48:08 -06:00
MarcoFalke
5ac7ca1296 Merge #19846: build: enable unused member function diagnostic
819d03b932134ee91df3b0fe98a481a331ce57bf refactor: took out unused member functions (Zero)
ed69213c2b2a99023bdee5168614cb8b71990f5f build: enable unused member function diagnostic (Zero)

Pull request description:

  This PR enables the `-Wunused-member-function` compiler diagnostic, as discussed in #19702.

  > **Notice**: The `unused-member-function` diagnostic is only available on clang. Therefore, clang should be used to test this PR.

  - [x] Include the `-Wunused-member-function`diagnostic in `./configure.ac`. (ed69213c2b2a99023bdee5168614cb8b71990f5f)
  - [x] Resolve the reported warnings. (819d03b932134ee91df3b0fe98a481a331ce57bf)

  Currently, enabling this flag no longer reports the following warnings:

  > **Note**: output from `make 2>&1 | grep "warning: unused member function" | sort | uniq -c`

  ```
  1 index/blockfilterindex.cpp:54:5: warning: unused member function 'DBHeightKey' [-Wunused-member-function]
  2 script/bitcoinconsensus.cpp:50:9: warning: unused member function 'GetType' [-Wunused-member-function]
  1 test/util_tests.cpp:1975:14: warning: unused member function 'operator=' [-Wunused-member-function]
  ```

  All tests have passed locally (from `make check` & `src/test/test_bitcoin`).

  This PR closes #19702.

ACKs for top commit:
  practicalswift:
    ACK 819d03b932134ee91df3b0fe98a481a331ce57bf - patch still looks correct :)
  MarcoFalke:
    ACK 819d03b932134ee91df3b0fe98a481a331ce57bf
  pox:
    Tested ACK 819d03b932134ee91df3b0fe98a481a331ce57bf with clang after `make clean`. No unused member function warnings.
  theStack:
    tested ACK 819d03b932134ee91df3b0fe98a481a331ce57bf

Tree-SHA512: 5fdfbbb02b3dc618a90a874a5caa5e01e596fc1d14a209e75a6981f01b253f9bca0cfac8fdd758dd7151986609fb76571c3745124a29cfd4f8cbb8d82a07272e
2022-03-05 13:48:08 -06:00
Wladimir J. van der Laan
3d6cc69131 Merge #20333: build: remove native_biplist dependency
7087440894a9daa7de806c5aa42d83ad60759c65 depends: native_ds_store 1.3.0 (fanquake)

Pull request description:

  `ds_store` [now takes advantage](36fb607940) of Pythons ability to decode binary [plists](https://docs.python.org/3/library/plistlib.html) (since 3.4), so we can drop its biplist dependency.

  The call to `biplist.Data()` in `custom_dsstore.py` doesn't seem to do anything, and from what I can tell can just be removed. i.e:
  ```diff
  diff --git a/contrib/macdeploy/custom_dsstore.py b/contrib/macdeploy/custom_dsstore.py
  index dc1c1882d..e475bc6c3 100755
  --- a/contrib/macdeploy/custom_dsstore.py
  +++ b/contrib/macdeploy/custom_dsstore.py
  @@ -47,6 +47,7 @@ alias.volume.disk_image_alias.target.filename = package_name_ns + '.temp.dmg'
   alias.volume.disk_image_alias.target.carbon_path = 'Macintosh HD:Users:\x00bitcoinuser:\x00Documents:\x00bitcoin:\x00bitcoin:\x00' + package_name_ns + '.temp.dmg'
   alias.volume.disk_image_alias.target.posix_path = 'Users/bitcoinuser/Documents/bitcoin/bitcoin/' + package_name_ns + '.temp.dmg'
   alias.target.carbon_path = package_name_ns + ':.background:\x00background.tiff'
  +assert(biplist.Data(alias.to_bytes()) == alias.to_bytes())
   icvp['backgroundImageAlias'] = biplist.Data(alias.to_bytes())
   ds['.']['icvp'] = icvp
  ```

ACKs for top commit:
  laanwj:
    ACK 7087440894a9daa7de806c5aa42d83ad60759c65

Tree-SHA512: 8ba3cf561937efe4a3daae8b0cb4de3bf9e425b3a9244161b09d94ee2b1bd4c3e21315fa70e495b19a052aabdc1731b3b6f346b63272d72d2762ced83237d02f
2022-03-05 13:48:08 -06:00
fanquake
f59b1027f2 Merge #19536: qt, build: Fix QFileDialog for static builds
6457361e90c0cf704d086c51d75f51dbdfd374d7 qt: Fix QFileDialog for static builds (Hennadii Stepanov)

Pull request description:

  This change partially reverts 248e22bbc0d7bc40ae3584d53a18507c46b0e553 (#16386) and makes `QFileDialog`s work again for static builds.

  Fixes https://github.com/bitcoin-core/gui/issues/32.

ACKs for top commit:
  fanquake:
    ACK 6457361e90c0cf704d086c51d75f51dbdfd374d7. Although it would be good to know exactly _why_ this fixes the issue. At this stage I also don't think this should be a blocker for 0.20.1.
  theuni:
    ACK 6457361e90c0cf704d086c51d75f51dbdfd374d7

Tree-SHA512: 8ad27e0bcae6debd02f73b7c374743e37d4edd806922b103a2fe494cf2d9930fe9ef3107b5a6c61f3c466cf7462de2641171880398954e7f2c4f417f5bb820d7
2022-03-05 13:48:08 -06:00
MarcoFalke
5fbff97ef7 Merge #19018: docs: fixing description of the field sequence in walletcreatefundedpsbt RPC method
d0a3feea73e0751f325ef7f1de20fa668f27332e Change docs for walletcreatefundedpsbt RPC method (Ivan Vershigora)

Pull request description:

  `sequence` field in the list of inputs currently marked as "required". Actually it can be omitted and it's value depends on `locktime` and `options.replaceable` fields. Just the same as in `createpsbt` call.

ACKs for top commit:
  achow101:
    ACK d0a3feea73e0751f325ef7f1de20fa668f27332e

Tree-SHA512: 3f429a2c2eea283a47fb5002a99f7e2a5ed6f67df9fd895c1ab938256c48a6497ed6ac2673d8fe8968dfb67b939f4a84570899d9faf52f3abd6ec90c0703d1bd
2022-03-05 13:48:08 -06:00
UdjinM6
f7159d8520
qt: Fix Repair tab (#4715)
* store cmd line params in args manager

* qt: repair Repair

We no longer pass cmd line params to qt after 16578 backport. Use cmd line params stored in args manager instead.

* use structured binding

* handle empty args correctly
2022-03-05 22:44:54 +03:00
fanquake
89502a18ce Merge #18928: build: don't pass -w when building for Windows
89fea68ffdbd97394d891177e664f896b3e7d1e6 build: don't pass -w when building for Windows (fanquake)

Pull request description:

  This has been around since the introduction of autotools. However at
  this point I'm not sure we'd ever want to suppress all warnings when
  performing a build, and given that CXX FLAGS will have been overriden
  when cross-compiling for Windows (using depends), this would rarely,
  if-ever be used anyways.

  From https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html:
  > -w
  >
  >     Inhibit all warning messages.

ACKs for top commit:
  hebasto:
    ACK 89fea68ffdbd97394d891177e664f896b3e7d1e6

Tree-SHA512: 2b5bdef7fff5c87b28199f5822cab3cdf600c90c01a40db5cd85053eef5dcb5816e2e97ff61a30ff94b4f0c6cb7be22beaef34d82235bdf05ff9da865d40b381
2022-03-05 14:36:25 -05:00
MarcoFalke
a1de374f30 Merge #17669: tests: have coins simulation test also use CCoinsViewDB
bee88b8c5887e6beb75f26f0db97888a48fa7e7c tests: have coins simulation test also use CCoinsViewDB (James O'Beirne)

Pull request description:

  Before this change, the coins simulation test uses a base view of type
  CCoinsViewTest, which has no relevance outside of the unittest suite. Might as
  well reuse this testcase with a more realistic configuration that has
  CCoinsViewDB (i.e. in-memory leveldb) at the bottom of the view structure.

  This adds explicit use of CCoinsViewDB in the unittest suite.

  #### Before change
  ```
  ./src/test/test_bitcoin --run_test=coins_tests --catch_system_errors=no  21.99s user 0.04s system 99% cpu 22.057 total
  ```

  #### After change
  ```
  ./src/test/test_bitcoin --run_test=coins_tests --catch_system_errors=no  78.80s user 0.04s system 100% cpu 1:18.82 total
  ```

ACKs for top commit:
  ryanofsky:
    Code review ACK bee88b8c5887e6beb75f26f0db97888a48fa7e7c

Tree-SHA512: 75296b2bcbae2f46e780489aafb032592544a15c384d569d016005692fe79fe60d7f05857cf25cc7b0f9ab1c53b47886a6c71cca074a03fb9afec30e1f376858
2022-03-05 14:36:25 -05:00
Wladimir J. van der Laan
d585f0bbd6 Merge #17916: windows: Enable heap terminate-on-corruption
3d5d7aad269c7afe7e36677d3e76c6579e1b8aba windows: remove call to SetProcessDEPPolicy (fanquake)
f2645c26017591f819344d24dc0a88dc32dde6fd windows: Enable heap terminate-on-corruption (fanquake)

Pull request description:

  This PR is currently two separate changes:

  #### Enable heap terminate-on-corruption
  This is default behavior from Windows 8 onwards, however we still support Windows 7, so it should make sense to explicitly enable this. This is also done by projects like tor, chromium etc.

  > Enables the terminate-on-corruption feature. If the heap manager detects an error in any heap used by the process, it calls the Windows Error Reporting service and terminates the process.
  After a process enables this feature, it cannot be disabled.

  More info [here](https://docs.microsoft.com/en-us/windows/win32/api/heapapi/nf-heapapi-heapsetinformation).

  #### Remove call to SetProcessDEPPolicy()

  DEP is always enabled on 64-bit Windows processes, and `SetProcessDEPPolicy()` only works when called from a 32-bit process. I've tested that our current usage always fails ([as expected](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setprocessdeppolicy#remarks)) with [ERROR_NOT_SUPPORTED](16151c441e/mingw-w64-headers/include/error.h (L42)).

  Please don't add a "Needs gitian build" tag here yet.

ACKs for top commit:
  sipsorcery:
    ACK 3d5d7aad269c7afe7e36677d3e76c6579e1b8aba.
  laanwj:
    ACK 3d5d7aad269c7afe7e36677d3e76c6579e1b8aba

Tree-SHA512: 0948bcf165685b6b573f2cd950680c34356b856690de655ced2b93d497e02e7b22aa195c99f6ce33202f182622c67302ff31c98ab51b7d050574af3debdee5ce
2022-03-05 14:36:25 -05:00
PastaPastaPasta
c67867582d
Merge pull request #4638 from Munkybooty/backports-0.18-pr18
Backports 0.18 pr18
2022-03-05 12:43:14 -06:00
PastaPastaPasta
47ad9ab146
Merge pull request #4706 from kittywhiskers/libnatpmp
merge bitcoin#18077...22397: Add NAT-PMP port forwarding support
2022-03-05 11:03:44 -06:00
Wladimir J. van der Laan
0d59e4d5f8 Merge #14922: windows: Set _WIN32_WINNT to 0x0601 (Windows 7)
0164b0f5cf80cd00a4914d9fea0bcb9508cb7607 build: Remove WINVER pre define in Makefile.leveldb.inlcude (Chun Kuan Lee)
d0522ec94ebbaa564f5f6b31236d4df032664411 Drop defunct Windows compat fixes (Ben Woosley)
d8a299206780b38959d732cbe40ba1dd25834f0e windows: Call SetProcessDEPPolicy directly (Chun Kuan Lee)
1bd9ffdd44000b208d29d35451f4dc9f1ac9318f windows: Set _WIN32_WINNT to 0x0601 (Windows 7) (Chun Kuan Lee)

Pull request description:

  The current minimum support Windows version is Vista. So set it to 0x0600
  5a88def8ad/mingw-w64-headers/include/sdkddkver.h (L19)

Tree-SHA512: 38e2afc79426ae547131c8ad3db2e0a7f54a95512f341cfa0c06e4b2fe79521ae67d2795ef96b0192e683e4f1ba6183c010d7b4b8d6b3e68b9bf48c374c59e7d
2022-03-04 23:38:33 -05:00
MarcoFalke
26bb8eeeb2 Merge #15332: [Docs] Small updates to getrawtransaction description
47012391ec [Docs] Small updates to getrawtransaction description (Amiti Uttarwar)

Pull request description:

  As per review comments on https://github.com/bitcoin/bitcoin/pull/15159

Tree-SHA512: 0bbbe956b47d177f7e67c5ab2048287783327d9e07a679d64d79aee3ea8633e769f75b59d3dbce517924ba5d64d6c44f26bf49e16d40612463e460ad1a238129
2022-03-04 23:38:33 -05:00
MarcoFalke
54de28adce Merge #15354: doc: Add missing bitcoin-wallet tool manpages
fa1e281547 doc: Add missing wallet-tool manpages (MarcoFalke)
fa0fe3b8a4 contrib: Add missing wallet tool to gen-manpages.sh (MarcoFalke)

Pull request description:

Tree-SHA512: 8c5c7e98f634cb1c8b43ecc9a15f22df2f572f5d752fb20f09910fb0d31e74df8144c1833f54bb44ad53cb5ca166f7e896317951899d4b0aa05bd3262f66835c
2022-03-04 23:38:32 -05:00
MeshCollider
80bbd4242d Merge #14075: Import watch only pubkeys to the keypool if private keys are disabled
f4b00b70e Import public keys in order (Andrew Chow)
9e1551b9c Test pubkey import to keypool (Andrew Chow)
513719c5f Add option to importmulti add an imported pubkey to the keypool (Andrew Chow)
9b81fd19a Fetch keys from keypool when private keys are disabled (Andrew Chow)
99cccb900 Add a method to add a pubkey to the keypool (Andrew Chow)

Pull request description:

  If the wallet has private keys disabled, allow importing public keys into the keypool. A `keypool` option has been added to `importmulti` in order to signal that the keys should be added to the keypool.

Tree-SHA512: e88ea7bf726c13031aa739389a0c2662e6b22a4f9a4dc45b042418c692a950d98f170e0db80eb59e9c9063cda8765eaa85b2927d1790b9625744f7a87bad5fc8
2022-03-04 23:38:32 -05:00
Odysseas Gabrielides
64f7a1e291
Revert "feat: introduce devnetVersion for devnet breaking changes; always use DGW on devnets (#4685)" (#4712)
This reverts commit a3b4aab936.
2022-02-28 10:43:00 -06:00
MarcoFalke
525c12e60f Merge #15383: [rpc] mining: Omit uninitialized currentblockweight, currentblocktx
fa178a6385 [rpc] mining: Omit uninitialized currentblockweight, currentblocktx (MarcoFalke)

Pull request description:

  Previously we'd report "0", which could be mistaken for a valid number. E.g. the number of transactions is 0 or the block weight is 0, whatever that means.

Tree-SHA512: ee94ab203a329e272211b726f4c23edec4b09c650ec363b77fd59ad9264165d73064f78ebb9e11b5c2c543b73c157752410a307655560531c7d5444d203aa0ea
2022-02-27 13:33:36 -05:00
MarcoFalke
3834c10098 Merge #15415: [test] functional: allow custom cwd, use tmpdir as default
e3e1a5631e [test] functional: set cwd of nodes to tmpdir (Sjors Provoost)

Pull request description:

  Any process launched by bitcoind will have `self.datadir` as its `cwd`.

Tree-SHA512: 0b311643bb96c7dc2f693774620173243b3add40bf373284695af2f0071823b23485289fd2ffe152b7f63e0bfe989b16720077cfc2ce33905f9b8e7f2630f3c0
2022-02-27 13:33:26 -05:00
UdjinM6
932a75b85f
wallet: Fix CanGenerateKeys (#4705)
Using wallet flags should be enough here, no need for any additional conditions.

NOTE: Wallets created prior to 4627 have wallet version set to FEATURE_HD even when no HD chain was initialized, that's why they have issues without this fix.

Fixes 4699
2022-02-26 16:03:21 -06:00
PastaPastaPasta
e8b8568d9e
Merge pull request #4702 from kittywhiskers/bench2
merge bitcoin#16540...#17542: benchmarks (part 2)
2022-02-26 13:09:31 -06:00
Kittywhiskers Van Gogh
7d989179f9
refactor(evo): introduce IsTriviallyValid() to CheckPro*Tx objects (#4696)
* evo: introduce IsTriviallyValid() to CheckPro*Tx objects

* evo: relocate Check* and CheckPro*Tx logic to deterministicmns (move-only)

* evo: relocate masternode state and chainlock sig logic to dedicated files (move-only)

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

* evo: issue penalty for CheckInputsHash failure when validating ProUp*Tx

Co-authored-by: PastaPastaPasta <PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-02-26 12:50:35 -06:00
Kittywhiskers Van Gogh
4e9fe85700 merge bitcoin#22397: Fix macOS Apple Silicon build with miniupnpc and libnatpmp 2022-02-26 17:49:13 +05:30
Kittywhiskers Van Gogh
c382730033 merge bitcoin#21209: use newer source for libnatpmp 2022-02-26 17:49:13 +05:30
Kittywhiskers Van Gogh
d23a3c8af8 merge bitcoin#21320: fix libnatpmp macos cross compile 2022-02-26 17:49:13 +05:30
Kittywhiskers Van Gogh
687c7d4a5d merge bitcoin#18077: Add NAT-PMP port forwarding support 2022-02-26 17:49:13 +05:30
Kittywhiskers Van Gogh
0b4eddc359 merge bitcoin#13204: Faster sigcache nonce 2022-02-26 10:47:54 +05:30
Kittywhiskers Van Gogh
01dc196162 merge bitcoin#17542: Create test utility library from src/test/util 2022-02-26 10:45:13 +05:30
Kittywhiskers Van Gogh
e36ee01f99 merge bitcoin#17384: Create new test library 2022-02-26 10:45:13 +05:30
Kittywhiskers Van Gogh
52e62b6601 merge bitcoin#17357: Add fuzzing harness for Bech32 encoding/decoding 2022-02-26 10:45:13 +05:30
Kittywhiskers Van Gogh
7b74a34aba merge bitcoin#17292: Add new mempool benchmarks for a complex pool 2022-02-26 10:45:13 +05:30
Kittywhiskers Van Gogh
d34c016e3f merge bitcoin#17228: Add RegTestingSetup to setup_common 2022-02-26 10:45:13 +05:30
Kittywhiskers Van Gogh
61e2c6d228 merge bitcoin#17183: test/bench: dedup Build{Crediting,Spending}Transaction() 2022-02-26 10:45:13 +05:30
Kittywhiskers Van Gogh
831b0057d9 merge bitcoin#17009: Add EvalScript(...) fuzzing harness 2022-02-26 10:45:13 +05:30
Kittywhiskers Van Gogh
5086ad7c2f merge bitcoin#16540: Add ASSERT_DEBUG_LOG to unit test framework 2022-02-26 10:37:36 +05:30
Odysseas Gabrielides
3ecfa04a72
Crash fix (#4697)
* Crash fix

* Keep verified LLMQ connections

* Revert "Keep verified LLMQ connections"

This reverts commit d44bba663a.

* Refactoring
2022-02-24 11:08:22 -06:00
Odysseas Gabrielides
a1027a3e8e
Keep verified LLMQ connections (#4701) 2022-02-23 13:03:31 -06:00
UdjinM6
db784fd4aa
Merge pull request #4695 from UdjinM6/bp14021
Backport 14021 and 15433
2022-02-23 12:56:08 +03:00
UdjinM6
7acaa0a93a
Fix "cs_main not held" in SyncObjects (#4694)
* Fix "cs_main not held" in SyncObjects

* use WITH_LOCK
2022-02-23 12:55:37 +03:00