Commit Graph

15875 Commits

Author SHA1 Message Date
Alexander Block
c03480d20f Disable optimistic sending when pushing sig share related messages
And instead let the network thread do the actual sending.
2019-02-15 15:20:15 +01:00
Alexander Block
acb87895f8 Implement WakeupSelect() to allow preliminary wakeup after message push
This adds the reading side of a pipe to the read-set when calling select().
Writing to the writing side of the pipe then causes select() to wake up
immediately. Otherwise it would wait for the timeout of 50ms, even if there
is data that could possibly be sent.

This is useful when many messages need are pushed with optimistic send being
disabled. After all messages have been pushed, WakeSelect() can then wakeup
the select() thread and force a re-check for pending data to send.

This is currently only implemented for POSIX compliant systems as we assume
that heavy-load daemons (like masternodes) are usually run on Linux.
2019-02-15 15:19:59 +01:00
Alexander Block
cf29320988 Allow to disable optimistic send in PushMessage()
Profiling has shown that optimistic send causes measurable slowdowns when
many messages are pushed, even if the sockets are non-blocking. Better to
allow disabling of optimistic sending in such cases and let the network
thread do the actual socket calls.
2019-02-15 15:19:36 +01:00
UdjinM6
bedfc262e2 Rework handling of CSigSharesManager worker thread (#2703) 2019-02-15 15:11:50 +01:00
UdjinM6
3e4286a584 Less cs_main locks in quorums (#2702)
* Drop cs_main from CQuorumManager::UpdatedBlockTip()

* CLLMQUtils::IsQuorumActive() shouldn't require cs_main to be held

* Revert comment deletion
2019-02-15 15:11:35 +01:00
Alexander Block
3bbc75fc48 Reintroduce spork15 so that it's relayed by 0.14 nodes (#2701) 2019-02-14 21:24:06 +03:00
Alexander Block
b71a3f48da Remove not used and not implemented methods from net.h (#2700) 2019-02-12 22:52:18 +03:00
Alexander Block
c0cb274659 Fix incorrect usage of begin() when genesis block is requested in "protx diff" (#2699)
* Fix incorrect usage of begin() when genesis block is requested in "protx diff"

.begin() on mapBlockIndex does NOT return the genesis block, but just the
block with lowest hash.

The fix is to use chainActive[0] to get the genesis block.

* Update src/evo/simplifiedmns.cpp

Co-Authored-By: codablock <ablock84@gmail.com>
2019-02-12 22:52:06 +03:00
UdjinM6
b239bb24a0
Do not process blocks in CDeterministicMNManager before dip3 activation (#2698)
* Do not process blocks in CDeterministicMNManager before dip3 activation

This should save us some cpu/disk on initial sync/reindex

* Write initial snapshot on dip3 activation
2019-02-12 22:51:50 +03:00
UdjinM6
86fc050495
Drop no longer used code and bump min protos (#2697)
* Drop registry deletion of the old key

* Drop no longer used CGovernanceObjectVoteFile::RemoveOldVotes()

* Drop temporary disconnect code and bump min protos to 70213

* drop comment

* fix
2019-02-12 22:51:21 +03:00
UdjinM6
fef8e5d45f
A small overhaul of the way MN list/stats UI and data are tied together (#2696)
* Do not access wallet directly from masternodelist ui, use wallet model instead

* Don't access deterministicMNManager from UI directly, use client model instead

* Send just a general signal to UI elements when mn list has changed and let them handle it in their specific ways

* Drop mn list update timers and use signals instead

* some cleanup

* Move initial UI update to init.cpp

* Refactor getMasternodeList()

* Rename setMasternodeCount to updateMasternodeCount

* Drop legacy code in comments

* Drop NotifyMasternodeListChanged from uiInterface and use NotifyBlockTip instead
2019-02-12 22:51:03 +03:00
UdjinM6
709ab6d3e0
Minimal fix for litemode vs bad-protx-key-not-same issue (#2694) 2019-02-12 22:50:22 +03:00
PastaPastaPasta
90bb3ca2f6 Backport #14701: build: Add CLIENT_VERSION_BUILD to CFBundleGetInfoString (#2687)
8e209340c85fc2493d7d1d7affe7e316bb613cbd build: Add CLIENT_VERSION_BUILD to CFBundleGetInfoString (fanquake)

Pull request description:

  As mentioned in #14697, if you download the `0.17.0.1` dmg, and inspect the `.app` bundle, the version in the GetInfo string reads `0.17.0`, which is confusing given you're expecting `0.17.0.1`:
  <img width="391" alt="0 17 0 1" src="https://user-images.githubusercontent.com/863730/48300032-fbb54b00-e510-11e8-9bcd-77e1fffffc63.png">

  This PR adds `CLIENT_VERSION_BUILD` to the string, so that the full version number is displayed, i.e:
  <img width="327" alt="this pr" src="https://user-images.githubusercontent.com/863730/48300015-7893f500-e510-11e8-98b9-80424719a082.png">

Tree-SHA512: f553253d03283639cc4dda00c8004b5c63ae2b489762e5e8c666166e71b14e672792c1df678f87484d51d153b5781c5ec1b145774096600f504833024ae8baea
2019-02-12 22:50:07 +03:00
UdjinM6
bac6661553 Release notes v0.13.1.0 (#2689)
* Release notes v0.13.1.0

* Add a note about no proto bump

* update

* Add a note about downgrading to 0.13.0.0

* 0.13.0.0->0.13.1.0

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2019-02-07 14:48:50 +01:00
Alexander Block
68a2d8a8d2
Merge pull request #2688 from codablock/pr_v13_backports
[0.13.x] Backport multiple PRs from develop
2019-02-07 14:30:43 +01:00
UdjinM6
da5a861c0f Change the way invalid ProTxes are handled in addUnchecked and existsProviderTxConflict (#2691)
* Invalid ProTxes should never reach addUnchecked

* Invalid ProTxes should not cause existsProviderTxConflict to crash
2019-02-06 17:58:20 +01:00
Alexander Block
6ada90c11c Call existsProviderTxConflict after CheckSpecialTx (#2690)
Otherwise we might end up passing and invalid proTx into it, causing
assertions to fail and thus crash the process.
2019-02-06 17:58:18 +01:00
UdjinM6
00f904ec77 Change the way invalid ProTxes are handled in addUnchecked and existsProviderTxConflict (#2691)
* Invalid ProTxes should never reach addUnchecked

* Invalid ProTxes should not cause existsProviderTxConflict to crash
2019-02-06 17:57:27 +01:00
Alexander Block
5478183e7e
Call existsProviderTxConflict after CheckSpecialTx (#2690)
Otherwise we might end up passing and invalid proTx into it, causing
assertions to fail and thus crash the process.
2019-02-06 17:54:10 +01:00
UdjinM6
23eb70cb77 Add getspecialtxes rpc (#2668)
* Add getspecialtxes rpc

Returns an array of special transactions found in the specified block

* small help text tweak

* add comments
2019-02-06 11:27:48 +01:00
Alexander Block
34dee23386
Merge pull request #2685 from codablock/pr_v13_backports
[0.13.x] Backport multiple PRs from develop
2019-02-06 06:11:43 +01:00
UdjinM6
bd0de48762 Bump version to 0.13.1 (#2686) 2019-02-06 06:11:16 +01:00
UdjinM6
023f8a01ae Fix bench log for payee and special txes (#2678) 2019-02-05 20:57:35 +01:00
Wladimir J. van der Laan
1be5a72a97
Merge #9853: Fix error codes from various RPCs
adaa281 Update release notes to include RPC error code changes. (John Newbery)
338bf06 Add commenting around JSON error codes (John Newbery)
dab804c Return correct error codes in fundrawtransaction(). (John Newbery)
a012087 Return correct error codes in setban(). (John Newbery)
960bc7f Return correct error codes in removeprunedfunds(). (John Newbery)
c119096 Return correct error codes in blockchain.cpp. (John Newbery)
6d07c62 Return correct error codes in bumpfee(). (John Newbery)

Tree-SHA512: 4bb39ad221cd8c83d98ac5d7ad642f3a8c265522720dc86b2eebc70e74439a85b06d6ddcd6a874e879d986511de3ab0878bb7fe58b50cb0546b78913632ea809
2019-02-05 13:40:40 -06:00
Wladimir J. van der Laan
1bfc069e34
Merge #9575: Remove unused, non-working RPC PostCommand signal
54fae05 Remove unreachable code (g_rpcSignals.PostCommand) (practicalswift)

Tree-SHA512: b416d63ffa1c35fa0434b6bc0a930ae1b04919a12114ef65154ce4621aa43d744eb4fc515f48eac2e96c0f528cedb4cdbe2349952d215c2c74e900a63e155e0a
2019-02-05 13:40:37 -06:00
MarcoFalke
e53da66b2b
Merge #9936: [trivial] Fix three typos introduced into walletdb.h in commit 7184e25
fdab309 [trivial] Fix typos introduced in 7184e25c80 (practicalswift)

Tree-SHA512: 091666f996267fc5d9f911e6ff25051df5c198851a9c2a6cae73692ffacc64f4275932260487aa48a224ca7f80c58f79933065c72d42aeccae540293c67bcee9
2019-02-05 13:40:35 -06:00
MarcoFalke
2121ba7764
Merge #9945: Improve logging in bctest.py if there is a formatting mismatch
6c1fb73 Improve logging in bctest.py if there is a formatting mismatch (John Newbery)

Tree-SHA512: ef33f4766df92a987cd714d73b98277616ff947ad0e43811013dda668e31464062816480bd654865231d56d37fb4d6e4ccdccbcb2f0e2f01f49572b843a232ae
2019-02-05 13:40:33 -06:00
Wladimir J. van der Laan
b1d64f3a14
Merge #9548: Remove min reasonable fee
ad82cb0 Remove unnecessary min fee argument in CTxMemPool constructor (Alex Morcos)
2a7b56c CBlockPolicyEstimator now uses hard coded minimum bucket feerate (Alex Morcos)
ac9d3d2 Change fee estimation bucket limit variable names (Alex Morcos)

Tree-SHA512: 6e3bc7df3497ed60c7620845d222063e33a0238020f5c3316e61e0eff758078588ea8dd51196ceb59aa561ba106f8cdae62cebe521adb3247108bb49f15252d6
2019-02-05 13:40:31 -06:00
Wladimir J. van der Laan
1c08f9a5f5
Merge #9369: Factor out CWallet::nTimeSmart computation into a method.
630fc54 Clean up braces in CWallet::ComputeTimeSmart (Russell Yanofsky)
6c996c2 Add documentation describing CWallet::nTimeSmart. (Russell Yanofsky)
1f98abe Factor out CWallet::nTimeSmart computation into a method. (Russell Yanofsky)
c6b82d1 Add tests for CWalletTx::nTimeSmart (Russell Yanofsky)

Tree-SHA512: 457a30251e572cf20dac0198af1a94128d269b1e0ce6605a213d56fc14d85c84a0a494e3dcbb18c201c4f39e6f7b000bd9cb6f283930d8452e4bb93ba406f8d4
2019-02-05 13:40:19 -06:00
Pasta
9a3067115f
fix compile error caused by #9605 2019-02-05 13:39:00 -06:00
Alexander Block
8961a6acc0 Stop checking MN protocol version before signalling DIP3 (#2684) 2019-02-05 15:47:28 +01:00
Alexander Block
7e4257254c
Allow to override llmqChainLocks with "-llmqchainlocks" on devnet (#2683) 2019-02-05 15:46:05 +01:00
Alexander Block
bed57cfbf6
Stop checking MN protocol version before signalling DIP3 (#2684) 2019-02-05 15:45:54 +01:00
UdjinM6
e189163865 Add missing help text for operatorPayoutAddress (#2679) 2019-02-05 08:36:40 +01:00
Alexander Block
0d8cc0761c Invoke CheckSpecialTx after all normal TX checks have passed (#2673)
Otherwise duplicate-keys checks for deterministic masternodes triggers
for duplicate/identical transactions.
2019-02-05 07:53:49 +01:00
UdjinM6
592210dafc Bump block stats when adding commitment tx into block (#2654) 2019-02-05 07:53:09 +01:00
UdjinM6
070ad103ff Wait for script checks to finish before messing with txes in Dash-specific way (#2652)
Benchmark Dash part while at it
2019-02-05 07:52:48 +01:00
UdjinM6
3a3586d5a3 Use helper function to produce help text for params of protx rpcs (#2649)
* Adjust help text of `register*` rpc commands

Copy/paste help for various fields of `register`/`register_prepare` instead of referring to `register_fund`
Adjust description of provided functionality and expected results

* Adjust whitespaces to match in different protx commands

* Add missing results descriptions

* Introduce new helper function GetHelpString to concentrate most of param descriptions in rpcevo in one place

* [MOVEONLY] Move GetHelpString out of #ifdef ENABLE_WALLET/#endif

* static const
2019-02-05 07:52:20 +01:00
UdjinM6
332e0361c7 Add checkbox to show only masternodes the wallet has keys for (#2627) 2019-02-05 07:35:54 +01:00
Wladimir J. van der Laan
8d249d4dff Merge #9605: Use CScheduler for wallet flushing, remove ThreadFlushWalletDB
0235be1 Rename FlushWalletDB -> CompactWalletDB, add function description (Matt Corallo)
735d9b5 Use CScheduler for wallet flushing, remove ThreadFlushWalletDB (Matt Corallo)
73296f5 CScheduler boost->std::function, use millisecs for times, not secs (Matt Corallo)

Tree-SHA512: c04f97beab65706c444c126be229d02887df9b0972d8fb15ca1f779ef0e628cf7ecef2bf533c650d9b44645b63e01de22f17266a05907e778938d64cc6e19de6
2019-02-04 19:58:19 -06:00
Wladimir J. van der Laan
9c8c12ed47 devtools: Fix a syntax error typo
Fix a typo introduced in #9880 causing the script to not even parse.
2019-02-04 19:58:17 -06:00
Wladimir J. van der Laan
8a436ec36a Merge #9932: Fix verify-commits on travis and always check top commit's tree
b3ec305 Fix bashisms in verify-commits and always check top commit's tree (Matt Corallo)
f20e664 Check gpg version before setting --weak-digest (Matt Corallo)

Tree-SHA512: f87247008ae6a265e3fd371f00aec0e84f1feb713bf5859eab139a88a4e205e1f26de7b510bcc2c3ab538d5443978a48ec920d25b52b9601e625d198fa2d725f
2019-02-04 19:58:15 -06:00
MarcoFalke
31267f4c8a Merge #9555: [test] Avoid reading a potentially uninitialized variable in tx_invalid-test (transaction_tests.cpp)
8455e36 [test] Avoid reading a potentially uninitialized variable in tx_invalid-test (practicalswift)

Tree-SHA512: 1064cdd5c9e4612a05397a5880535d93dbb18dec4897b4bbda9e6ad78d30f4c72303e4d23159398f1b33545ff5819e739e374d7cde757e402b26c355268a2319
2019-02-04 19:58:13 -06:00
Wladimir J. van der Laan
a31b2de7ac Merge #9906: Disallow copy constructor CReserveKeys
188f89c Disallow copy of CReserveKeys (Gregory Sanders)

Tree-SHA512: e55ce10bf7f2dc91de9797e60ab7767fb51f25255995d62ddf358c52b7aaa23c26fbfb522e1610ff950b86804ddbc38dc0d7708bfab2c4d33ad99a275d8c77db
2019-02-04 19:58:11 -06:00
Wladimir J. van der Laan
22cda1a92f Merge #9929: tests: Delete unused function _rpchost_to_args
99fecf8 tests: Delete unused function _rpchost_to_args (Wladimir J. van der Laan)

Tree-SHA512: 40911d048d3fd7b3ce83e9b3caf2a409d55b47cbe08ea4450a16ca72264300bb12d5ef7dbcf335885975119b5977f949e6879546840064138fb506e24494d849
2019-02-04 19:58:09 -06:00
Wladimir J. van der Laan
6addbe0747 Merge #9880: Verify Tree-SHA512s in merge commits, enforce sigs are not SHA1
bbd7579 Fix regsig checking for subkey sigs in verify-commits (Matt Corallo)
d025bc7 Allow any subkey in verify-commits (Matt Corallo)
eddc77a Add comment re: why SHA1 is disabled (Peter Todd)
d9c450f Verify Tree-SHA512s in merge commits, enforce sigs are not SHA1 (Matt Corallo)
be908a6 Fail merge if there are any symlinks (Matt Corallo)

Tree-SHA512: bb66c59cc1c6b1c86d7d8be7adb0769c6598c0e28ad927409941f30af87d390521e82fc13700ee22e92db1bd571db3e19a152ec7b2c0349c6e06f5de62c0b65f
2019-02-04 19:58:07 -06:00
Wladimir J. van der Laan
29bbfc58fe Merge #8574: [Wallet] refactor CWallet/CWalletDB/CDB
7184e25 [Wallet] refactor CWallet/CWalletDB/CDB (Jonas Schnelli)

Tree-SHA512: a1993dcfc3505459613e8be3f6560ef32466fd7c649bff358f12af118e633aadd648a090f4af60743a827c9cb624e4ec63eb0202326da4779fc18249bb77da1e
2019-02-04 19:57:56 -06:00
Alexander Block
67a86091aa Implement and use secure BLS batch verification (#2681)
* Implement secure verification in bls_batchverifier

* Rename CBLSInsecureBatchVerifier to CBLSBatchVerifier

* Add unit tests for simple BLS verifcation and CBLSBatchVerifier
2019-02-04 21:58:28 +03:00
UdjinM6
d343bfa520
Merge pull request #2647 from PastaPastaPasta/backports-0.15-pr5
Backports 0.15 pr5
2019-02-04 21:58:02 +03:00
Amir Abrams
e2ae2ae638 Update misspelled Synchronizing in GetSyncStatus (#2680) 2019-02-04 12:52:49 +03:00