Commit Graph

15374 Commits

Author SHA1 Message Date
Alexander Block
b7b436b7d4 Apply review suggestions to rpcquorums.cpp 2019-01-11 07:35:57 +01:00
Alexander Block
3fe9910633 Drop unused overload of GetMasternodeQuorums 2019-01-11 07:31:54 +01:00
UdjinM6
5daeedabf0 Batched logger should not break log parsing
It's expected to have timestamp to be the first thing in every row if it's not a whitespace
2019-01-11 07:07:54 +01:00
Alexander Block
2aed51c559 Give nodes more time per phase when doing PoSe tests
Nodes started randomly voting other members as bad members because
contributions were not received fast enough.
2019-01-10 07:08:51 +01:00
Alexander Block
5958f8b81d Remove dkgRndSleepTime from consensus params and make sleeping it non-random 2019-01-10 07:07:58 +01:00
Alexander Block
0dae46c2fb Move RandBool() into random.h/cpp 2019-01-09 12:16:12 +01:00
Alexander Block
e1901d24aa Handle review suggestions 2019-01-09 12:16:12 +01:00
Alexander Block
352edbd33e Introduce SPORK_18_QUORUM_DEBUG_ENABLED to enable/disable LLMQ debug messages 2019-01-09 12:16:12 +01:00
Alexander Block
324406bfed Implement debugging messages and RPC for LLMQ DKGs 2019-01-09 12:16:12 +01:00
Alexander Block
098b094959 Pass scheduler to InitLLMQSystem 2019-01-09 12:16:12 +01:00
Alexander Block
a1f4853d64 Use LLMQ DKGs for PoSe testing in DIP3 tests 2019-01-09 12:16:12 +01:00
Alexander Block
6836f8c38b Implement LLMQ DKG 2019-01-09 12:16:12 +01:00
Alexander Block
318b598139 Prepare inter-quorum masternode connections 2019-01-09 12:16:11 +01:00
Alexander Block
4bf736f332 Add cxxtimer header only libraries
https://github.com/andremaravilha/cxxtimer
Commit: 7d208ebba79e85da8efae5a4b8996846a68bee0f
2019-01-09 12:16:11 +01:00
Alexander Block
c6be8cfcd6 Allow to skip malleability check when deserializing BLS primitives
Useful when many sigs need to be deserialized and at the same time the hash
of these is never used.
2019-01-09 12:16:11 +01:00
Alexander Block
9d25bb1d8f Add batched logger 2019-01-09 12:16:11 +01:00
Alexander Block
0df3871d14 Remove dummy DKG 2019-01-09 12:16:11 +01:00
UdjinM6
55f205eba1
A couple of fixes for masternode list rpc (#2615)
* fix payee

* add keyidowner/keyidvoting/pubkeyoperator ifields/filter to "json" option

* fix whitespaces
2019-01-08 13:36:35 +03:00
UdjinM6
fa18d3e102
More fixes for PrivateSend after 2612 (#2614)
* Fix CPrivateSendServer::IsSessionReady()

Also move it to cpp

* Make sure nSessionMaxParticipants is initialized properly

* Adjust logging

* adjust log a bit more
2019-01-08 13:36:12 +03:00
UdjinM6
bade332733
Fix 2612 (#2613) 2019-01-07 18:01:14 +03:00
PastaPastaPasta
5c5932eb93 [PrivateSend] Allow more than 3 mixing participants (#2612) 2019-01-07 13:21:10 +03:00
UdjinM6
0acfbf640d
Gracefully shutdown on evodb inconsistency instead of crashing (#2611) 2019-01-07 12:58:09 +03:00
PastaPastaPasta
07dcddb4ca Backports 0.15 pr2 (#2597)
* Merge #9815: Trivial: use EXIT_ codes instead of magic numbers

a87d02a use EXIT_ codes instead of magic numbers (Marko Bencun)

* Merge #9801: Removed redundant parameter from mempool.PrioritiseTransaction

eaea2bb Removed redundant parameter from mempool.PrioritiseTransaction (gubatron)

* remove extra parameter (see 3a3745bb) in dash specific code

* Merge #9819: Remove harmless read of unusued priority estimates

bc8fd12 Remove harmless read of unusued priority estimates (Alex Morcos)

* Merge #9766: Add --exclude option to rpc-tests.py

c578408 Add exclude option to rpc-tests.py (John Newbery)

* Merge #9577: Fix docstrings in qa tests

3f95a80 Fix docstrings in qa tests (John Newbery)

* Merge #9823: qa: Set correct path for binaries in rpc tests

3333ad0 qa: Set correct path for binaries in rpc tests (MarcoFalke)

* Merge #9833: Trivial: fix comments referencing AppInit2

ef9f495 Trivial: fix comments referencing AppInit2 (Marko Bencun)

* Merge #9612: [trivial] Rephrase the definition of difficulty.

dc222f8 Trivial: Rephrase the definition of difficulty in the code. (Karl-Johan Alm)

* Merge #9847: Extra test vector for BIP32

30aedcb BIP32 extra test vector (Pieter Wuille)

* Merge #9839: [qa] Make import-rescan.py watchonly check reliable

864890a [qa] Make import-rescan.py watchonly check reliable (Russell Yanofsky)

Tree-SHA512: ea0e2b1d4fc8f35174c3d575fb751b428daf6ad3aa944fad4e3ddcc9195e4f17051473acabc54203b1d27cca64cf911b737ab92e986c40ef384410652e2dbea1

* Change back file params
2019-01-07 12:55:35 +03:00
strophy
04d1671b9c armv7l build support (#2601)
* Fixes from Bitcoin #12474

This commit fixes building of boost and openssl on armv7l as described in Bitcoin issue #12474

* Prevent compiler from emitting illegal instructions to armv7l CPUs

* Limit dwsize for armv7l

* Remove superfluous cppflags argument
2019-01-05 08:53:37 +03:00
Alexander Block
7d58d87f43 Remove a few sporks which are not used anymore (#2607)
* Remove SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT

And always enforce payments.

* Remove SPORK_10_MASTERNODE_PAY_UPDATED_NODES and SPORK_10_MASTERNODE_PAY_UPDATED_NODES
2019-01-03 23:08:51 +03:00
Alexander Block
d1910eaff4 Refactor remains of CMasternode/-Man into CMasternodeMeta/-Man (#2606)
* Split up remaining logic from CMasternodeMan into CMasternodeMetaMan and CMasternodeUtils

Also get rid of CMastermode and store remaining meta info
in CMasternodeMetaInfo

* Also allow non-const T in Serialize/Unserialize for shared_ptr

* Rename CActiveDeterministicMasternodeManager to CActiveMasternodeManager

* Fix nowallet compile in masternode-utils.cpp
2019-01-03 23:08:34 +03:00
Alexander Block
cdc8ae9436 Don't hold CDeterministicMNManager::cs while calling signals (#2608)
This is causing potential deadlocks due to governance calling back into
CDeterministicMNManager but with a differnent lock order.
2019-01-03 15:24:28 +03:00
Alexander Block
968eb3fc5d Add real timestamp to log output when mock time is enabled (#2604)
* Implement IsMockTime to test for mock time

* Add real timestamp to log output when mock time is enabled

This makes debugging on Travis easier as it gives a hint about timing
behavior.
2019-01-03 12:21:19 +03:00
Alexander Block
0648496e21 Fix flaky p2p-fullblocktest (#2605)
* Announce blocks as HEADERS instead of INV in comptool

Announcing as INV results in one GETHEADERS message per INV item with
every GETHEADERS containing the same block locator info. This in turn
results in many (1088 in p2p-fullblocktests) replies with each having i+1
headers. As every message is sent in one go, the message processing queue
gets overloaded, leading to GETDATA timeouts for blocks and thus failing
the tests.

Announcing the blocks directly with HEADERS avoids all this and results in
one GETDATA per announced header.

This will later conflict with backported improvements from Bitcoin. When we
get to this point, we can simply ignore changes on Dash's side and take
the improvements from Bitcoin (which also switch to header announcement,
but after some refactorings)

* Give wait_for_pings more time

Large reorgs as in the p2p-fullblocktest can cause very long long delays
for the ping that we're waiting for. This was not a problem before #2593,
as before this wait_until was waiting forever.
2019-01-03 12:21:03 +03:00
Alexander Block
96d4f74592 Try to fix flaky IX tests in DIP3 tests (#2602)
* Send larger amounts for IX

* Don't use node0 as sender of IX transactions

node0 tends to have many small UTXOs which result in TXs with many inputs
and high CPU usage.
2019-01-03 12:20:41 +03:00
PastaPastaPasta
896733223e Dashify copyright_header.py (#2598)
* dashify copyright_headers.py

* copyright for copyright_header.py

* dash -> Dash Core

Co-Authored-By: PastaPastaPasta <pasta@dashboost.org>

* dashify readme
2019-01-03 12:20:22 +03:00
UdjinM6
c58f775cc2
De-dashify env vars and dashify help text in tests instead (#2603) 2019-01-03 12:19:46 +03:00
PastaPastaPasta
a49f4123e5 Backports 0.15 pr1 (#2590)
* Merge #9744: Remove unused module from rpc-tests

a432aa0 Remove unused module from rpc-tests (Takashi Mitsuta)

* Merge #9696: [trivial] Fix recently introduced typos in comments

0c9b9b7 [trivial] Fix recently introduced typos in comments (practicalswift)

* Merge #9657: Improve rpc-tests.py

a6a3e58 Various review markups for rpc-tests.py improvements (John Newbery)
3de3ccd Refactor rpc-tests.py (John Newbery)
afd38e7 Improve rpc-tests.py arguments (John Newbery)
91bffff Use argparse in rpc_tests.py (John Newbery)
1581ecb Use configparser in rpc-tests.py (John Newbery)

* Merge #9724: Qt/Intro: Add explanation of IBD process

f6d18f5 Qt/Intro: Explain a bit more what will happen first time (Luke Dashjr)
50c5657 Qt/Intro: Storage shouldn't grow significantly with pruning enabled (Luke Dashjr)
9adb694 Qt/Intro: Move sizeWarningLabel text into C++ code (Luke Dashjr)

* Merge #9794: Minor update to qrencode package builder

1bfe6b4 Use package name variable inside $(package)_file_name variable (Mitchell Cash)

* Merge #9726: netbase: Do not print an error on connection timeouts through proxy

3ddfe29 netbase: Do not print an error on connection timeouts through proxy (Wladimir J. van der Laan)
13f6085 netbase: Make InterruptibleRecv return an error code instead of bool (Wladimir J. van der Laan)

* Merge #9727: Remove fallbacks for boost_filesystem < v3

056aba2 Remove fallbacks for boost_filesystem < v3 (Wladimir J. van der Laan)

* Merge #9485: ZMQ example using python3 and asyncio

b471daf Adddress nits, use asyncio signal handling, create_task (Bob McElrath)
4bb7d1b Add python version checks and 3.4 example (Bob McElrath)
5406d51 Rewrite to not use Polling wrapper for asyncio, link to python2.7 example (Bob McElrath)
5ea5368 ZMQ example using python3 and asyncio (Bob McElrath)

* Merge #9807: RPC doc fix-ups.

851f6a3 [qa][doc] Correct rpc test options in readme (fanquake)
41e7219 [trivial] Add tests_config.ini to .gitignore (fanquake)

* Dashify

Co-Authored-By: PastaPastaPasta <pasta@dashboost.org>

* Change file permissions

* update travis.yml -parallel -> --jobs
2019-01-03 12:18:47 +03:00
Alexander Block
f95aae2b30 Remove all legacy/compatibility MN code (#2600)
* Remove CActiveLegacyMasternodeManager

* Remove sentinelping RPC

* Remove unused P2P messages and inv types

There are still places where these are used in the code. The next commits
will clean these up.

* Remove MNB/MNP/MNVERIFY related code from masternode(man).h/cpp

* Remove all legacy code regarding block MN payee voting

* Remove MASTERNODE_SYNC_LIST and MASTERNODE_SYNC_MNW states

Also replace all uses of IsMasternodeListSynced and IsWinnersListSynced
with IsBlockchainSynced.

* Remove unsupported masternode RPCs

* Remove UpdateLastPaid methods

* Remove duplicate deterministicmns.h include

* Remove masternode.conf support

* Remove legacy MN lists support from masternode list GUI

* Remove unnecessary AskForMN call

* Remove compatibility code in CPrivateSendQueue::GetSignatureHash

* Don't add locally calculated MN payee in case GetBlockTxOuts failed

This is not valid in DIP3 mode

* Remove check for IsDeterministicMNsSporkActive in "masternode status"

* Move CMasternode::IsValidNetAddr to CActiveDeterministicMasternodeManager

* Remove use of CMasternode::CheckCollateral in governance code

* Remove uses of MASTERNODE_SENTINEL_PING_MAX_SECONDS/MASTERNODE_SENTINEL_PING_MAX_SECONDS

* Remove support for "-masternodeprivkey"

* Remove pre-DIP3 vote cleanup

* Remove compatibility code for quorumModifierHash/masternodeProTxHash

* Remove check for invalid nBlockHeight in CMasternodePayments::GetBlockTxOuts

...and let it crash instead. We expect this method to be called with the
correct height now (after DIP3 was fully deployed).

* Remove ECDSA based Sign/CheckSignature from CGovernanceObject

Only masternodes sign governance objects, so there is no need for ECDSA
support here anymore.

* Always add superblock and MN reward payments into new block

* Always check block payees (except if fLiteMode==true)

* Always allow superblock and MN payees in same block

* Remove/Fix a few references to masternode.conf and related stuff

Also delete guide-startmany.md and masternode_conf.md

* Implement NotifyMasternodeListChanged signal and call governance maintenance

* Remove non-DIP3 code path from CMasternodeMan::Find

* Remove remaining unused code from CMasternode/CMasternodeMan

* Always load governance.dat on startup

* Mine an empty block instead of incrementing nHeight from chain tip in miner tests

This test is crashing otherwise in GetBlockTxOuts as it tries to access a
previous block that is not existing.

* Skip MN payments verification on historical blocks (pre-DIP3 blocks)

Even though DIP3 was active on BIP9 level, the spork was not active yet at
that point meaning that payments were not enforced at that time.

* Remove unused state and CollateralStatus enums

* Unconditionally return false from IsBlockPayeeValid when IsTransactionValid returns false

IsTransactionValid already handles the case where IsDIP3Active() returns
false, making it return true.

* Add override keyword to CDSNotificationInterface::NotifyMasternodeListChanged

* Fix help for masternodelist status (POSE_BANNED and no OUTPOINT_SPENT)
2019-01-03 12:17:43 +03:00
Alexander Block
46a6fc33e8
Merge pull request #2594 from codablock/pr_dip3_cleanup_directlyusedmnmgr
Directly use deterministicMNManager instead of compat code in CMasternodeMan
2019-01-02 06:58:33 +01:00
Alexander Block
119f1c9d6f
Merge pull request #2593 from codablock/pr_backport_10365
Backport: #10365: [tests] increase timeouts in sendheaders test
2019-01-02 06:57:57 +01:00
Alexander Block
0e28f0aa93
Fix flaky autoix tests by disabling autoix while filling mempool (#2595)
* Increment mocktime before setting new SPORK_16_INSTANTSEND_AUTOLOCKS value

Otherwise nodes will not update sporks as they use the same timestamps.

* Disable autoix while filling mempool

* Retest autoix and regular ix after clearing mempool
2019-01-02 06:57:38 +01:00
Alexander Block
78c22ad0fb Multiple fixes for "masternode list"
1. Make strMode lower case before comparing it (keyIDXXX would otherwise
   be case sensitive, leading to confusion for users)
2. Remove "rank" and "keyid" mode from help
3. Add keyIDOwner/keyIDVoting/pubKeyOperator to help and strMode check
4. Remove "pubkey" from strMode check
5. Call ToString() on address instead of whole DMN state
6. Add missing std::setw(10) to "full" mode
2018-12-31 14:05:23 +01:00
Alexander Block
e54f6b274a Use ban score of 10 for invalid DSQ sigs 2018-12-31 14:01:04 +01:00
UdjinM6
536229d170
Apply suggestions from code review
Co-Authored-By: codablock <ablock84@gmail.com>
2018-12-31 13:57:58 +01:00
MarcoFalke
75024e1173 Merge #10365: [tests] increase timeouts in sendheaders test
56befa0 [tests] increase timeouts in sendheaders test (John Newbery)
b0bfa23 [tests] Make wait_until timeout 60 seconds by default (John Newbery)

Tree-SHA512: ca68ad91a7cabb0673f230631a9f2196a4a394cf7cea7a266b3dad3923f7887d2a192ceedd68f7a4a06d105a7d13870e75e971193b93476f8d72b34639d7c3d1
2018-12-31 09:38:08 +01:00
Alexander Block
1efd773580 Remove non-DIP3 code path in CMasternodePayments::IsScheduled
This relies on mnInfo which is not present anymore as we directly use
deterministicMNManager now.
2018-12-31 08:15:45 +01:00
Alexander Block
4c749b7e94 Directly use deterministicMNManager in "masternode list"
Also remove GetFullMasternodeMap
2018-12-31 08:15:45 +01:00
Alexander Block
0fe97a0459 Remove support for "masternode list rank" 2018-12-31 08:15:45 +01:00
Alexander Block
adc2ec2253 Remove unsupported types/fields from "masternode list" 2018-12-31 08:15:45 +01:00
Alexander Block
4b150e72f1 Directly use deterministicMNManager instead of mnodeman.CountXXX 2018-12-31 08:15:45 +01:00
Alexander Block
4c3bb73045 Remove call to mnodeman.PoSeBan 2018-12-31 08:15:45 +01:00
Alexander Block
0594cd7197 Remove code that is incompatible now due to GetMasternodeRanks returning DMNs now
It's ok to remove this code as we're later going to completely remove it.
Until then, this code is dead nevertheless.
2018-12-31 08:15:45 +01:00
Alexander Block
37541ee00e Change GetMasternodeScores and GetMasternodeRank/s to use CDeterministicMNCPtr
This leaves us with nMinProtocol unused, but this is ok as we will later
remove that argument completely.
2018-12-31 08:15:45 +01:00
Alexander Block
17c792cd3b Remove MN upgrade check in ComputeBlockVersion
Has to be replaced with something new in the future.
2018-12-31 08:15:45 +01:00