Commit Graph

15513 Commits

Author SHA1 Message Date
UdjinM6
721965990a
Add missing help text for operatorPayoutAddress (#2679) 2019-02-04 12:52:24 +03:00
UdjinM6
68c0de4ba1
Do not send excessive messages in governance sync (#2124)
No need to send gobject inv for a single gobject, the other node already knows it, so send votes only.
Also, no need to send "fake" stats like "0 votes" when syncing gobjects and "1 object" when syncing votes.
Rename functions accordingly.
2019-02-04 12:51:37 +03:00
UdjinM6
09e71de808
Fix bench log for payee and special txes (#2678) 2019-02-02 03:09:03 +03:00
Alexander Block
03fa115503 Speed up CQuorumManager::ScanQuorums (#2677)
* Store quorumHash of first mined commitment in evoDb

This allows to skip scanning for quorums below this block.

* Speed up CQuorumManager::ScanQuorums

This does 2 things:
1. Only call HasQuorum for blocks that are potentially a quorumBlockHash
   These are only blocks which are at index 0 of each DKG interval
2. Stop scanning for quorums when we get below the first block that
   contained a commitment. If no commitment was ever mined, we bail out
   immediately.

* Return result instead of {}

* Remove HasQuorum() call as GetQuorum already does this

* Remove unnecessary "if (!qc.IsNull()))"

It's already checked at the top of the loop

* When necessary, remove DB_FIRST_MINED_COMMITMENT from evoDb in UndoBlock
2019-02-02 03:08:51 +03:00
strophy
31755267a8 Missing = characters (#2676) 2019-02-01 12:07:39 +03:00
Alexander Block
088525bde3 Multiple fixes for LLMQs and BLS batch verification (#2674)
* Check aggPubKey for IsValid() instead of aggSig

aggSig is not reliable here as it might already be initialized by the
previous message.

* Significantly reduce sleep time for each DKG phase

Turns out the DKG is much faster then expected, and waiting multiple
minutes for each phase in a devnet is not much fun.

* Correctly use SIGN_HEIGHT_OFFSET when checking for out of bound height

* Introduce startBlockHeight to make things more explicit
2019-02-01 12:07:21 +03:00
UdjinM6
ae70e8a344
Fix negative "keys left since backup" (#2671) 2019-02-01 12:07:03 +03:00
UdjinM6
2a330f17ac
Fix endless wait in RenameThreadPool (#2675) 2019-02-01 10:49:31 +03:00
Alexander Block
1400df2e58 Invoke CheckSpecialTx after all normal TX checks have passed (#2673)
Otherwise duplicate-keys checks for deterministic masternodes triggers
for duplicate/identical transactions.
2019-02-01 10:49:18 +03:00
Alexander Block
18950f923e Optimize DKG debug message processing for performance and lower bandwidth (#2672)
* Allow sub-batch verification in CBLSInsecureBatchVerifier

* Implement batch verification of CDKGDebugStatus messages

* Use uint8_t for statusBitset in CDKGDebugMemberStatus and CDKGDebugSessionStatus

No need to waste one byte per member and per LLMQ type.

* Reserve 4k of buffer for CSerializedNetMsg buffer

Profiling has shown that a lot of time is spent in resizing the data
vector when large messages are involved.

* Remove nHeight from CDKGDebugStatus

This field changes every block and causes all masternodes to propagate
its status for every block, even if nothing DKG related has changed.

* Leave out session statuses when we're not a member of that session

Otherwise MNs which are not members of DKG sessions will spam the network

* Remove receivedFinalCommitment from CDKGDebugSessionStatus

This is not bound to a session and thus is prone to spam the network when
final commitments are propagated in the finalization phase.

* Add "minableCommitments" to "quorum dkgstatus"

* Hold cs_main while calling GetMinableCommitment

* Abort processing of pending debug messages when spork18 gets disabled

* Don't ask for debug messages when we've already seen them

"statuses" only contains the current messages but none of the old messages,
so nodes kept re-requesting old messages.
2019-02-01 10:49:01 +03:00
UdjinM6
5d1c97da1b
Add getspecialtxes rpc (#2668)
* Add getspecialtxes rpc

Returns an array of special transactions found in the specified block

* small help text tweak

* add comments
2019-01-30 21:53:22 +03:00
Alexander Block
ca6c8f5471 Add missing default value for SPORK_19_CHAINLOCKS_ENABLED (#2670) 2019-01-30 21:53:03 +03:00
Alexander Block
6da341379d Use smaller LLMQs for ChainLocks on testnet and devnet (#2669)
* Move llmqChainLocks initialization closer to other LLMQ related assignments

* Use smaller LLMQs for ChainLocks on testnet and devnet

We very often don't have enough MNs on testnet so we should use a smaller
quorum quorum for ChainLocks.
2019-01-30 21:52:41 +03:00
Alexander Block
54f576ea7c
Fix LLMQ related test failures on Travis (#2666)
* Use fast_dip3_enforcement instead of fast_dip3_activation

DashTestFramework was refactored before ChainLocks got merged, causing tests
to fail now.

* Move updating of DKG debug status into WaitForNextPhase

Otherwise callers of the RPCs might believe that the next phase has already
started and start producing more blocks, which would then cancel the
current session if it happens faster than the phase handler thread can
progress to the next phase.
2019-01-30 14:05:22 +01:00
Alexander Block
6fe479aa12
Don't leak skShare in logs (#2662) 2019-01-30 14:05:04 +01:00
Alexander Block
f6828b19b6
Merge pull request #2643 from codablock/pr_llmq_chainlocks
Implement LLMQ based ChainLocks
2019-01-29 15:59:05 +01:00
UdjinM6
559bdfc6ef ProcessSpecialTxsInBlock should respect fJustCheck (#2653)
* ProcessSpecialTxsInBlock should respect fJustCheck

Also invoke it after subsidy/payee checks

* Drop fJustCheck from CQuorumBlockProcessor
2019-01-29 15:57:30 +01:00
UdjinM6
805aeaa16c Drop cs_main from UpdatedBlockTip in CDKGSessionManager/CDKGSessionHandler (#2655) 2019-01-29 15:55:18 +01:00
UdjinM6
2a4fbb6e48 Bump block stats when adding commitment tx into block (#2654) 2019-01-29 15:54:57 +01:00
UdjinM6
25cb14b615 Fix confusion between dip3 activation and enforcement (#2651)
* Fix confusion between dip3 activation and enforcement

* drop DIP0003ActivationHeight for now
2019-01-29 15:54:38 +01:00
PastaPastaPasta
7caf9394e3 drop dash-docs folder and instead link to dash-docs.github.io in README (#2650) 2019-01-29 15:54:21 +01:00
UdjinM6
70a9e905c2 Use helper function to produce help text for params of protx rpcs (#2649)
* Adjust help text of `register*` rpc commands

Copy/paste help for various fields of `register`/`register_prepare` instead of referring to `register_fund`
Adjust description of provided functionality and expected results

* Adjust whitespaces to match in different protx commands

* Add missing results descriptions

* Introduce new helper function GetHelpString to concentrate most of param descriptions in rpcevo in one place

* [MOVEONLY] Move GetHelpString out of #ifdef ENABLE_WALLET/#endif

* static const
2019-01-29 15:54:01 +01:00
PastaPastaPasta
f123248f1c update copyright (#2648)
* update copyright

* Update copyright in configure.ac and COPYING
2019-01-29 15:53:14 +01:00
Alexander Block
15e1c3b080
Merge pull request #2646 from PastaPastaPasta/backports-0.15-pr4
Backports 0.15 pr4
2019-01-29 15:52:03 +01:00
Alexander Block
45391b4f08
Merge pull request #2609 from PastaPastaPasta/backports-0.15-pr3
Backports 0.15 pr3
2019-01-29 15:51:15 +01:00
UdjinM6
d398bf0527
reverse order from jsonRequest, strSubCommand
Co-Authored-By: PastaPastaPasta <pasta@dashboost.org>
2019-01-28 10:47:36 -06:00
Alexander Block
ad4b3cda30 Instead of asserting signatures once, wait for them to change to the expected state 2019-01-28 14:45:20 +01:00
Alexander Block
3237668b1d Rename inInvalidate->inEnforceBestChainLock and make it atomic 2019-01-28 12:24:15 +01:00
Alexander Block
5033d5ef4a Don't check for conflicting ChainLocks when phashBlock is not set
Also don't set indexDummy.phashBlock in TestBlockValidity anymore.
2019-01-28 12:24:15 +01:00
Alexander Block
08d915dc2d Increase waiting time in LLMQ signing tests 2019-01-28 12:24:15 +01:00
Alexander Block
886299a400 Implement llmq-chainlocks.py integration tests 2019-01-28 12:24:15 +01:00
Alexander Block
3413ff917b Add info about ChainLocks to block and transaction RPCs 2019-01-28 12:24:15 +01:00
Alexander Block
135829dc49 Add SPORK_19_CHAINLOCKS_ENABLED 2019-01-28 12:24:15 +01:00
Alexander Block
29532ba196 Implement and enforce ChainLocks 2019-01-28 12:24:15 +01:00
Alexander Block
2bf6eb1c7c Track parent->child relations for blocks
Allows to cheaply find all possible children of a block.
2019-01-28 12:24:15 +01:00
Alexander Block
04a51c9ef4 Use a block that is 8 blocks in the past for SelectQuorumForSigning
Otherwise nodes might already fail to verify sigs when just 1 block away
from the tip.
2019-01-28 12:24:15 +01:00
Alexander Block
cf33efc9e1 Move SelectQuorumForSigning into CSigningManager and make it height based 2019-01-28 12:24:15 +01:00
Alexander Block
4026ea203b Implement VerifyRecoveredSig to allow verifcation of sigs found in P2P messages 2019-01-28 12:24:15 +01:00
Alexander Block
9f211ef12d Add listener interface to listen for recovered sigs 2019-01-28 12:24:15 +01:00
Alexander Block
189cee2108 Don't pass poolSize to SelectQuorum and instead use consensus params 2019-01-28 12:24:15 +01:00
Alexander Block
13855674d7 Add missing new-line character in log output 2019-01-28 12:24:15 +01:00
UdjinM6
d31edf66ad Wait for script checks to finish before messing with txes in Dash-specific way (#2652)
Benchmark Dash part while at it
2019-01-28 12:23:59 +01:00
UdjinM6
2c477b0d41 Fix no_wallet for rpcmasternode/rpcevo 2019-01-25 15:50:22 -06:00
Pasta
fc00b7baea
add import to rpcevo fixing backport 8775 2019-01-25 07:11:21 -06:00
UdjinM6
30b03863ee
Apply suggestions from code review #2646
Co-Authored-By: PastaPastaPasta <pasta@dashboost.org>
2019-01-25 07:06:59 -06:00
Pasta
c70aa60792 change #8775 to keep dash codebase improvement, but still backport #9908 2019-01-24 22:28:32 -06:00
Wladimir J. van der Laan
afdb0a2677 Merge #9908: Define 7200 second timestamp window constant
e57a1fd Define 7200 second timestamp window constant (Russell Yanofsky)

Tree-SHA512: 449d20e4fd23905cd96be36f717c55a0a2360aba1002aaf55a3699cce4a41f6e94acc2fbe511a93c5cbe8f8e68386995a76cad67620ebb66ba9283e6080ab567
2019-01-24 22:28:29 -06:00
Pasta
c094d4bbe6 fix #8775 backport 2019-01-24 22:28:27 -06:00
Pasta
f9147466f3 remove other rpc references to pwalletMain 2019-01-24 22:28:18 -06:00
Pasta
d7474fd56f remove all references to pwalletMain in rpc folder 2019-01-24 22:28:16 -06:00