Commit Graph

15998 Commits

Author SHA1 Message Date
Alexander Block
2ae1ce4800
[v0.14.0.x] Update release notes with notable changes and changelog (#3229)
* Update release notes with notable changes and changelog

* Add #3230 to changelog
2019-12-07 16:55:51 +01:00
UdjinM6
20d4a27778
[v0.14.0.x] Make sure mempool txes are properly processed by CChainLocksHandler despite node restarts (#3230) 2019-12-07 18:53:03 +03:00
Alexander Block
dc07a0c5e1 [v0.14.0.x] Bump version and prepare release notes (#3228)
* Bump version to 0.14.0.5

* Copy 0.14.0.4 release notes and prepare 0.14.0.5 release notes

* Run gen-manpages.sh
2019-12-07 13:53:34 +03:00
UdjinM6
3998c3191f
Merge pull request #3227 from codablock/pr_v14_backports
[v0.14.0.x] Backport pending PRs
2019-12-07 13:53:00 +03:00
Alexander Block
401da32090 More fixes in llmq-is-retroactive tests 2019-12-07 00:35:27 +01:00
Alexander Block
33721eaa11 Make llmq-is-retroactive test compatible with 0.14.0.x 2019-12-07 00:35:27 +01:00
Alexander Block
85bd162a3e Make wait_for_xxx methods compatible with 0.14.0.x
Mostly related to wait_until not asserting in 0.14.0.x
2019-12-07 00:35:27 +01:00
Alexander Block
22cfddaf12 Allow re-signing of IS locks when performing retroactive signing (#3219)
* Implement re-signing of InstantSend inputs when TXs come in via blocks

* Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager

This allows use of mocktime in tests.

* Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth

* Allow to wait for IS and CL to NOT happen

* Bump timeout for wait_for_instantlock

* Implement tests for retroactive signing of IS and CLs

* Add wait_for_tx function to DashTestFramework

* Add -whitelist=127.0.0.1 to node0

* Use node3 for isolated block generation

* Don't test for non-receival of TXs on node4/node5
2019-12-07 00:35:27 +01:00
Alexander Block
a8b8891a1d Add wait_for_xxx methods as found in develop
But slightly modified so that they work with wait_until which does not
assert in v0.14.0.x
2019-12-06 22:47:57 +01:00
Alexander Block
8dae12cc60 More/better logging for InstantSend 2019-12-06 22:47:57 +01:00
UdjinM6
fdd19cf667 Tests: Fix the way nodes are connected to each other in setup_network/start_masternodes (#3221)
* Tests: Connect to the control node only in start_masternodes

Masternodes should take care of intra-quorum connections themselves

* Reconnect non-masternodes back to the control node
2019-12-06 22:47:57 +01:00
Alexander Block
41f0e9d028 More fixes related to extra_args 2019-12-06 22:47:57 +01:00
UdjinM6
5213118601 Tests: Allow specifying different cmd-line params for each masternode (#3222) 2019-12-06 22:47:57 +01:00
Alexander Block
2fef21fd80 Don't join thread in CQuorum::~CQuorum when called from within the thread (#3223) 2019-12-06 22:47:57 +01:00
Alexander Block
e69c6c3207 Merge #12392: Fix ignoring tx data requests when fPauseSend is set on a peer (#3225)
c4af738 Fix ignoring tx data requests when fPauseSend is set on a peer (Matt Corallo)

Pull request description:

  This resolves a bug introduced in
  66aa1d58a158991a8014a91335b5bc9c00062f56 where, if when responding
  to a series of transaction requests in a getdata we hit the send
  buffer limit and set fPauseSend, we will skip one transaction per
  call to ProcessGetData.

  Bug found by Cory Fields (@theuni).

  Probably worth slipping into 0.16 :/.

Tree-SHA512: a9313cef8ac6da31eb099c9925c8401a638220cf7bc9b7b7b83151ecae4b02630f2db45ef6668302b9bb0f38571afbd764993427f1ec9e4d74d9a3be6647d299
2019-12-06 22:47:57 +01:00
Alexander Block
8b14adb206 [v0.14.0.x] Update release notes with change log (#3213) 2019-11-21 17:45:44 +03:00
Alexander Block
5f98ed7a5a [v0.14.0.x] Bump version to 0.14.0.4 and draft release notes (#3203)
* Bump version to 0.14.0.4

* Run gen-manpages.sh to update versions

* Prepare release notes for 0.14.0.4

* Add first draft of "Notable Changes"

* Handle review comments
2019-11-21 13:04:16 +03:00
UdjinM6
c7630f0f4e
Merge pull request #3202 from codablock/pr_v14_backports
[v0.14.0.x] Backport pending PRs from develop into v14
2019-11-21 12:54:58 +03:00
Alexander Block
c0dda38fea Circumvent BIP69 sorting in fundrawtransaction.py test (#3100)
"subtractFeeFromOutputs" is applied to the ordering of the input
transaction and after that BIP69 sorting is performed. This causes
flakiness in tests.
2019-11-19 12:25:23 +01:00
Alexander Block
64ae6365f2 Fix compile issues 2019-11-19 12:25:23 +01:00
Jonas Schnelli
36473015b6 Merge #11397: net: Improve and document SOCKS code
22f816ef4 net: Improve and document SOCKS code (Wladimir J. van der Laan)

Pull request description:

  Make the SOCKS code more consistent, and document the constants used.

Tree-SHA512: 1bb04fcd6aacb6bfd2c54989d8298c892036466a895efb88be36fbace041af67c964ae0f5fb76c96f813f20a040109de4e0aac49a20844640e4d7633fcb22f25
2019-11-19 12:25:23 +01:00
UdjinM6
66e298728e Slightly optimize ApproximateBestSubset and its usage for PS txes (#3184)
* From 2 best sets with the same `nTotal` in ApproximateBestSubset prefer the one with less inputs

* There is no reason to run ApproximateBestSubset again if nMinChange is 0

* Apply review suggestions
2019-11-19 12:25:23 +01:00
Nathan Marley
16b6b6f7c2 Update activemn if protx info changed (#3176)
* Update activemn if protx info changed

* Add `==` and `!=` operators to CDeterministicMNState

* Only re-init active MN if its IP changed, changes to payout, voting etc. can be done without it

* Test `masternode status` updates

* Don't track mnListEntry anymore and instead get the DMN on demand

* Revert "Add `==` and `!=` operators to CDeterministicMNState"

This reverts commit fba468758113084785c0bc0fffd6d704911be8a3.
2019-11-19 12:25:23 +01:00
UdjinM6
ce66871308 Actually update spent index on DisconnectBlock (#3167)
Fixes #3166
2019-11-19 12:25:23 +01:00
Alexander Block
9b49bfda81 Only track last seen time instead of first and last seen time (#3165)
This avoids timeouts on parts of the network
2019-11-19 12:25:23 +01:00
UdjinM6
ad720eef19 Merge #17118: build: depends macOS: point --sysroot to SDK (#3161)
a0daea459cf4812fbdda9a7ead131a73f5856c09 [build] depends macOS: point --sysroot to SDK (Sjors Provoost)

Pull request description:

  Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS.

  Replaces #14352 (which doesn't work on Catalina).

ACKs for top commit:
  jonasschnelli:
    utACK a0daea459cf4812fbdda9a7ead131a73f5856c09

Tree-SHA512: 995b1e1e84e635b32d1d4038bc63730c94a7c318b7240f6d62825977e5c97fe52c5aa5a0f39070beb0df8271dd294b36d6b5cf7f09ad07494fb15d5bd4d77f68
2019-11-19 12:25:23 +01:00
Alexander Block
909d6a4ba5 Simulate BlockConnected/BlockDisconnected for PS caches 2019-11-19 12:25:23 +01:00
UdjinM6
db7f471c7d Few fixes related to SelectCoinsGroupedByAddresses (#3144)
* Fix cache usage in SelectCoinsGroupedByAddresses

* Reset cache flags in SelectCoinsGroupedByAddresses when a block is (dis)connected

* MakeCollateralAmounts should call SelectCoinsGroupedByAddresses with a limited number of inputs
2019-11-19 12:25:23 +01:00
UdjinM6
1acd4742c4 Various fixes for mixing queues (#3138)
* Always check for expired queues on masternodes

* Check if a queue is too old or too far into the future

Instead of only checking that it's to old

* Check that no masternode can spam us with dsqs regardless of dsq readiness
2019-11-19 12:25:23 +01:00
Alexander Block
0031d6b04d Also consider txindex for transactions in AlreadyHave() (#3126)
This avoids many false negatives where TXs are announced to us which are
already mined and then were spent later.
2019-11-19 12:25:23 +01:00
UdjinM6
c4be5ac4df Ignore recent rejects filter for locked txes (#3124)
* Ignore recent rejects filter for locked txes

If we had a conflicting tx in the mempool before the locked tx arrived and the locked one arrived before the corresponding islock (i.e. we don't really know it's the one that should be included yet), the locked one is going to be rejected due to a mempool conflict. The old tx is going to be removed from the mempool by an incoming islock a bit later, however, we won't be able to re-request the locked tx until the tip changes because of the recentRejects filter. This patch fixes it.

* Add some explanation
2019-11-19 12:25:23 +01:00
Alexander Block
f2d401aa85 Make orphan TX map limiting dependent on total TX size instead of TX count (#3121) 2019-11-19 12:25:23 +01:00
UdjinM6
87ff566a04 Update/modernize macOS plist (#3074)
* Use 4-digit version numbers for macOS bundles

* Drop deprecated CFBundleGetInfoString and use NSHumanReadableCopyright instead
2019-11-18 15:30:15 +01:00
UdjinM6
2141d5f9d9 Fix bip69 vs change position issue (#3063)
* Fix bip69 vs change position issue

* Drop `setbip69enabled` rpc
2019-11-18 15:29:49 +01:00
UdjinM6
75fddde67f Partially revert 3061 (#3150)
Turned out that this causes SelectCoinsMinConf to (unnecessary) lean towards selecting mempool txes which can cause "too long mempool chain" error even when there are more funds to spend.
2019-11-18 15:28:34 +01:00
UdjinM6
c74f2cd8b2 Fix SelectCoinsMinConf to allow instant respends (#3061)
* Modify tests to check for instant respends

This should fail atm...

* Fix SelectCoinsMinConf to allow instant respends

Now tests should pass again.
2019-11-18 15:28:19 +01:00
Alexander Block
2e7ec23693
[0.14.0.x] Remove check for mempool size in CInstantSendManager::CheckCanLock (#3119)
* Remove check for mempool size in CInstantSendManager::CheckCanLock

This should not have been here at all and is already removed in develop.
Recent InstantSend failures on mainnet were partly related to this check.

* Skip autois tests for new IS system
2019-09-30 09:56:25 +02:00
Alexander Block
7d8eab2641
Add 0.14.0.3 change log to release-notes.md (#3055) 2019-08-14 04:51:13 +02:00
Alexander Block
f2443709b3
Update release-notes.md for 0.14.0.3 (#3054) 2019-08-13 19:33:52 +02:00
Alexander Block
8aa45cfb0d
Merge pull request #3046 from codablock/pr_v14_backports
[v0.14.0.x] Backport pending PRs
2019-08-13 19:33:21 +02:00
Alexander Block
788d42dbcf
Bump version to 0.14.0.3 and copy release notes (#3053) 2019-08-12 20:08:33 +02:00
Alexander Block
17ba23871c Re-verify invalid IS sigs when the active quorum set rotated (#3052)
* Split ProcessPendingInstantSendLocks into two methods

* Split SelectQuorumForSigning into SelectQuorumForSigning and GetActiveQuorumSet

* Implement retrying of IS lock verification when the LLMQ active set rotates
2019-08-12 09:37:22 +02:00
Alexander Block
8c49d9b545 Remove recovered sigs from the LLMQ db when corresponding IS locks get confirmed (#3048)
* Remove unused overload of RemoveInstantSendLock

* Move deletion of recovered sigs into own method

* Remove recovered sigs for fully confirmed IS locks

* Also remove rs_t entries when removing recovered sigs from the outside

CleanupOldRecoveredSigs already does this as the last step, but when
RemoveRecoveredSig is called from the outside (e.g. from InstantSend),
these keys are not removed. This PR fixes this by storing the write time
into rs_r and later uses it to remove the rs_t entry.

Old entries will be incompatible with this (1 byte written in the past,
4 bytes written now). This checked by comparing the data size with
sizeof(uint32_t).

* Add TODO
2019-08-12 09:37:14 +02:00
Alexander Block
2e0cf8a30b Add "instantsendlocks" to getmempoolinfo RPC (#3047) 2019-08-07 17:54:27 +02:00
Alexander Block
a8fb8252e9 Use fEnablePrivateSend instead of fPrivateSendRunning
Required due missing refactorings.
2019-08-07 16:07:22 +02:00
Alexander Block
a198a04e04 Show number of InstantSend locks in Debug Console (#2919)
* Implement GetInstantSendLockCount in CInstantSendManager

* Add islockCountChanged signal to client model

* Show number of InstantSend locks in debug console
2019-08-07 14:15:08 +02:00
Alexander Block
013169d63d Optimize on-disk deterministic masternode storage to reduce size of evodb (#3017)
* Implement CompactFull() in CDBWrapper

This allows to compact the whole DB in one go.

* Implement more compact version of CDeterministicMNListDiff

This introduces CDeterministicMNStateDiff which requires to only store
fields on-disk which actually changed.

* Avoid writing mnUniquePropertyMap to disk when storing snapshots

This map can be rebuilt by simply using AddMN for each deserialized MN.

* Implement Serialize/Unserialize in CScript

This allows us to directly use READWRITE() on scripts and removes the need
for the ugly cast to CScriptBase. This commit also changes all Dash specific
uses of CScript to not use the cast.

* Keep track of registeration counts and introduce internalID for masternodes

The "internalId" is simply the number of MNs registered so far when the
new MN is added. It is deterministic and stays the same forever.

* Use internalId as keys in MN list diffs

This reduces the used size on-disk.

* Two simple speedups in MN list diff handling

1. Avoid full compare if dmn or state pointers match in BuildDiff
2. Use std::move when adding diff to listDiff in GetListForBlock

* Implement upgrade code for old CDeterministicMNListDiff format to new format

* Track tipIndex instead of tipHeight/tipBlockHash

* Store and pass around CBlockIndex* instead of block hash and height

This allows us to switch CDeterministicMNManager::GetListForBlock to work
with CBlockIndex.

* Refactor CDeterministicMNManager::GetListForBlock to require CBlockIndex*

Instead of requiring a block hash. This allows us to remove blockHash and
prevBlockHash from CDeterministicMNListDiff without the use of cs_main
locks in GetListForBlock.

* Remove prevBlockHash, blockHash and nHeight from CDeterministicMNListDiff

* Remove access to determinisitcMNManager in CMasternodeMetaMan::ToString()

The deterministic MN manager is not fully initialized yet at the time this
is called, which results in an empty list being returned everytime.

* Better logic to determine if an upgrade is needed

Reuse the "best block" logic to figure out if an upgrade is needed. Also
use it to ensure that older nodes are unable to start after the upgrade
was performed.

* Return null block hash if it was requested with getmnlistdiff

* bump CGovernanceManager::SERIALIZATION_VERSION_STRING

* Check SERIALIZATION_VERSION_STRING before deserializing anything else

* Invoke Clear() before deserializing just to be sure
2019-08-07 12:19:49 +02:00
Alexander Block
9ac7a998be Add "isValidMember" and "memberIndex" to "quorum memberof" and allow to specify quorum scan count (#3009)
* Add "isValidMember" and "memberIndex" to output of "quorum memberof"

* Allow to specify how many quorums to scan for in "quorum memberof"
2019-08-07 12:19:49 +02:00
Alexander Block
99824a8792 Implement "quorum memberof" (#3004)
* Implement BuildQuorumInfo and call it from quorum_info

* Add type to result of BuildQuorumInfo

* Implement "quorum memberof"
2019-08-07 12:19:49 +02:00
UdjinM6
7ea319fd25 Bail out properly on Evo DB consistency check failures in ConnectBlock/DisconnectBlock (#3044) 2019-08-07 12:19:49 +02:00