Commit Graph

15858 Commits

Author SHA1 Message Date
Alexander Block
999848432a Implement dip4-coinbasemerkleroots.py integration tests 2019-04-04 10:39:15 +02:00
Alexander Block
ade5760a92 Allow registering MNs without actually starting them
This can be done by calling prepare_masternode() when inside run_test.
Also implement remove_masternode() which spends the collateral.
2019-04-04 10:39:15 +02:00
Alexander Block
ef6b6a1e64 Implement support for GETMNLISTD and MNLISTDIFF P2P message in mininode.py 2019-04-04 10:39:15 +02:00
Alexander Block
585b9c2818 Make CBlock.get_merkle_root static
We'll later need this method to calculate merkle roots outside of CBlock.
I'd like to avoid moving this code outside of CBlock as it might later
conflict with Bitcoin backports.
2019-04-04 10:39:15 +02:00
Alexander Block
1e0bdbc9b7 Implement CPartialMerkleTree and CMerkleBlock in mininode.py
Needed for upcoming MNLISTDIFF message support.
2019-04-04 10:39:15 +02:00
Alexander Block
297c266e91
Merge pull request #2831 from codablock/pr_v13_release
[0.13.x] Bump version to 0.13.3.0 and add release notes
2019-04-04 10:33:03 +02:00
UdjinM6
7022e83432
Update doc/release-notes.md
Co-Authored-By: codablock <ablock84@gmail.com>
2019-04-04 09:32:24 +02:00
Alexander Block
317ca5003b Add release notes for 0.13.3.0 2019-04-04 09:23:12 +02:00
Alexander Block
25038ff36e Bump version to 0.13.3.0 2019-04-04 09:02:09 +02:00
Alexander Block
53b2162e28
Harden spork15 value to 1047200 when on mainnet (#2830)
This is a hackish version of https://github.com/dashpay/dash/pull/2824,
meant for 0.13.x only. The reason for this hackish version is that the
code has diverged quite a bit and its not worth the effort to backport
the hardening code.

Even though 0.13.x included a lot of fixes for sporks handling and syncing,
I still feel more safe with hardening the spork15 block height. If
something goes wrong with spork syncing (e.g. its slower then the first
DIP2/3 block arrives), the whole sync process will fail otherwise.
2019-04-04 09:01:28 +02:00
Alexander Block
3db4e3111d
Merge pull request #2828 from codablock/pr_v13_backports
[0.13.x] Backports from develop
2019-04-04 08:35:21 +02:00
Alexander Block
d8778f5554 Implement CService in mininode.py 2019-04-04 08:24:38 +02:00
Alexander Block
02480402be Implement deser_dyn_bitset and ser_dyn_bitset in mininode.py 2019-04-04 08:24:33 +02:00
Alexander Block
575cafc011 Do not skip pushing of vMatch and vHashes in CMerkleBlock (#2826)
Even if its a TX type which we don't want in merkle blocks. Wrongfully
omitting the pushes causes invalid partial merkle trees, which in turn
causes SPV nodes to ban us.
2019-04-04 08:21:52 +02:00
Alexander Block
b0850fad06
Do not skip pushing of vMatch and vHashes in CMerkleBlock (#2826)
Even if its a TX type which we don't want in merkle blocks. Wrongfully
omitting the pushes causes invalid partial merkle trees, which in turn
causes SPV nodes to ban us.
2019-04-04 08:11:04 +02:00
UdjinM6
8c58799d8d There can be no two votes which differ by the outcome only (#2819) 2019-04-04 07:28:12 +02:00
UdjinM6
66c2f39531 Fix vote ratecheck (#2813) 2019-04-04 07:27:11 +02:00
gladcow
b52d0ad194 Fix revoke reason check for ProUpRevTx (#2787) 2019-04-04 07:26:53 +02:00
UdjinM6
35914e0842 Skip mempool.dat when wallet is starting in "zap" mode (#2782) 2019-04-04 07:26:30 +02:00
UdjinM6
46d875100b Disable in-wallet miner for win/macos Travis/Gitian builds (#2778)
* Add new configure option to disable in-wallet miner

* Use new option to disable in-wallet miner for win/macos Travis/Gitian builds
2019-04-04 07:26:12 +02:00
Alexander Block
122566768e
Specify DIP3 enforcement block height/hash for mainnet params (#2824) 2019-04-04 06:39:38 +02:00
Nathan Marley
58589fb50a Trivial: Fix a couple typos (#2818)
* sp: s/signReqeust/signRequest/g

* sp: s/documenation/documentation/
2019-04-04 06:39:28 +02:00
UdjinM6
992922c495 Specify DIP3 enforcement block height/hash for mainnet params 2019-04-03 12:15:41 +03:00
Alexander Block
a370bbfe3d Update immer library to current master (0a718d2d76bab6ebdcf43de943bd6c7d2dbfe2f9) (#2821)
* Update immer library to current master (0a718d2d76bab6ebdcf43de943bd6c7d2dbfe2f9)

* Temporary fix for alignof(std::max_align_t) on MinGW 32bit builds

See https://github.com/arximboldi/immer/issues/78
2019-04-01 14:10:49 +03:00
UdjinM6
9f04855ae0
Fix blsWorker (#2820)
Use a pointer instead of a static variable, start/stop together with other llmq modules.
2019-04-01 14:10:39 +03:00
UdjinM6
377dd3b822
There can be no two votes which differ by the outcome only (#2819) 2019-04-01 14:10:28 +03:00
UdjinM6
a87909ec35
Keep the most recent gobject votes only (#2815)
* Keep the most recent gobject vote only

We don't need to store full vote data for old votes - we never relay them to other nodes anyway.
Still keep old hashes to avoid re-requesting data etc.

* add comment

* Drop getvotes rpc

* Compare vote signals, do not compare hashes

Also add comments
2019-04-01 14:10:01 +03:00
Alexander Block
010752d4eb Set fAllowMultiplePorts to true for testnet (#2817)
On testnet it's quite usual to have multiple MNs on the same IP. Now that
we have LLMQs and DKGs which require deterministic intra quorum connections,
we must allow them to connect to each other even if the IPs are shared very
often.
2019-03-30 17:55:34 +03:00
Nathan Marley
74d999e568 Remove watchdogs from existence (#2816) 2019-03-30 17:55:20 +03:00
thephez
bfc288afb4 Update getblock rpc help text (#2814) 2019-03-30 17:55:04 +03:00
UdjinM6
aeba4afce9
Fix vote ratecheck (#2813) 2019-03-30 17:54:39 +03:00
UdjinM6
ad7defba92
Drop all kind of invalid votes from all types of gobjects (#2812)
* Drop all kind of invalid votes from all types of gobjects

Currently we only do so for proposal "funding" votes which looks incomplete.

* Apply review suggestions
2019-03-30 17:54:22 +03:00
thephez
e75760fa7c Update "listtransactions" and "listsinceblock" RPC help (#2811)
- Move "confirmations" to match actual RPC output order
2019-03-30 14:30:30 +01:00
UdjinM6
8987a6c3e0
Update "debug" rpc help text (#2810)
* Update "debug" rpc help text

* add missing "qt" category

* add a note about non-matching categories
2019-03-28 12:15:54 +03:00
UdjinM6
4b4234f390
Refactor: fix layer violation for LLMQ based IS in UI (#2808)
Ignoring the same issue for legacy IS because it's going to be removed later.
2019-03-27 11:42:27 +03:00
UdjinM6
614cb6c2e6
Fix getgovernanceinfo rpc help text (#2809) 2019-03-27 10:34:40 +03:00
UdjinM6
39ba45f3c7
Show chainlocked txes as fully confirmed (#2807) 2019-03-27 10:34:22 +03:00
UdjinM6
f87035d146
Fix qt tests and actually run them (#2801)
* Fix qt tests and run them when compiling with DDEBUG_LOCKORDER flag

* Drop "NO_QT=1"
2019-03-25 19:24:24 +03:00
UdjinM6
162acc5a0d
Fix potential deadlock in LoadWallet() (#2806)
* Fix potential deadlock in LoadWallet()

```
POTENTIAL DEADLOCK DETECTED
Previous lock order was:
 (1) cs_main  wallet/wallet.cpp:3881
 (2) cs_wallet  wallet/wallet.cpp:3881
Current lock order is:
 (2) pwallet->cs_wallet  wallet/walletdb.cpp:589
 (1) cs_main  wallet/wallet.cpp:1252
```

* Add comment in CWallet::MarkConflicted re new cs_main lock in CWalletDB::LoadWallet()
2019-03-25 18:33:07 +03:00
UdjinM6
81eeff1c54
Fix devnet genesis check in InitBlockIndex() (#2805) 2019-03-25 18:32:48 +03:00
Alexander Block
4d8ef35120 Reset local/static cache in LogAcceptCategory when categories change (#2804)
* Reset local/static cache in LogAcceptCategory when categories change

Without this, it is always required to first set debug to 0, wait a few
seconds (until LogAcceptCategory is called by all affected threads) and
then call "debug somecategory". Otherwise "ptrCategory" never gets updated.

This PR also stores a cache counter locally and globally and updates
"ptrCategory" when the counters do not match.

* Lock cs_args in LogAcceptCategory
2019-03-25 18:32:21 +03:00
UdjinM6
4a79f7a700
Few trivial cleanups (#2803)
* fix typo

* align `=`s

* fix warniing
2019-03-25 09:15:46 +03:00
UdjinM6
5057ad511c
Drop DBG macros uses from governance modules (#2802)
Replace it with regular "governance" category limited LogPrint-s where it makes sense.
2019-03-25 09:15:32 +03:00
UdjinM6
29a9e24b42
Prepare Dash-related stuff before starting ThreadImport (#2800)
* Prepare Dash-related stuff before starting ThreadImport

* Ensure activeMasternodeManager is not null in ThreadImport when DIP3 is active and we are running in masternode mode
2019-03-25 09:14:57 +03:00
Alexander Block
8f280f3466
Split "llmq" debug category into "llmq", "llmq-dkg" and "llmq-sigs" (#2799)
* Use llmq-sig log category for CSigSharesManager

* Use llmq-dkg log category for DKG related logging
2019-03-25 05:48:18 +01:00
Alexander Block
15c720dd43 Stop tracking interested/participating nodes and send/announce to MNAUTH peers (#2798)
* Pass CNode* to IsMasternodeQuorumNode and let it also check verifiedProRegTxHash

This makes IsMasternodeQuorumNode return true on incoming peer connections
as well.

* Let GetMasternodeQuorumNodes also take verifiedProRegTxHash into account

This makes it return NodeIds for incoming peer connections as well.

* Remove AddParticipatingNode and the need for it

This was needed in the past when we were unable to identify incoming
connections from other quorum members. Now that we have MNAUTH, we can
easily identify all connected members.

* Don't track interestedIn quorums in CSigSharesNodeState anymore

Same as with the previous commit, we're now able to easily identify which
nodes to announce sig shares to.

* Remove unused CConnman::GetMasternodeQuorumAddresses
2019-03-22 17:21:34 +03:00
Alexander Block
f20620b0a5 Also handle MNAUTH on non-masternodes (#2797)
No real reason to ignore this message. It might become useful in the future.
2019-03-22 17:21:20 +03:00
Alexander Block
b18f8cb77c
Implement MNAUTH and allow unlimited inbound MN connections (#2790)
* Sort evo/* source files in Makefile.am

* Keep track of proRegTxHash in CConnman::masternodeQuorumNodes map

We will later need the proRegTxHash

* Fix serialization of std::tuple with const rvalue elements

Having serialization and deserialization in the same specialized template
results in compilation failures due to the "if(for_read)" branch.

* Implement MNAUTH message

This allows masternodes to authenticate themself.

* Protect fresh incoming connections for a second from eviction

Give fresh connections some time to do the VERSION/VERACK handshake and
an optional MNAUTH when it's a masternode. When an MNAUTH happened, the
incoming connection is then forever protected against eviction.

If a timeout of 1 second occurs or the first message after VERACK is not
MNAUTH, the node is not protected anymore and becomes eligable for
eviction.

* Avoid connecting to masternodes if an incoming connection is from the same one

Now that incoming connections from MNs authenticate them self, we can avoid
connecting to the same MNs through intra-quorum connections.

* Apply review suggestions
2019-03-22 11:52:37 +01:00
UdjinM6
aae985746c Update log categories in help message and in decomposition of "dash" category (#2792)
* Add missing log categories to help message and combined "dash" category

* Sort alphabetically
2019-03-22 11:52:04 +01:00
Alexander Block
7b76e7abb2
Implement BIP9 style deployment for DIP8/ChainLocks and fix a bug with late headers (#2793)
* Also update bestChainLockWithKnownBlock in AcceptedBlockHeader

* Implement BIP9 style DIP8 deployment

* Fix ChainLocks tests

* Apply suggestions from code review

Co-Authored-By: codablock <ablock84@gmail.com>
2019-03-22 11:51:50 +01:00