Commit Graph

21618 Commits

Author SHA1 Message Date
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
ktechmidas
712f60dd21
Fix: Use github workspace for building image (#4775)
* Fix: Use github workspace for building image

* Fix: Ensure correct dir for docker-entrypoint.sh
2022-04-19 09:11:04 +03:00
UdjinM6
1df7f90fce
llmq: fix off-by-1 in CollectSigSharesToSendConcentrated (#4773) 2022-04-19 09:09:55 +03:00
UdjinM6
89f606a927
trivial: add some missing dashifications (#4772) 2022-04-19 09:09:42 +03:00
UdjinM6
26d774bd6f
llmq: Clean old DKG contributions up (#4763)
* llmq: Clean old DKG contributions up

* apply review suggestions and a bit more

* use scheduler
2022-04-19 09:08:57 +03:00
Vijay
c66a2ec6fd
scripted-diff: Merge #18533 Replace strCommand with msg_type (#4761)
-BEGIN VERIFY SCRIPT-
sed -i 's/\<strCommand\>/msg_type/g' src/coinjoin/client.cpp
sed -i 's/\<strCommand\>/msg_type/g' src/coinjoin/client.h
sed -i 's/\<strCommand\>/msg_type/g'  src/coinjoin/server.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/coinjoin/server.h
sed -i 's/\<strCommand\>/msg_type/g'  src/evo/mnauth.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/evo/mnauth.h
sed -i 's/\<strCommand\>/msg_type/g'  src/governance/governance.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/governance/governance.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/blockprocessor.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/blockprocessor.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/chainlocks.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/chainlocks.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionhandler.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionhandler.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionmgr.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionmgr.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/instantsend.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/instantsend.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/quorums.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/quorums.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing_shares.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing_shares.h
sed -i 's/\<strCommand\>/msg_type/g'  src/masternode/sync.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/masternode/sync.h
sed -i 's/\<strCommand\>/msg_type/g'  src/net_processing.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/spork.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/spork.h
-END VERIFY SCRIPT-
2022-04-18 11:47:26 -05:00
PastaPastaPasta
be44aa455d
fix: add missing include (#4770) 2022-04-16 22:33:44 +03:00
UdjinM6
d1592dae2d
Merge pull request #4769 from PastaPastaPasta/develop-trivial-2022-04-16
trivial backports 2022 04 16
2022-04-16 22:31:30 +03:00
UdjinM6
e5120ab01c
trivial: add missing whitespaces (#4771) 2022-04-16 22:30:39 +03:00
MarcoFalke
a34237c54b Merge bitcoin/bitcoin#21996: p2p: pass strings to NetPermissions::TryParse functions by const ref
39393479c514f271c42750ffcd0adc6bc1db2e2f p2p: pass strings to NetPermissions::TryParse functions by const ref (Jon Atack)

Pull request description:

  instead of by value, as these are "in" params that are not cheap to copy.

  Reference: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f16-for-in-parameters-pass-cheaply-copied-types-by-value-and-others-by-reference-to-const

ACKs for top commit:
  MarcoFalke:
    cr ACK 39393479c514f271c42750ffcd0adc6bc1db2e2f

Tree-SHA512: 294fe0f2d900293b4447d4e1f0ccc60c1ed27b3bdbd0f5d71d3dbf71de86879638b1b813fadfb44c58b4acff4e7d75b7ed6a4f9cc5fcf627108224e6a21b524c
2022-04-16 10:47:42 -06:00
Wladimir J. van der Laan
661eaec773 Merge #19256: gui: change combiner for signals to optional_last_value
f1a0314c537791f202dfb7c1209f0e04ba7988c3 gui: change combiner for signals to optional_last_value (Cory Fields)

Pull request description:

  [`optional_last_value`](https://www.boost.org/doc/libs/1_73_0/doc/html/boost/signals2/optional_last_value.html), which does not throw, has replaced `last_value` as
  Boosts default combiner. Besides being better supported, it also doesn't
  trigger gcc's `-Wmaybe-unitialized` warning, presumably because exceptions no
  longer bubble-up out of signals:

  ```bash
  In file included from ui_interface.cpp:9:
  /bitcoin/depends/x86_64-pc-linux-gnu/share/../include/boost/signals2/last_value.hpp: In member function 'boost::signals2::detail::signal_impl<R(Args ...), Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>::result_type boost::signals2::detail::signal_impl<R(Args ...), Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>::operator()(Args ...) [with Combiner = boost::signals2::last_value<bool>; Group = int; GroupCompare = std::less<int>; SlotFunction = boost::function<bool(const bilingual_str&, const std::__cxx11::basic_string<char>&, unsigned int)>; ExtendedSlotFunction = boost::function<bool(const boost::signals2::connection&, const bilingual_str&, const std::__cxx11::basic_string<char>&, unsigned int)>; Mutex = boost::signals2::mutex; R = bool; Args = {const bilingual_str&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int}]':
  /bitcoin/depends/x86_64-pc-linux-gnu/share/../include/boost/signals2/last_value.hpp:54:36: warning: '*((void*)& value +1)' may be used uninitialized in this function [-Wmaybe-uninitialized]
           if(value) return value.get();
                                      ^
  /bitcoin/depends/x86_64-pc-linux-gnu/share/../include/boost/signals2/last_value.hpp:43:21: note: '*((void*)& value +1)' was declared here
           optional<T> value;
                       ^~~~~
  /bitcoin/depends/x86_64-pc-linux-gnu/share/../include/boost/signals2/last_value.hpp: In member function 'boost::signals2::detail::signal_impl<R(Args ...), Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>::result_type boost::signals2::detail::signal_impl<R(Args ...), Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>::operator()(Args ...) [with Combiner = boost::signals2::last_value<bool>; Group = int; GroupCompare = std::less<int>; SlotFunction = boost::function<bool(const bilingual_str&, const std::__cxx11::basic_string<char>&, const std::__cxx11::basic_string<char>&, unsigned int)>; ExtendedSlotFunction = boost::function<bool(const boost::signals2::connection&, const bilingual_str&, const std::__cxx11::basic_string<char>&, const std::__cxx11::basic_string<char>&, unsigned int)>; Mutex = boost::signals2::mutex; R = bool; Args = {const bilingual_str&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int}]':
  /bitcoin/depends/x86_64-pc-linux-gnu/share/../include/boost/signals2/last_value.hpp:54:36: warning: '*((void*)& value +1)' may be used uninitialized in this function [-Wmaybe-uninitialized]
           if(value) return value.get();
                                      ^
  /bitcoin/depends/x86_64-pc-linux-gnu/share/../include/boost/signals2/last_value.hpp:43:21: note: '*((void*)& value +1)' was declared here
           optional<T> value;
                       ^~~~~
  ```

  The change in default happened in [Boost 1.39.0](https://www.boost.org/users/history/version_1_39_0.html) (along with the introduction of the Signals2 library.

  More information is also available here https://www.boost.org/doc/libs/1_73_0/doc/html/signals2/rationale.html#id-1.3.36.9.4:
  > The default combiner for Boost.Signals2 has changed from the last_value combiner used by default in the original Boost.Signals library.
  > This is because last_value requires that at least 1 slot be connected to the signal when it is invoked (except for the last_value<void> specialization).
  >  In a multi-threaded environment where signal invocations and slot connections and disconnections may be happening concurrently, it is difficult to fulfill this requirement. When using optional_last_value, there is no requirement for slots to be connected when a signal is invoked, since in that case the combiner may simply return an empty boost::optional.

ACKs for top commit:
  laanwj:
    ACK f1a0314c537791f202dfb7c1209f0e04ba7988c3

Tree-SHA512: 3600f85019a3591b141dc9207f8a7e66d16d9996cf97fdf08f5133a212d55c591955ab835ffbdca20b5d62711578bc305d5525c75546fa957f180192e2a80c1e
2022-04-16 10:47:00 -06:00
MarcoFalke
eff89074c4 Merge #19309: refactor: Fix link error with --enable-debug
b83cc0fc94df99f0334430e63e8c9fa6ae3790e1 Fix link error with --enable-debug (Hennadii Stepanov)

Pull request description:

  Fixes a link error on master (39bd9ddb8783807b9cde6288233e86ad7c85d61f):
  ```
  $ ./configure --enable-debug
  $ make
  ...
  bitcoin_wallet-bitcoin-wallet.o:(.data.rel.ro+0x0): undefined reference to `InitError(bilingual_str const&)'
  libbitcoin_wallet_tool.a(libbitcoin_wallet_tool_a-wallettool.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
  libbitcoin_wallet.a(libbitcoin_wallet_a-salvage.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
  libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
  libbitcoin_wallet.a(libbitcoin_wallet_a-walletdb.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
  libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o):(.data.rel.ro+0x8): more undefined references to `InitError(bilingual_str const&)' follow
  collect2: error: ld returned 1 exit status
  ```

  See:
  - https://github.com/bitcoin/bitcoin/pull/19295#issuecomment-645471771
  - https://github.com/bitcoin/bitcoin/pull/19295#issuecomment-645487182

ACKs for top commit:
  achow101:
    Re-ACK b83cc0fc94df99f0334430e63e8c9fa6ae3790e1

Tree-SHA512: f563d978b6725284049449bb0b3a184d356f32e9b63bcadb0ba71352d3d521af3dbb4a7b4fc0a5a620ed99c357e59f62249c10d0defc0cbe7775f2c06791dabe
2022-04-16 10:46:58 -06:00
UdjinM6
9735286db3
Merge pull request #4768 from PastaPastaPasta/chore/bump-version-18-rc1
chore: bump version in configure.ac to v18.0.0.0-rc1
2022-04-16 17:46:59 +03:00
Odysseas Gabrielides
83ef1c6c66
feat: implement quorum rotation and updated LLMQ parameters (#4752)
* Added GET_SNAPSHOT_INFO message handling

* Quorum members by rotation

* Quorum utils functions

* Handle GET_QUORUM_ROTATION_INFO with baseBlockHash from client

* Storing QuorumSnaphots in evoDB when requesting them

* Added DIP Enforcement param

* quorumIndex cache

* Quorum Rotation deployment control

* Usage of Bitsets for storing CQuorumSnapshots

* Correct handling of early quorum quarters

* More asserts

* Corrections

* Handling of quorumIndex

* Refactoring of truncate mechanism

* Various fixes

* Interface correction

* Added template type for indexed cache

* Added quorumIndex into commitmenHash

* Various changes

* Needs to update maqQuorumsCache along with indexedQuorumsCache

* Added CFinalCommitment version 2

* Renamed variables

* Fixes

* Refactoring & correct caching of quorumMembers by rotation

* Added assertions

* Refactoring

* Interface change

* Handling of previous DKG session failure

* Applied refactoring

* Build quarter members improvments

* Merge Quorum Rotation and Decreased fee into one deployment (DIP24)

* Added new LLMQ Type

* Added functional tests + refactoring

* Refactoring

* Spreaded Quorum creation and Quorum Index adaptation

* quorumIndex adaptations

* Added quorumIndex in CFinalCommitment

* Latest work

* Final refactoring

* Batch of refactoring

* Fixes for tests

* Fix for CFinalCommitment

* Fix for Quorums

* Fix

* Small changes

* Thread sync fic

* Safety changes

* Reuse mns when needed

* Refactoring

* More refactoring

* Fixes for rotationinfo handling

* Fix for rotation of members

* Correct order of MNs lists in Quorum Snapshots

* Adding extra logs

* Sync rotation quorums + qrinfo changes

* Fix + extra logs

* Removed redundant field

* Fix for null final commitment + refactoring

* Added timers in tests

* Fix for qrinfo message: quorumdiff and merkleRootQuorums

* Small changes for rotation test

* Remove reading from scanQuorumCache

* Added quorum list output

* Crash fix

* Experimental commit

* apply changes to specialtxman.cpp from specialtx.cpp

* all the changes

* substancially speed up feature_llmq_rotation.py

* reenable asserts, add check for reorgs

* Refactoring

* Added extra logs

* format

* trivial

* drop extra boost includes

* drop ContainsMN

* fix ScanQuorums

* check quorum hash and index in CFinalCommitment::Verify

* fix/tweak tests

* IsQuorumRotationEnabled should be aware of the context

* Calculating members based on earlier block.

* Fix for Quorum Members Cache

* Removed duplicate size of baseBlockHashes

* Adaptations of qrinfo to -8 mn lists

* Introduction of llmqTypeDIP24InstantSend

* Adaptation for llmqTypeDIP24InstantSend

* Adaptations for IS

* bump protocol version

* Added feature_llmq_is_migration test

* Various cleanups

* use unordered_lru_cache for quorumSnapshotCache

* trivial refactor ComputeQuorumMembersByQuarterRotation

* Reduced CFinalCommitment::quorumIndex from 32 to 16 bits

* Keep verified LLMQ relay connections

* Experimental Relay connection fix

* Fix for EnsureQuorumConnections rotation

* Using only valid Mns for checking

* Override of nPowTargetSpacing (devnet only)

* Show penalty score in masternode rpc

* fixups

* Rotation refactoring

* Update src/chainparams.cpp

* Replaced LogPrintf with LogPrint

* IS locking fix once DIP24 activation

* Various cleanup

* Updated MIN_MASTERNODE_PROTO_VERSION

* Introduce LLMQ_TEST_INSTANTSEND reg-test only quorum and actually test switching to dip0024 quorums

* Renamed field lastQuorumHashPerIndex

* Renamed to DIP0024

* chore: update nStartTime and nTimeout for mainnet / testnet for DEPLOYMENT_DIP0024

Co-authored-by: Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com>
Co-authored-by: pasta <pasta@dashboost.org>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-16 17:46:04 +03:00
pasta
728699d2cc chore: bump version in gitian-descriptors and README.md 2022-04-16 07:59:23 -06:00
pasta
b1f84e5db6 chore: bump version in configure.ac to v18.0.0.0-rc1 2022-04-15 13:01:08 -06:00