Commit Graph

21533 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
ae45b570c2 partial bitcoin#17227: Add Android packaging support 2022-04-26 20:36:08 +05:30
Kittywhiskers Van Gogh
1763f727b5 merge bitcoin#21376: Qt 5.12.10 2022-04-26 00:54:10 +05:30
UdjinM6
40c320cad8
trivial/lint: tweak lint-spelling.sh and fix typos (#4802)
* lint: exclude 3-rd party libs from spell-checks

* trivial: fix typos
2022-04-25 22:13:24 +03:00
UdjinM6
7fc9ced96d
tests: various fixes/cleanups (#4797)
* tests: move `move_to_next_cycle` to `DashTestFramework`

* tests: set correct defaults for `mine_cycle_quorum`

* tests: use correct quorum type in `create_islock`

* tests: fix `rpc_verifyislock.py`

* tests: fix `feature_llmq_is_cl_conflicts.py`

* tests: isolate zmq subscribers in `interface_zmq_dash.py`

this lets us call `test_*_publishers()` in any order and any number of times

* tests: check zmq for both deterministic and non-deterministic islocks
2022-04-25 22:12:04 +03:00
Odysseas Gabrielides
a2e1f46cf4
Edge case fix for Rotation (#4803)
* Edge case fix

* Simpler syntax

* add a bit of documentation, and adjust scopes

* use a switch statment

* adjust how returning happens

Co-authored-by: pasta <pasta@dashboost.org>
2022-04-25 22:11:44 +03:00
PastaPastaPasta
476c25f3c7
Merge pull request #4800 from kittywhiskers/bye_bye_openssl
merge bitcoin#17270, #17265, #18825: remove openssl
2022-04-25 13:18:18 -05:00
Kittywhiskers Van Gogh
1a6c26154b merge bitcoin#18825: fix message for ECC_InitSanityCheck test 2022-04-25 15:29:52 +05:30
Kittywhiskers Van Gogh
2314ba4c99 merge bitcoin#17265: Remove OpenSSL 2022-04-25 15:29:52 +05:30
Kittywhiskers Van Gogh
946858204f merge bitcoin#17270: Feed environment data into RNG initializers 2022-04-25 15:29:51 +05:30
Kittywhiskers Van Gogh
c7c42fff3d revert dash#4683: remove the ability to opt-out from building openssl
This reverts commit b26eaf6954.
2022-04-25 15:18:55 +05:30
PastaPastaPasta
2fe55acb4c
refactor: resolve cppcheck warnings (#4799) 2022-04-25 12:34:05 +03:00
PastaPastaPasta
407873e024
refactor(coinjoin): remove CCriticalSection from coinjoin code, use mutexes instead (#4739)
* refactor: remove CCriticalSection from coinjoin code, use mutexes instead

* refactor(coinjoin): more annotations

* fix cs_coinjoin double-lock deadlock

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-25 12:28:37 +03:00
Kittywhiskers Van Gogh
43152b2b35
merge #17165: Remove BIP70 support (#4023)
* compat: remove bswap_* check on macOS

This was originally added in #9366 to fix the gui build, as
Protobuf would also define these macros. Now that we're no-longer
using Protobuf, remove the additional check.

* build: skip building OpenSSL lib_ssl

* build: remove OpenSSL from Qt build

More info available from:
https://doc.qt.io/qt-5/ssl.html#enabling-and-disabling-ssl-support

* build: remove EVP_MD_CTX_new detection

This was added in #9475 to fix LibreSSL compatibility for
BIP70, so is no longer required.

* build: remove SSL lib detection

* gui: update BIP70 support message

* build: remove BIP70 entries from macOS Info.plist

* gui: remove payment request file handling from OpenURI dialog

* gui: remove BIP70 Support

* build: remove protobuf from depends and contrib
2022-04-25 12:01:47 +03:00
PastaPastaPasta
685c122fef
fix(qt): fix crash when first enabling governance tab due to null-ptr deref (#4795)
Decided to also apply the same logic to the other items so that we don't do nullptr dereferences

replication
```
./src/qt/dash-qt --regtest --resetguisettings
Enable governance
shutdown
```
2022-04-22 01:01:29 +03:00
UdjinM6
11a0fd7773
instantsend: create islock/isdlock based on the quorum rotation activation status (#4790) 2022-04-21 04:57:46 +03:00
UdjinM6
6df95f689a
Merge pull request #4785 from PastaPastaPasta/develop-trivial-2022-04-20
trivial backports 2022 04 20
2022-04-20 23:40:58 +03:00
PastaPastaPasta
c2ecc0c721
Merge pull request #4731 from vijaydasmp/bp2001
Merge bitcoin#17251,17250,17279,17299,17306,15756,17203,17719
2022-04-20 14:08:24 -05:00
PastaPastaPasta
087e62588e
refactor(instantsend): make cs_db a Mutex, replace cs with multiple smaller mutexes (#4784)
* refactor(instantsend): make cs_db a Mutex

This introduces GetInstantSendLockByHashInternal and GetInstantSendLockHashByTxidInternal as they are called in Locked and Unlocked contexts. The Internal functions do not lock cs_db, the non-internal functions simply lock cs_db then call the internal function. This ensures saftety (all public functions lock cs_db immediately & all private functions have cs_db already locked) enforced via clang thread safety, while allowing us to use a Mutex here

* refactor(instantsend): remove CInstantSendManager::cs, replace it with cs_inputReqests, cs_creating, cs_pendingLocks, cs_nonLocked, cs_pendingRetry

LOCKS_EXCLUDED are used everywhere where the associated mutex is locked ensuring that deadlocks are impossible
2022-04-20 21:54:20 +03:00
PastaPastaPasta
8096e286e1
refactor(llmq): misc clang-tidy / other refactoring (#4777)
* clang-tidy: avoid implicit conversion to bool

* clang-tidy: pointer / reference adjustments

* clang-tidy: avoid implicit conversion to bool

* clang-tidy: use braces for if

* clang-tidy: don't use else after return

* clang-tidy: mark auto stuff as pointers / const pointers

* clang-tidy: make static

* clang-tidy: avoid implicit conversion to bool

* clang-tidy: use emplace back

* clang-tidy: avoid implicit conversion to bool, and use WITH_LOCK

* use WITH_LOCK

* clang-tidy: avoid implicit conversion to bool

* clang-tidy: use more const / * with auto

* refactor: adjust formatting, and move IsNull to .h

* refactor: remove unused functions

* Update src/llmq/clsig.h

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 21:48:54 +03:00
PastaPastaPasta
e0544cdb2e
fix(instantsend): avoid an iterator invalidation in pendingInstantSendLocks handling (#4787)
* fix(instantsend): avoid an iterator invalidation in pendingInstantSendLocks handling

this also removes the following, as it doesn't take into account deterministic / not deterministic
```
if (pendingInstantSendLocks.size() <= maxCount) {
    pend = std::move(pendingInstantSendLocks);
}
```

Also uses structured bindings

* suggestions

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 21:19:59 +03:00
PastaPastaPasta
a9aac3ba9f
refactor: introduce CSigBase which becomes the base class for CRecoveredSig, CSigShare and CSigSesAnn (#4776)
* refactor: introduce CSigBase which becomes the base class for CRecoveredSig, CSigShare and CSigSesAnn

* fix: add optional include
2022-04-20 21:17:57 +03:00
PastaPastaPasta
608a099c87
fix: adjust nWindowSize and nThresholdStart and nThresholdMin (#4786) 2022-04-20 21:12:58 +03:00
MarcoFalke
5b91002b21 Merge bitcoin/bitcoin#23692: mining, refactor: add m_mempool.cs thread safety lock assertions
275e9390e1c84ac021b3c781ee239ad9ba7b78d4 mining, refactor: add m_mempool.cs thread safety lock assertions (Jon Atack)

Pull request description:

  in src/node/miner to

  - BlockAssembler::addPackageTxs()
  - BlockAssembler::SkipMapTxEntry()
  - BlockAssembler::UpdatePackagesForAdded()

  These functions have thread safety lock annotations in their declarations but are missing the corresponding run-time lock assertions in their definitions.

  Per doc/developer-notes.md: "Combine annotations in function declarations with run-time asserts in function definitions."

ACKs for top commit:
  shaavan:
    ACK 275e9390e1c84ac021b3c781ee239ad9ba7b78d4. Thanks for catching and fixing this!

Tree-SHA512: 1c6f1ad1bbd94ff391fc8ce1e3b95d88bd3db5db804a1a5ef4636e54b29f5801f79aa9ed753d34c9a79a58cf01c7ed890e7681ff1c7b0f16335dc062bbac31cc
2022-04-20 09:04:29 -05:00
MarcoFalke
8aa0af8e62 Merge #18518: fuzz: Extend descriptor fuzz test
fa0189955ab0f458bac81f534cbd626e1b0ad2c1 fuzz: Extend descriptor fuzz test (MarcoFalke)

Pull request description:

ACKs for top commit:
  practicalswift:
    ACK fa0189955ab0f458bac81f534cbd626e1b0ad2c1

Tree-SHA512: 6d6a6417f06d90732bbf055ff54102530d6956f3082f1ff65598f790d588170768aee98e4835996876d28bca2a9c62f22fe122c3fc7eafd4b7660696f72f9835
2022-04-20 08:51:40 -05:00
fanquake
dc36f495de Merge #18211: test: Disable mockforward scheduler unit test for now
fab2527515e8db944ae044bea8580e2cd9414bcd test: Disable mockforward scheduler unit test for now (MarcoFalke)

Pull request description:

  This should be a workaround to fix #18174 in the short run and buy us more time to investigate the issue while ci runs are green again 🙏

ACKs for top commit:
  fanquake:
    ACK fab2527515e8db944ae044bea8580e2cd9414bcd - be good to get Travis back.
  laanwj:
    ACK fab2527515e8db944ae044bea8580e2cd9414bcd

Tree-SHA512: 027e86b3dfec203a464e5bf528e9933c208c36633c2d4bfcdbc10da1799637a5d6ea0a63af33a4174fb1ad7115df631a4cb838f56e31f4cbd15498e1e9fdf9cc
2022-04-20 08:51:35 -05:00
fanquake
abb82314c9 Merge #17897: init: Stop indexes on shutdown after ChainStateFlushed callback.
9dd58ca611f6f2b59c25d727a4e955333525d345 init: Stop indexes on shutdown after ChainStateFlushed callback. (Jim Posen)

Pull request description:

  Replaces https://github.com/bitcoin/bitcoin/pull/17852.

  Currently, the latest index state may not be committed to disk on shutdown. The state is committed on `ChainStateFlushed` callbacks and the current init order unregisters the indexes as validation interfaces before the final `ChainStateFlushed` callback is called on them.

  Issue identified by paulyc.

  For review: an alternative or supplemental solution would be to call `Commit` at the end of `BaseIndex::Stop`. I don't see any harm in doing so and it makes the less prone to user error. However, the destructor would have to be modified to not call `Stop` because `Commit` calls a virtual method, so I figured it wasn't worth it. But I'm curious how others feel.

ACKs for top commit:
  fjahr:
    tested ACK 9dd58ca611f6f2b59c25d727a4e955333525d345
  paulyc:
    > Code review ACK [9dd58ca](9dd58ca611), but failed to test because I can't reproduce the original problem.
  kallewoof:
    Tested ACK 9dd58ca611f6f2b59c25d727a4e955333525d345
  promag:
    Code review ACK 9dd58ca611f6f2b59c25d727a4e955333525d345, but failed to test because I can't reproduce the original problem.

Tree-SHA512: 2918380b699833cb7eab07456d1667dbf8ebbe2d2b5988300a3cf5b6a6cfc818b6d9086e1936ffe7881f67e409306c4b91d61a08a169cfd0a301383479d4f3cb
2022-04-20 08:51:32 -05:00
Wladimir J. van der Laan
db07ef8196 Merge #16960: doc: replace outdated OpenSSL comment in test README
27fcb40fc0c9ba5608a982be7372924b1edefb17 doc: replace outdated OpenSSL comment in test README (fanquake)

Pull request description:

  The OpenSSL dependency was removed in #15826.

ACKs for top commit:
  laanwj:
    ACK 27fcb40fc0c9ba5608a982be7372924b1edefb17
  theStack:
    ACK 27fcb40fc0

Tree-SHA512: eb7a3b18fefa91e6f27c50fa065d6cc330f7b633ae8ee51145cdeec4df51dea5155f0d1fa91e75f1202adef04e063f3eda12773cd00a093f29f5a5e83c4fda73
2022-04-20 08:51:24 -05:00
PastaPastaPasta
f2704eae34
Merge pull request #4756 from kittywhiskers/split_ci
merge bitcoin#15931, #16839, #17192, #17407, #18037, #17997, partial #15639, #17989: deglobalisation and mining rpc backports
2022-04-20 08:33:51 -05:00
UdjinM6
41c2d0fd89 fuzz: fix 17018 2022-04-20 00:25:14 +05:30
UdjinM6
103f49aa41 fix linter 2022-04-20 00:25:14 +05:30
Kittywhiskers Van Gogh
eea2d83af7 merge bitcoin#17693: Add generateblock to mine a custom set of transactions 2022-04-20 00:25:14 +05:30
Kittywhiskers Van Gogh
d4ffaf0a79 merge bitcoin#18575: Remove requirement that all benches use RegTestingSetup 2022-04-20 00:25:14 +05:30
Kittywhiskers Van Gogh
978fb0b315 merge bitcoin#17781: Remove mempool global from miner 2022-04-20 00:25:14 +05:30
Kittywhiskers Van Gogh
c18786d9cf merge bitcoin#16943: Add generatetodescriptor RPC 2022-04-20 00:25:14 +05:30
Kittywhiskers Van Gogh
41252a1de2 merge bitcoin#17997: Remove mempool global from net 2022-04-20 00:25:14 +05:30
Kittywhiskers Van Gogh
f0263a3629 partial bitcoin#17989: Add fuzzing harness for ProcessMessage(...). Enables high-level fuzzing of the P2P layer
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 00:24:10 +05:30
Kittywhiskers Van Gogh
87bd5f5826 merge bitcoin#18037: Allow scheduler to be mocked
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 00:23:32 +05:30
Kittywhiskers Van Gogh
073a173a6c merge bitcoin#17407: Add reference to mempool in NodeContext 2022-04-20 00:22:36 +05:30
Kittywhiskers Van Gogh
b3b636463e merge bitcoin#16839: Replace Connman and BanMan globals with NodeContext local
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 00:22:35 +05:30
Kittywhiskers Van Gogh
f90cd9fe37 Replace CConnman global pointer with local member 2022-04-20 00:21:04 +05:30
Kittywhiskers Van Gogh
12d6597aa7 Pass CConnman to function in place for global pointer access
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 00:21:04 +05:30
Kittywhiskers Van Gogh
b735422a83 merge bitcoin#15931: Remove GetDepthInMainChain dependency on locked chain interface
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 00:20:30 +05:30
Kittywhiskers Van Gogh
ea3eefd30c merge bitcoin#16624: encapsulate transactions state
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 00:20:30 +05:30
Kittywhiskers Van Gogh
1d02804ce2 merge bitcoin#15842: replace isPotentialtip/waitForNotifications by higher method 2022-04-20 00:20:30 +05:30
Kittywhiskers Van Gogh
2b02a1b03e partial bitcoin#15639: Drop libbitcoin_server.a dependency 2022-04-20 00:20:30 +05:30
thephez
f9aba3efa5
docs: update bips.md (#4780)
* docs: update bips.md

* docs: switch to reference Dash version

* Update doc/bips.md

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-19 11:55:09 -05:00
UdjinM6
79107df6bf
tests: fix wait_for_* methods, force mnsync on non-mns too (#4782)
* tests: fix `wait_for_*` methods

should not override `all_ok` once it's `False`

* tests: force non-mns to switch to "fully synced" mnsync status in `setup_network`

like we do this for the controller node and all mns already
2022-04-19 19:42:52 +03:00
thephez
5d72da6f18
fix: add missing includes (#4781) 2022-04-19 09:25:20 +03:00
PastaPastaPasta
63bd2cbdb0
refactor: only do LogPrintfFinalCommitment if LogAccept LLMQ (#4779) 2022-04-19 09:22:30 +03:00
PastaPastaPasta
9b8c2dc7c6
fix(rpc): display proper governance fee in getgovernanceinfo (#4778) 2022-04-19 09:22:03 +03:00