* llmq: Restrict `ShouldSimulateError` to trigger for LLMQ_TEST only
Current `develop` tests fail. This was basically introduced by dashpay#3844 but it didn't come up before dashpay#3853 because the `v17` fork wasn't activated in `feature_llmq_dkgerrors.py`.
After dashpay#3853 `dip0008` activation takes [200 blocks](b95cf017c3 (diff-4a04bc0b355c780033960e8c261ee9b6d3c452897e1dcd88a15d272512266c76R539)) which was normally activated after [10 blocks](b95cf017c3 (diff-b92fa0fafafa27172736ebc88f9f9b658b1160caca512a318eefb7d93d22bf3cL18)) in `feature_llmq_dkgerrors.py`. Now with the 200 blocks `v17` gets activated during test which then leads to MN1, MN2 banning MN0 because it lies in DKG of `LLMQ_TEST` and `LLMQ_TEST_V17`.
There are other ways to solve it, like enabling `dip0008` earlier or enable `v17` later but IMO its anyway better to restrict `ShouldSimulateError` to only trigger for `LLMQ_TEST`.
* Revert "llmq: Restrict `ShouldSimulateError` to trigger for LLMQ_TEST only"
This reverts commit ec42d86126.
* llmq: Restrict `ShouldSimulateError` to trigger for LLMQ_TEST only (alternative)
Move ShouldSimulateError into CDKGSession
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* bls: Add CBLSImplicit, a wrapper around uint256
This makes `CBLSImplicit` compatible (related to methods called by
CBLSWrapper) with the other classes from the
bls-signatures library.
* bls: Use CBLSImplicit instead of uint256 as base type of CBLSId
* bls: Use FromBytes directly instead of indirectly through InternalSetBuf
* bls: Use Serialize directly instead of indirectly through InternalGetBuf
* bls: Drop all occurrences of InternalSetBuf and InternalGetBuf
* bls: Use `CBLSIdImplicit` instead of `uint256` in some more places
1687cb4 Refactor: One CBaseChainParams should be enough (Jorge Timón)
Pull request description:
There's no need for class hierarchy with CBaseChainParams, it is just a struct with 2 fields.
This starts as a +10-43 diff
Tree-SHA512: 0a7dd64ab785416550b541787c6083540e4962d76b6cffa806bb3593aec2daf1752dfe65ac5cd51b34ad5c31dd8292c422b483fdd2d37d0b7e68725498ed4c2d
Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
* Add LLMQ_100_67 quorums
* Re-use DEPLOYMENT_V17 bit to activate LLMQ_100_67 quorums
* Add LLMQ_TEST_NEW quorum and test its activation
* Tweak mine_quorum to work correctly with multiple quorum types
And to avoid a potentialy endless "while" loop
* llmq: Rename IsQuorumTypeEnabledAtBlock -> IsQuorumTypeEnabled
* chainparams|test: Rename llmq_test_new -> llmq_test_v17
* chainparams|consensus|llmq: Rename LLMQ_TEST_NEW -> LLMQ_TEST_V17
* Tweak few strings and the name of the test
* llmq: Make GetEnabledQuorumTypes return a vector of LLMQTypes, introduce GetLLMQParams
Signed-off-by: pasta <pasta@dashboost.org>
* Tweak minSize
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
* Exclude LLMQ_100_67 from Concentrated Recovery
* Update test/functional/feature_new_quorum_type_activation.py
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Co-authored-by: pasta <pasta@dashboost.org>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Prior to this `-disablewallet` is getting forced after the UI has been initialised if a `-masternodeblsprivkey` is set. This leads to the application running with a "Wallet UI" with undefined behaviour and not with the the expected "Node only UI".
* Send islock notifications for txes received after their islocks were received
Also drop UpdateWalletTransaction - its name makes no sense and it's only used once.
* tests: early islocks should trigger notifications once a corresponding tx is received
* Tweak tests
- fail if an unexpected islock is received
- drop unused variable
* llmq: Drop `c_str()` in two log statements
* test: Move create_islock to DashTestFramework in test_framework.py
Just because it's used the same way in two files
* test: Simplify send tx in zmq test
* format
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
* tests: Bump mocktime in smaller intervals while (not) signaling
This is needed to avoid triggering `CMasternodeSync::Reset()`.
* tests: force faucet node to finish mnsync in prepare_datadirs
* test: Drop redundant force_finish_mnsync in interface_zmq_dash.py
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
* Use system default fixed pitch font for Console
* qt: RPCConsole::messagesWidget - Directly apply the fixed pitch font
Instead of setting the font family in the stylesheet.
* qt: Introduce vecIgnoreObjects and add messagesWidget to it
Exclude messagesWidget from font updates because it should have a fixed pitch font.
* qt: Set the default consoleFontSize based on the used font
* Clamp consoleFontSize instead of ignoring invalid values
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
* Convert comments into log output in feature_llmq_dkgerrors.py
* Remove llmq folder in wallet_backup.py
* There is no `-blockmaxweight` option in Dash
* Fix potential deadlock in `CSporkManager::UpdateSpork()`
* Protect `inputRequestIds` with cs lock
* Protect `curDBTransaction` in `CEvoDB::CommitRootTransaction()`
* Check for `AssertLockNotHeld` in `EnforceBestChainLock()` instead of just having a comment in code
* Protect spork maps on (de)serialization
* Update key metadata when we find a key which appears to be used earlier than we expected
* Introduce second mode for `-rescan` to be able to rescan from genesis block
* Add `-rescan=2` option to Repair tab
* Expose `nTimeFirstKey` in `CreateWalletFromFile` logs and in `getwalletinfo` rpc
* fix: check `pIndex != nullptr`
* Ignore incorrect -rescan values
* qt: Introduce columns enum in masternode list
* qt: Add CMasternodeListWidgetItem to fix sorting in some columns
* Sort Service column properly too
* qt: Make CMasternodeListWidgetItem a template class
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* wallet: Add methods to store governance objects in the walletdb
* wallet: Cache all governance objects in m_gobjects + load them on start
* wallet: Assert cs_wallet is locked in LoadGovernanceObject
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* wallet: Extend a comment
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
* test: Add more C++ representing classes in message.py
* test: Add interface_zmq_dash.py
* test: Add interface_zmq_dash.py to BASE_SCRIPTS in test_runner.py
* test: Adjust hashrecoveredsig parsing
* Force node0 to finish syncing
* Avoid `uint256_to_string(uint256_from_str())`
* Be more specific in imports
* Plural for "publisher" when makes sense
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* implement whitelist for commands needed by Dash Platform
Signed-off-by: pasta <pasta@dashboost.org>
* Add test for platform command filtering
Signed-off-by: pasta <pasta@dashboost.org>
* Use less if statements
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* make defaultPlatformUser const
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* test: Make rpc_platform_filter.py executable
* test: Refactor tests in rpc_platform_filter.py
* minor modifications to rpc_platform_filter.py
Signed-off-by: pasta <pasta@dashboost.org>
* test: Expand test cases in rpc_platform_filter.py
* rpc: Use std::map instead of std::vector for platformAllowedCommands
* rpc: Improve readability and be more specific about the reject reason
* rpc: Fix comment
* rpc|httprpc: Rename RPC_PROTECTED_COMMAND to RPC_PLATFORM_RESTRICTION
* minor modifications to server.cpp
Signed-off-by: pasta <pasta@dashboost.org>
* add help text
Signed-off-by: pasta <pasta@dashboost.org>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
* tests: Use lower mocktime bump value to reset masternode probes in feature_llmq_simplepose.py
Bumping `50 * 60 + 1` should be enough, see https://github.com/dashpay/dash/blob/master/src/llmq/quorums_utils.cpp#L218-L222. Bumping `60 * 60 + 1` interferes with mnsync reset, see https://github.com/dashpay/dash/blob/master/src/masternode/masternode-sync.cpp#L112-L119.
* Fix expected connection count in llmq-signing.py and llmq-simplepose.py
* Sleep a couple of seconds to let mn sync tick to happen
* Move helper functions out of run_test
* Let helper functions return expect_contribution_to_fail
* No need to check for "punished" state in test_banning
* Split mninfos in test_banning and mine_quorum into "online" and "valid" sets
Needed for wait_for_masternode_probes in mine_quorum. Also, refactor and fix test_banning while at it.
* rpc: Fix parameter parsing in gobject_prepare() and gobject_submit()
The parameter description for those parameter declare them as "numeric". However, providing numbers there throws an rpc error prior to this commit because `get_str()` has a typecheck. Using `ParseInt32V`, `ParseInt64V` and `getValStr` fixes this issue with backwards compatibility i.e. it accepts integer strings and plain integers.
* rpc: Fix some parameter names in gobject_prepare() and gobject_submit()
a5929130223973636f3fd25fbfaf2953f2ec96a9 http: add missing header bootlegged by boost < 1.72 (Jan Beich)
Pull request description:
Regressed by boostorg/filesystem@9a14c37d6f. See [error log](https://github.com/bitcoin/bitcoin/files/3772177/bitcoin-0.18.1.log).
```c++
httpserver.cpp:74:10: error: no template named 'deque' in namespace 'std'
std::deque<std::unique_ptr<WorkItem>> queue;
~~~~~^
```
ACKs for top commit:
laanwj:
ACK a5929130223973636f3fd25fbfaf2953f2ec96a9
Tree-SHA512: fb0aee6a698c7aaa6a73baad7adc4f891be573af0d3cf6f4f59bc825afe5c0bc439c668077ff1990a6135522a0533a1a867430eebad28f0ade93fd79a95e179b
Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>
* Turn class members of QButtonGroup type into pointers, fix includes
* Move `BitcoinGUI::updateToolBarShortcuts()` into `GUIUtil::updateButtonGroupShortcuts()`
* Use `GUIUtil::updateButtonGroupShortcuts()` for tab buttons in options, rpcconsole and sign/verify dialog