Commit Graph

17540 Commits

Author SHA1 Message Date
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
Alexander Block
fa9b91b50f
Merge pull request #3376 from UdjinM6/merge_11824
Merge remaining bits of #11824: Block ActivateBestChain to empty validationinterface queue
2020-03-26 13:23:44 +01:00
UdjinM6
b1dff227cb Apply some review suggestions 2020-03-25 17:51:42 +03:00
Wladimir J. van der Laan
d94dd15de7
Merge #11718: tests: move pwalletMain to wallet test fixture
49bd659 tests: move pwalletMain to wallet test fixture (Wladimir J. van der Laan)

Pull request description:

  Scope the variable instead of using an external global; this is how test fixtures are intended to be used.

  Followup to #11713.

Tree-SHA512: 7d5bda93cdfe1329c8fe39bd72965906e36dad72fbb5d344ebedf26e66b1857510d01a3c2872d7f718fdeb23365e6ba71991aafe68e82781c6767a086b6d1590
2020-03-24 11:43:10 -05:00
MarcoFalke
9b1ebdb161
Merge #12902: [qa] Handle potential cookie race when starting node
75d0e4c544 [qa] Delete cookie file before starting node (Suhas Daftuar)

Pull request description:

  When a node is restarted during a test after an unclean shutdown (such
  as with -dbcrashratio), it's possible an old cookie file was left
  behind. This can cause a race condition when restarting the node, where
  the test framework might try to connect using credentials from the
  old cookie file, just as the node will generate new credentials and
  overwrite the old file.

  Delete any such cookie file if present prior to startup.

Tree-SHA512: ae1e8bf8fd20e07c32b0715025693bb28b0e3dd34f328cae4346abf579b0c97b5db1c02782e1c46b7a3b6058d268b6d46b668e847658a6eed0be857ffb0d65dc
2020-03-24 11:43:10 -05:00
Wladimir J. van der Laan
7afc672d80
Merge #12904: [qa] Ensure bitcoind processes are cleaned up when tests end
e36a0c0 [qa] Ensure bitcoind processes are cleaned up when tests end (Suhas Daftuar)

Pull request description:

  When tests fail (such as due to a bug in the test, race condition, etc), it's possible that we could follow code paths that bypass our normal node shutdown that occurs in `TestNode.stop_node`.  Add a destructor to `TestNode` that cleans this up.

Tree-SHA512: 72e04bc21462ebd0cb346fd1fe0540da454acfbad41923a0b06ea2317e9045b68e58f9adb02d8200891aca89a9d03a022eb72282aeb31a3b3afe7c6843a4b450
2020-03-24 11:43:10 -05:00