Commit Graph

11007 Commits

Author SHA1 Message Date
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
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
Alexander Block
71a6951008 Move logic from FindRandomNotInVec into GetRandomNotUsedMasternode
And adapt it to directly use deterministicMNManager
2018-12-31 08:15:45 +01:00
Alexander Block
2f66d6ada1 Replace uses of mnodeman in PS code when deterministicMNManager can be used directly
Additionally, implement GetLastDsq in CMasternodeMan as a replacement
for direct access to the masternode_info_t object. Will move this variable
to another (PS specific) place later.
2018-12-31 08:15:45 +01:00
Alexander Block
eedb158459 Remove use of mnodeman.GetMasternodeInfo from IX code 2018-12-31 08:15:45 +01:00
Alexander Block
fb13b000b5 Remove support for legacy operator keys in CPrivateSendBroadcastTx 2018-12-31 08:15:45 +01:00
Alexander Block
5f5fcc49cd Remove legacy signatures support in CPrivateSendQueue 2018-12-31 08:15:45 +01:00
Alexander Block
da924519a4 Remove support for legacy signatures in CTxLockVote 2018-12-31 08:15:45 +01:00
Alexander Block
2b2e4f45da Remove a few uses of mnodeman from governance code
And remove them with direct use of deterministicMNManager
2018-12-31 08:15:44 +01:00
Alexander Block
14d8ce03c0 Don't use GetMasternodeInfo in CTxLockVote::IsValid 2018-12-31 08:15:44 +01:00
Alexander Block
1ff241881f Directly use deterministicMNManager in some places 2018-12-31 08:15:44 +01:00
Alexander Block
45f34e130f Implement HasValidMN, HasValidMNByCollateral and GetValidMNByCollateral 2018-12-31 08:15:44 +01:00
Alexander Block
bc29fe160e Remove compatibility code from governance RPCs and directly use deterministicMNManager 2018-12-31 08:15:44 +01:00
Alexander Block
b49ef5d712 Directly use deterministicMNManager when processing DSTX 2018-12-31 08:15:44 +01:00
Alexander Block
ae229e2833 Directly use deterministicMNManager in CGovernanceManager::GetCurrentVotes 2018-12-31 08:15:44 +01:00
Alexander Block
96e0385db8 Let "masternode winner/current" directly use deterministicMNManager 2018-12-31 08:15:44 +01:00
Alexander Block
0c9fb69687 Harden spork15 on testnet (#2586)
* Replace IsDeterministicMNsSporkActive with IsDIP3Active

IsDIP3Active will now use a fixed parameter from consensus params.
Values for DIP0003Height/DIP0003Hash need to be updated when spork15
activates on mainnet.

Also enforce correct block hash on testnet/mainnet for DIP3 activation
block.

* Remove SPORK_15_DETERMINISTIC_MNS_ENABLED

* Replace all uses of IsDeterministicMNsSporkActive with IsDIP3Active

* Remove DIP3 upgrade-path tests and directly start with DIP3 enabled tests

* Make -masternodeprivkey non-mandatory

This code will vanish later.
2018-12-28 19:13:44 +03:00
UdjinM6
361900e461
Bump version to 0.14 (#2589) 2018-12-28 19:12:52 +03:00
Alexander Block
3861c6a82e Add BIP9 deployment for DIP3 on mainnet (#2585) 2018-12-28 16:03:17 +03:00
UdjinM6
0dce846d5a
Add an option to use specific address as a source of funds in protx rpc commands (otherwise use payoutAddress/operatorPayoutAddress) (#2581)
* Add an option to use specific address as a source of funds in protx rpc commands

* fix typo "must"

* Always use payoutAddress (or operatorPayoutAddress) as a default if no fundAddress was specified

* make sure we actually selected some inputs

* fundAddress -> feeSourceAddress

* Align help text with new logic

* fix protx_update_service

* fix protx_revoke

* Add fRequireAllInputs to CCoinControl and use it in FundSpecialTx

This avoids adding all inputs even though they are not needed.

* Allow to specify empty operator payout address and simplify fee code in update_service

DIP3 tests were failing to call "protx update_service" as it did not accept
an empty "operatorPayoutAddress".

This also simplifies handling of the feeSourceAddr.

* Specify source for funds and fees in DIP3 tests
2018-12-28 12:24:48 +03:00
UdjinM6
33f78d70e8
Do not accept sporks with nTimeSigned way too far into the future (#2578) 2018-12-22 13:33:49 +03:00
UdjinM6
587911b36f
Fix IsBlockPayeeValid (#2577)
- should skip while not synced regardless of spork15 state
- add missing logprintf
2018-12-21 18:21:28 +03:00
Alexander Block
03a6865d94 Enforce correct port on mainnet for DIP3 MNs (#2576) 2018-12-21 18:21:12 +03:00
UdjinM6
3f26ed78c7
Backport network checks missing in CActiveDeterministicMasternodeManager::Init() (#2572)
* Backport network checks missing in CActiveDeterministicMasternodeManager::Init()

* Drop mainnnet/non-mainnet port verification part

moved to 2576
2018-12-21 18:20:43 +03:00
UdjinM6
6c4b3ed8d2 Load sporks before checking blockchain (#2573) 2018-12-20 14:31:23 +01:00
Alexander Block
e71ea29e68
Add ownerAddr and votingAddr to CDeterministicMNState::ToJson (#2571) 2018-12-20 14:28:03 +01:00
Alexander Block
222e5b4f7f
Remove proposal/funding votes from MNs that changed the voting key (#2570)
* Rename onlyOwnerAllowed boolean variables to onlyVotingKeyAllowed

This was misleading.

* Remove invalid proposal votes when MN voting keys change
2018-12-20 14:27:48 +01:00
Alexander Block
999a519074 Fix optional revocation reason parameter for "protx revoke" and a few help strings (#2568)
* Fix optional revocation reason parameter for "protx revoke"

* Fix "protx revoke" help message

* Remove obsolete help text about masternode operator keys and wallets
2018-12-19 11:11:38 +03:00
UdjinM6
6dfceaba5a Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD (#2560) 2018-12-19 08:37:47 +01:00
Alexander Block
858bb52ad5
Show correct operator payee address in DIP3 MN list GUI (#2563)
* Show correct operator payee address in DIP3 MN list GUI

* Rename dest to operatorDest
2018-12-19 08:37:37 +01:00
Alexander Block
1908637228
Remove legacy MN list tabs on spork15 activation (#2567)
* Remove legacy masternode tabs on DIP3 activation

* Move setInvisible call for dip3NoteLabel up

Otherwise it takes a minute until it's actually made invisible.

* Bail out early from updateMyNodeList when spork15 is active

Otherwise we risk accessing destroyed Qt objects.
2018-12-19 08:37:25 +01:00
UdjinM6
3c30a6aff3 Add missing masternodeblsprivkey help text (#2569) 2018-12-19 08:36:06 +01:00
UdjinM6
c089261465 Unify "protx list" options (#2559) 2018-12-17 07:06:45 +01:00
Alexander Block
552d9089e7
Update testnet seeds to point to MNs that are on the new chain (#2558) 2018-12-14 16:34:11 +01:00
Alexander Block
e9f7142ed0
Bump PROTOCOL_VERSION and DMN_PROTO_VERSION to 70213 (#2557)
* Bump PROTOCOL_VERSION and DMN_PROTO_VERSION to 70213

This will disconnect all nodes from the old testnet chain when DIP3 gets
activated through BIP9.

Also update comments where 70212/70213 was referenced.

* Also bump MIN_PEER_PROTO_VERSION_DIP3 and MIN_PRIVATESEND_PEER_PROTO_VERSION
2018-12-14 16:33:58 +01:00
Alexander Block
793e74cc9f Remove temporary fork handling for emergency difficulty reduction on testnet
As we reset testnet, we can also remove the special handling for old blocks.
2018-12-13 21:51:52 +01:00
Alexander Block
79d543e896 Don't check for nSuperblockStartHash on testnet 2018-12-13 20:30:41 +01:00
Alexander Block
24ebcbd12c Remove checkpoints above block 4000 2018-12-13 15:07:40 +01:00
Alexander Block
ab3fe4fa86 Update nMinimumChainWork and defaultAssumeValid for block 4000 2018-12-13 15:07:38 +01:00
Alexander Block
b2d3e220b5 Change DIP0003 deployment to start today 2018-12-13 14:31:09 +01:00