Commit Graph

17545 Commits

Author SHA1 Message Date
Alexander Block
e518ce4e13
Increase DIP0008 bip9 window by 10 years (#3391) 2020-04-02 08:19:41 +02:00
Alexander Block
1aba86567b
Merge pull request #3390 from codablock/pr_pose_ban_bad_connections
Implement checking of open ports and min proto versions in DKGs
2020-04-02 08:18:35 +02:00
Alexander Block
97ffcd369d Use !fMasternode to disable restart of mnsync instead of checking for regtest 2020-03-31 19:53:46 +02:00
Alexander Block
19e3e8733d Use Params().RequireRoutableExternalIP() wherever possible 2020-03-31 07:21:12 +02:00
Alexander Block
99414ed754 Fix fRequireRoutableExternalIP for devnets 2020-03-31 07:16:35 +02:00
Alexander Block
88d4f551c9 Move spork21 condition into VerifyConnectionAndMinProtoVersions 2020-03-31 07:11:27 +02:00
Alexander Block
a3c1fce551 Also test banning due to closed ports and old proto versions 2020-03-31 07:09:38 +02:00
Alexander Block
2de860685f Refactor test_banning to support more scenarios 2020-03-31 07:09:38 +02:00
Alexander Block
535698d31f Allow calling start_masternode from outside of start_masternodes 2020-03-31 07:09:38 +02:00
Alexander Block
41796bec06 Put (no-)banning loop into test_(no)_banning 2020-03-31 07:09:38 +02:00
Alexander Block
4dc483de26 Support waiting for probes in mine_quorum 2020-03-31 07:09:38 +02:00
Alexander Block
e980b18b68 Isolate instead of kill MNs in llmq-simplepose.py 2020-03-31 07:09:38 +02:00
Alexander Block
a308a092e2 Don't touch self.nodes/self.mninfo in llmq-simplepose.py 2020-03-31 07:09:38 +02:00
Alexander Block
908eb8372b Allow to pass list of online masternodes to mine_quorum 2020-03-31 07:09:38 +02:00
Alexander Block
dfe9daabd9 Fix test in LLMQSimplePoSeTest
This was intended to test for "not self.check_banned"
2020-03-31 07:07:52 +02:00
Alexander Block
3e3eba63e2 Fix LLMQ dkgBadVotesThreshold parameter in regtest and devnet 2020-03-31 07:07:52 +02:00
Alexander Block
d3586e1df0 Immediately close connections again when fNetworkActive==false 2020-03-31 07:07:52 +02:00
Alexander Block
cace76d07f Actually use LLMQConnectionRetryTimeout for probing 2020-03-31 07:07:52 +02:00
Alexander Block
38bf1a31fb Allow masternode mode and -listen=0 in regtest mode 2020-03-31 07:07:52 +02:00
Alexander Block
bb63327623 Don't restart mnsync in regtest when nothing happens for too long
This kept conflicting with the way we use mocktime and causes many DKG
failures.
2020-03-31 07:07:52 +02:00
Alexander Block
d16b7dbcb5 Implement hidden "-pushversion" parameter for PoSe testing 2020-03-31 07:07:52 +02:00
Alexander Block
32c83b432b Verify min proto version and open ports of LLMQ members and vote on bad ones 2020-03-31 07:07:52 +02:00
UdjinM6
f43cdbc586
Gradually bump mocktime in wait_for_quorum_connections (#3388)
* Gradually bump mocktime in wait_for_quorum_connections

* Lower nLLMQConnectionRetryTimeout to 1 sec for regtest
2020-03-31 07:06:41 +02:00
PastaPastaPasta
3b904a0fa1
Add a note about dash_hash under dependencies in test/README.md (#3386) 2020-03-30 15:22:06 +03:00
PastaPastaPasta
975f73be7a
Merge #11648: [tests] Add messages.py (#3372)
* [tests] Tidy up mininode.py module

Mostly move only. Adds a few extra comments.

* #11648  [tests] Move test_framework Bitcoin primitives into separate module

I manually recreated this commit, since we have A LOT of conflicts in mininode. However since it is primarily just a move, it was pretty easy to recreate

Signed-off-by: Pasta <pasta@dashboost.org>

* add import to messages.py

Signed-off-by: Pasta <pasta@dashboost.org>

* move import from mininode.py to messages.py

Signed-off-by: Pasta <pasta@dashboost.org>

* fix test failure

Signed-off-by: Pasta <pasta@dashboost.org>

* remove empty line at top of messages.py

Signed-off-by: pasta <pasta@dashboost.org>

* alphabetize MESSAGEMAP seperated by if it is dash specific or not

Signed-off-by: pasta <pasta@dashboost.org>

* remove accidentally added feefilter message

Signed-off-by: pasta <pasta@dashboost.org>

* Add missing getmnlistd/mnlistdiff messages to MESSAGEMAP

Co-authored-by: John Newbery <john@johnnewbery.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-03-30 15:21:47 +03:00
Alexander Block
b0668028b6
Implement more randomized behavior in GetQuorumConnections (#3385)
When taking the proTxHash naively, we might end up with a few unlucky MNs
which always have to perform most of the outbound connections while other
unlucky MNs would always have to wait for inbound connections. Hashing
the proTxHash with the quorum hash makes this more random.
2020-03-28 00:59:32 +03:00
Alexander Block
27dfb5a34d
Move wait_proc into wait_for_quorum_connections (#3384)
Adding this to wait_for_quorum_phase was useless as this was not the point
where failure was happening.
2020-03-28 00:59:02 +03:00
Alexander Block
ff6f391aea
Refactor Gitlab builds to use multiple stages (#3377)
* Remove unused jenkins stuff

* Install all dependencies in builder image

Instead of only target specific dependencies.

* Use docker builder image for builds

* Optimize apt installations

* Move building of dependencies into separate stage

The build-depends-xxx jobs will create artifacts (depends/$HOST) which are
then pulled in by the build jobs with the help of "needs"

* Remove use of caches from develop branch

* Use gitlab specific extends instead of YAML anchors

* Move before_script of build_template into base_template

* Add hack for parallel installation of i686 and arm cross compilation

* Install python3-setuptools in builder image

* Remove unnecessary change-dir

* Use variables to pass BUILD_TARGET instead of relying on the job name

* Move integration tests into separate stage

* Don't use --quiet for integration tests on Gitlab
2020-03-28 00:58:51 +03:00
UdjinM6
3c90da86b3
Merge pull request #3371 from PastaPastaPasta/backports-0.16-pr12
Backports 0.16 pr12
2020-03-28 00:58:08 +03:00
Alexander Block
a5a3e51554
Merge pull request #3380 from codablock/pr_all_mns_connected
Let all LLMQ members connect to each other instead of only a few ones
2020-03-27 17:07:44 +01:00
Alexander Block
a09e36106e Fix onlyOutbound handling 2020-03-27 15:12:20 +01:00
Alexander Block
f82204db95 Move intra-quorum connection calculation into local func 2020-03-27 15:12:20 +01:00
Alexander Block
fdec67a55b Wait for ping/pong after re-connecting all nodes 2020-03-27 15:12:20 +01:00
Alexander Block
882b58c990 Use <> instead of "" for #include 2020-03-27 15:12:20 +01:00
Alexander Block
dbaf13848d Include inbound connections in output of "quorum dkgstatus" 2020-03-27 15:12:20 +01:00
Alexander Block
7df624d380 Implement tests for LLMQ connection handling 2020-03-27 15:12:20 +01:00
Alexander Block
e8bbbec259 Don't try to open masternode connections when network is disabled 2020-03-27 15:12:20 +01:00
Alexander Block
c9608bf930 Only add wallet info to protx list/info when wallet is enabled 2020-03-27 15:12:20 +01:00
Alexander Block
9ef2b05884 Add masternode meta info to protx list/info 2020-03-27 15:12:20 +01:00
Alexander Block
8f644d18d7 Implement probing of public ip/port of LLMQ members 2020-03-27 15:12:20 +01:00
Alexander Block
14bb62ac8e Connect all LLMQ members to all other members 2020-03-27 15:12:20 +01:00
Alexander Block
486463d622 Add SPORK_21_QUORUM_ALL_CONNECTED 2020-03-27 15:12:20 +01:00
Alexander Block
6c95518807 Bump proto version 2020-03-27 15:12:20 +01:00
Alexander Block
8ab1a3734a
Bump mocktime each time waiting for phase1 fails (#3383)
This causes re-tries of LLMQ connections, which is required in cases
where 2 MNs tried to connect to each other and due to bad timing then
disconnected each other.
2020-03-27 15:12:03 +01:00
Alexander Block
c68b5f68aa
Hold CEvoDB lock while iterating mined commitments (#3379) 2020-03-27 15:11:42 +01:00
PastaPastaPasta
6e54327ef2 Apply suggestions from code review
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-03-26 17:09:23 -05:00
Alexander Block
deba865b17
Also verify quorumHash when waiting for DKG phases (#3382)
This is especially important when waiting for phase 1 (initialization),
as we might have skipped a whole DKG session before while the async DKG
session handler is still in the init phase (but for the old/skipped LLMQ).
2020-03-26 13:25:24 +01:00
Alexander Block
17ece14f40
Better/more logging for DKGs (#3381)
* Better/more logging for DKGs

* Use type name instead of type number in CDKGLogger
2020-03-26 13:25:01 +01:00
Alexander Block
80be2520a2
Call FlushBackgroundCallbacks before resetting CConnman (#3378) 2020-03-26 13:24:31 +01:00
Alexander Block
b6bdb8be9e
Faster opening of masternode connections (#3375)
Only sleep 100ms when we previously tried to connect a MN. The back-off
logic in ThreadOpenMasternodeConnections will prevent too many unsuccessful
connects to offline/bad nodes.
2020-03-26 13:24:06 +01:00