Commit Graph

15416 Commits

Author SHA1 Message Date
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
b7dc7c54e0
Merge pull request #2554 from codablock/pr_testnetreset
Reset/Fork testnet to block 4000
2018-12-14 10:09:42 +01:00
Alexander Block
f5b4026d6b
Merge pull request #2555 from codablock/pr_testnetreset_v12
Reset/Fork testnet to block 4000 and prepare v0.12.3.4 release
2018-12-14 10:09:17 +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
0fca0e6fc8 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:27 +01:00
Alexander Block
79d543e896 Don't check for nSuperblockStartHash on testnet 2018-12-13 20:30:41 +01:00
Alexander Block
db4f43f874 Don't check for nSuperblockStartHash on testnet 2018-12-13 20:30:19 +01:00
Alexander Block
0dc849dc99 Update release-notes.md and copy 0.12.3.3 release-notes 2018-12-13 16:05:02 +01:00
Alexander Block
ddd0068e29 Bump to 0.12.3.4 2018-12-13 16:05:02 +01:00
Alexander Block
b5c71d9d5d Remove checkpoints above block 4000 2018-12-13 16:05:02 +01:00
Alexander Block
9eeea334cb Update nMinimumChainWork and defaultAssumeValid for block 4000 2018-12-13 16:05:01 +01:00
Alexander Block
cb8ab03a9c Change CSV, DIP0001 and BIP147 deployments to start today 2018-12-13 15:09:39 +01:00
Alexander Block
1707f0350d Bump nPowKGWHeight for testnet and cause a fork at height 4001
This will reset testnet so that we can start with a clean state.
2018-12-13 15:09:35 +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
Alexander Block
d6fa7026c9 Change CSV, DIP0001 and BIP147 deployments to start today 2018-12-13 14:31:05 +01:00
Alexander Block
431ef26280 Bump nPowKGWHeight for testnet and cause a fork at height 4001
This will reset testnet so that we can start with a clean state.
2018-12-13 13:57:08 +01:00
Alexander Block
9d33d216b7 Remove temporary code which forked testnet at block 274000 2018-12-13 13:55:46 +01:00
UdjinM6
07309f0ec3 Allow up to MASTERNODE_MAX_MIXING_TXES (5) DSTXes per MN in a row (#2552) 2018-12-13 09:13:02 +01:00
UdjinM6
3e97b0cbdb Make sure that we can get inputType and fUseInstantSend regardless of the way recipients are sorted (#2550)
* Make sure that we can get inputType and fUseInstantSend regardless of the way recipients are sorted

* Move "for" loops outside of "if"s
2018-12-13 09:12:45 +01:00
UdjinM6
1a7c29b97c Revert "Sort recipients in SendCoins dialog via BIP69 rule (#2546)" (#2549)
This reverts commit 18cd5965cc.
2018-12-13 09:12:22 +01:00
UdjinM6
ca0aec2a32 Match recipients with txouts by scriptPubKey in reassignAmounts() (#2548)
* Match recipients with txouts by scriptPubKey in reassignAmounts()

* Drop no longer used nChangePosRet from reassignAmounts() params
2018-12-13 09:12:07 +01:00
UdjinM6
378dadd0f7 Ensure EvoDB consistency for quorum commitments by storing the best block hash (#2537)
* Ensure EvoDB consistency by storing the best block hash

This approach is similar to the one used for chainstate currently.
Ensures that:
- nodes that upgraded after DIP3 has all the data processed correctly (they will crash and require reindex);
- evodb/ is removed when blocks/ is removed (otherwise sync will fail due to duplicate records).

* Implement CEvoDB::VerifyBestBlock/WriteBestBlock and call them from ConnectBlock/DisconnectBlock

* Fix walletbackup.py
2018-12-13 09:11:50 +01:00
UdjinM6
2127a426b8 Further refactoring of CQuorumBlockProcessor (#2545)
* Switch GetQuorumBlockHash from CBlockIndex* to nHeight

* `pindexPrev -> pindex` for ProcessCommitment

* Switch IsCommitmentRequired from CBlockIndex* to block height

* Switch GetMinableCommitment/Tx from CBlockIndex* to block height

* Add `AssertLockHeld(cs_main);`

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2018-12-13 09:04:08 +01:00
Alexander Block
09730e1c59
Bail out from update methods in MasternodeList when shutdown is requested (#2551) 2018-12-13 07:55:42 +01:00
Alexander Block
1522656d6f
Correctly handle spent collaterals for MNs that were registered in the same block (#2553)
* Move spent collateral handling to the bottom of BuildNewListFromBlock

* Handle conflicts with spent collaterals in mempool
2018-12-13 07:49:50 +01:00
UdjinM6
18cd5965cc Sort recipients in SendCoins dialog via BIP69 rule (#2546) 2018-12-10 14:57:22 +01:00
Alexander Block
5830353373
Track operator key changes in mempool and handle conflicts (#2540)
* Track ProTx operator key changes in mempool

* Remove ProTx conflicts from mempool when ProUpRegTx or ProUpRevTx changed keys

* Only allow one operator key change per MN in in mempool
2018-12-10 09:14:19 +01:00
Alexander Block
88f7bf0d82
Don't delete/add values to the unique property map when it's null (#2538)
* Don't delete/add values to the unique property map when it's null

This happens when revoking operator keys, as the revoked MN will then have
the address and operator keys set to the null representation. We shouldn't
add the null value to the unique property map as otherwise future revokes
crash in an assert.

* Assert that no null values are passed to Add/DeleteUniqueProperty

* Check for null values before calling Add/DeleteUniqueProperty

* Apply suggestions from code review

Co-Authored-By: codablock <ablock84@gmail.com>

* Add user generated default constructors to BLS primitives

Fixes build issues on Mac:

In file included from evo/deterministicmns.cpp:5:
./evo/deterministicmns.h:375:24: error: default initialization of an object of const type 'const CBLSPublicKey' without a user-provided default constructor
        static const T nullValue;
                       ^
2018-12-10 08:31:09 +01:00
UdjinM6
15414dac29 Refactor CQuorumBlockProcessor and CDeterministicMNManager (#2536)
* Refactor CDeterministicMNManager::ProcessBlock: pintexPrev -> pindex->pprev and/or adjust logic accordingly

* Refactor CQuorumBlockProcessor::ProcessBlock: pintexPrev -> pindex->pprev and/or adjust logic accordingly

* Drop unused
2018-12-10 06:05:29 +01:00
Alexander Block
63b58b1e92
Reintroduce BLSInit to correctly set secure alloctor callbacks (#2543)
https://github.com/dashpay/dash/pull/2409 removed the need to call the
Init method of the Chia BLS library, but we also accidently removed the
initialization of the secure allocator.
2018-12-10 06:04:48 +01:00
Alexander Block
d9b28fe1ad
Introduce dummy (ping-like) contributions for the dummy DKG (#2542)
* Implement creation and propagation of dummy contributions

These act as a ping which is broadcast a few blocks before the dummy
commitments are created. They are meant to determine online/offline members.

* Use information about received dummy contributions to determine validMembers

* Fix PoSe tests

* Fix dummy DKG phase progress in PoSe tests and give tests more time

Mine one block at a time until we reach the mining phase.
2018-12-10 06:04:33 +01:00
Alexander Block
df0d0cce77
Watch for changes in operator key and disable local MN (#2541) 2018-12-10 06:04:13 +01:00
Alexander Block
511dc3714c
Remove ProTxs from mempool that refer to a ProRegTx for which the collateral was spent (#2539)
* Track TXs in mempool which refer to an existing ProTx

* When a block is added, remove TXs that refer to ProTxs with spent collaterals

* Initalize evoDb and deterministicMNManager in BasicTestingSetup

instead of TestingSetup. Now that the mempool uses deterministicMNManager,
we need to initialize it for all tests that might use the mempool.
2018-12-10 06:03:57 +01:00
Solar Designer
cbd0303529 Serialize the block header in CBlockHeader::GetHash() (#2531)
* Serialize the block header in CBlockHeader::GetHash()

* Switch from CDataStream to CVectorWriter

Co-Authored-By: solardiz <solar@openwall.com>
2018-12-10 05:40:08 +01:00