Commit Graph

17006 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
9d58c98753
Merge #11066: Document the preference of nullptr over NULL or (void*)0
bea8e9e Document the preference of nullptr over NULL or (void*)0 (practicalswift)

Pull request description:

  Document the preference of `nullptr` over `NULL` or `(void*)0`.

  After this commit:

  ```
  $ git grep "[^A-Za-z_]NULL[^A-Za-z_]" | grep -vE '(leveldb|univalue|secp256k1|torcontrol|NULL certificates|ctaes|release-notes|patches|configure.ac|developer-notes)'
  $
  ```

  Some context:
  * `NULL → nullptr` was handled in the recently merged PR #10483
  * `0 → nullptr` was handled in the recently merged PR #10645

Tree-SHA512: f863096aa4eb21705910f89713ca9cc0d83c6df2147e3d3530c3e1589b96f6c68de8755dcf37d8ce99ebda3cfb69805e00eab13bf65424aaf16170e9dda3958a
2020-01-01 21:33:31 -06:00
Wladimir J. van der Laan
95e494983c
Merge #10878: Docs: Fix Markdown formatting issues in init.md
d201e40 Update init.md: Fix section numbering. (Carl Dong)
72a184a Update init.md: Fix line breaks in section 3b. (Carl Dong)

Pull request description:

  Trivial commit that fixes Markdown line breaks in `docs/init.md`. Markdown line breaks take the form of two spaces, which is hard to spot when viewing raw text but visible when previewing on GitHub. Line 72-73 of `docs/init.md` did not conform to the rest the rest of the documentation, and is corrected in this PR.

Tree-SHA512: e5f048bd4e9e1e68372c95881f68b157a3c205d4dbcc6ccd24f2c0171b84d8cf7907d1835c6754ce57f35f9463820353ad7ae70c2e3de20136382ea3ee8bc4ff
2020-01-01 21:33:12 -06:00
Wladimir J. van der Laan
16b1585d50
Merge #11071: Use static_assert(…, …) (C++11) instead of assert(…) where appropriate
d1e6f91 Prefer compile-time checking over run-time checking (practicalswift)

Pull request description:

  Use `static_assert(…, …)` instead of `assert(…)` where appropriate.

Tree-SHA512: 63b6e50916bcef2195a73f93476bd69657ed9a8eea0bc4382933f478a6df639632c23c076df401fea648142adcb308bb2e6be35cc3dabca30daf7649b790f436
2020-01-01 21:32:57 -06:00
MarcoFalke
972a0498e7
Merge #11011: [Trivial] Add a comment on the use of prevector in script.
08f71c29e [Trivial] Add a comment on the use of prevector in script. (Gregory Maxwell)

Pull request description:

Tree-SHA512: 020981516e67e576685eb9a8532178fb97d1780af409fc86d869cd05c293c0c823c26e838cf544d18610f5a3f479ce3e47d2ccb95fb1c4e55fe9e7ceb354f20b
2020-01-01 21:31:48 -06:00
MarcoFalke
c9b20f027f
Merge #10956: Fix typos
9d5e98ff8 Fix typos. (practicalswift)

Pull request description:

  Fix some typos not covered by #10705.

Tree-SHA512: f06e9541f6ae13ef5d6731399b61795997b21a8816abeb1749c93e99a5c47354e6cbd4a3d145f4dc6ef8a13db179799a3121ecbb7288abf3e8d81cdf81500d37
2020-01-01 21:31:39 -06:00
MarcoFalke
1ba944c55e
Merge #10705: Trivial: spelling fixes
f42fc1d50 doc: spelling fixes (klemens)

Pull request description:

  patch contains some spelling fixes ( just in comments ) as found by a bot ( http://www.misfix.org, https://github.com/ka7/misspell_fixer ).

Tree-SHA512: ba6046cfcd81b0783420daae7d776be92dd7b85a593e212f8f1b4403aca9b1b6af12cef7080d4ea5ed4a14952fd25e4300109a59c414e08f5395cdb9947bb750
2020-01-01 21:31:29 -06:00
Wladimir J. van der Laan
cca4376fbd
Merge #10917: developer-notes: add reference to snake_case and PascalCase
4a7a4ff developer-notes: add reference to snake_case and PascalCase (Marko Bencun)

Pull request description:

  CamelCase is ambiguous as it refers to both lowerCamelCase and
  UpperCamelCase, whereas PascalCase is only UpperCamelCase.

Tree-SHA512: 8eebc42931f10ed8fd314c6b8a2a936aa18fce358a50bb8ae580404fb06a97b8fece12c0398170a9a8ddce250d1e79ece3774cf8a36ac604d67b2797b54aa005
2020-01-01 21:30:52 -06:00
Wladimir J. van der Laan
191a6d9431
Merge #10461: Update style guide
47d8441 Update style guide (Pieter Wuille)

Tree-SHA512: 0b11365f294eeda1ea5c45cf04b3f38435602f61edc0c605e067ed9d17d17c28e9f1dd76bd4fa8a630e9cec8c5103cd2bfe5f6097196761d576913d9180f2ecf
2020-01-01 21:30:34 -06:00
Wladimir J. van der Laan
1972089df1
Merge #11008: Enable disablesafemode by default.
f4c3d2c Enable disablesafemode by default. (Gregory Maxwell)

Pull request description:

  Safemode is almost useless as is-- it only triggers in limited
   cases most of which aren't even concerning. There have been
   several proposals to remove it. But as a simpler, safer, and
   more flexible first case, simply deactivate it by default.

  Anyone who wants it can re-enable and know what they've signed up for.

Tree-SHA512: f5409a3e81514c32db8eb27c7563ef85e25e56e5fc2a59eac2c30b10ec54087d982c1d3b702bedf9f3133c1f272f23805582a0f468350ba18d8b5a02bedd6401
2020-01-01 21:29:47 -06:00
-k
7f8b8b31e4 Backport osslsigncode 2.0 - bitcoin#16669 and bitcoin#17671 (#3258)
* build: use osslsigncode 2.0 in gitian

The original osslsigncode project (https://sourceforge.net/projects/osslsigncode/) has been marked as abandonware,
"This is now - and has been for a long while - abandonware. Feel free to create your own forks etc.".

However, a fork at https://github.com/mtrojnar/osslsigncode has emerged that has incorporated
theuni's patches, updated the tool to work with OpenSSL 1.1 and made other improvements.

This commit switches the windows signer descriptor to use this new version of osslsigncode.

* Fixed wget call in gitian-build.py

Co-authored-by: Michael <fanquake@gmail.com>
Co-authored-by: willyk <k.o.willy@gmail.com>
2020-01-01 17:15:08 +03:00
Alexander Block
a8e7133c65 Don't disconnect masternode connections when we have less then the desired amount of outbound nodes (#3255) 2020-01-01 17:13:14 +03:00
UdjinM6
c1ac9c47c5
Sync mempool from other nodes on start (#3251)
* Sync mempool from other nodes on start

* Add `-syncmempool` cmd-line option to be able to disable mempool sync if needed

* Only sync mempool with outbound peers

Co-authored-by: Alexander Block <ablock84@gmail.com>
2020-01-01 17:13:04 +03:00
UdjinM6
b56bebc57b
Push islock invs when syncing mempool (#3250)
* Push islock invs when syncing mempool

* Send islock invs right away instead of stacking them for later
2020-01-01 17:12:41 +03:00
UdjinM6
c82e433913
Streamline, refactor and unify PS checks for mixing entries and final txes (#3246)
* Move PS mixing entry verification on masternodes into `AddEntry()`

Also streamline logic a bit and drop unused/excessive parts.

* Unify PS checks among masternodes and clients

* No need to re-check outputs over and over again

* No need to count, fail early if any output is missing

* No need to look any further once we found the input we expected

A tx with duplicate inputs would be considered invalid anyway and we also know there are no duplicates because we just verified the final tx above.

Also drop an unused variable.

* Unify LogPrint-s

* Drop human-readable strings for unused PoolMessage-s

* Apply suggestions from code review

Co-Authored-By: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Re-introduce zero-fee checks

* fix log

* Move all txin/txout verification logic shared by CPrivateSendClientSession::SignFinalTransaction() and CPrivateSendServer::AddEntry() into CPrivateSendBaseSession::IsValidInOuts()

* fix nit

* Add missing return

* Use CCoinsViewMemPool instead of doing it manually

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: Alexander Block <ablock84@gmail.com>
2020-01-01 17:12:25 +03:00
Alexander Block
5ce1ee9035 Fix params.size() check in "protx list wallet" RPC (#3259)
This should have been "> 4" as otherwise it bails out when the height is
specified.
2020-01-01 17:02:56 +03:00
PastaPastaPasta
2afdc8c6f6 Add basic PrivateSend RPC Tests (#3254)
* add ps test

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused import

Signed-off-by: Pasta <pasta@dashboost.org>
2019-12-31 17:22:43 +03:00
PastaPastaPasta
2d080d4060 move privatesend rpc methods from rpc/masternode.cpp to new rpc/privatesend.cpp (#3253)
* move privatesend rpc methods from masternode.cpp to new privatesend.cpp

Signed-off-by: Pasta <pasta@dashboost.org>

* add ifdef ENABLE_WALLET check for wallet.h import

Signed-off-by: Pasta <pasta@dashboost.org>

* actually register privatesend rpc

Signed-off-by: Pasta <pasta@dashboost.org>

* add dropped help text and change some weird spacing below

Signed-off-by: Pasta <pasta@dashboost.org>
2019-12-31 17:22:17 +03:00
Alexander Block
957ffa259c Fix pull request detection in .gitlab-ci.yml (#3256)
* Fix pull request detection on Gitlab CI

* Fix CI_COMMIT_BEFORE_SHA
2019-12-31 13:02:03 +03:00
UdjinM6
d2c85b9ea1
Skip mnsync restrictions for whitelisted and manually added nodes (#3249) 2019-12-31 13:01:48 +03:00
UdjinM6
8b0bb9c0e3
Try to avoid being marked as a bad quorum member when we sleep for too long in SleepBeforePhase (#3245)
* Do not sleep at the last block of the phase, it's not safe

* Refactor it a bit to make it clearer what's going on here

* Stop sleeping if blocks came faster than we expected
2019-12-31 13:01:01 +03:00
UdjinM6
630f792b5c
Fix log output in CDKGPendingMessages::PushPendingMessage (#3244) 2019-12-24 22:35:21 +03:00
Alexander Block
dc656e3236
Bump version to 0.16 on develop (#3239)
* Bump version to 0.16

* Run gen-manpages.sh

* Bump versions in gitian descriptors
2019-12-13 18:52:52 +01:00
Alexander Block
c87e825d6f
Tolerate parent cache with empty cache-artifact directory (#3240) 2019-12-13 18:40:11 +01:00
UdjinM6
0c9c27c6fd Add ccache to gitian packages lists (#3237) 2019-12-12 11:47:04 +01:00
UdjinM6
65206833e4 Fix menu bar text color in Dark theme (#3236) 2019-12-12 11:46:54 +01:00
UdjinM6
7331d4edda Bump wait_for_chainlocked_block_all_nodes timeout in llmq-is-retroactive.py to 30 sec when mining lots of blocks at once (#3238) 2019-12-12 11:46:31 +01:00
UdjinM6
dad102669b Update static and dns seeds for mainnet and testnet (#3234)
* Drop (test.)dnsseed.masternode.io

* makeseeds.py

mainnet 1185193, testnet 225964

* generate-seeds.py

* Update tor.md with live onion nodes

All old nodes are down
2019-12-11 12:30:38 +01:00
Alexander Block
f0549c4408
Merge pull request #3231 from UdjinM6/mergemaster_0.14.0.5
Merge master 0.14.0.4/5 back into develop
2019-12-11 12:29:12 +01:00
Alexander Block
9378c271b6 Modify makesseeds.py to work with "protx list valid 1" instead of "masternode list (#3235)
* Modify makesseeds.py to work with "protx list valid 1" instead of "masternode list"

This allows better filtering for MN owners with multiple MNs. This commit
also removes some unsupported fields, e.g. "protocol", "lastseen", ...

* Update contrib/seeds/README.md with new instructions
2019-12-10 18:18:44 +03:00
UdjinM6
097491a9a8 Merge branch 'master' into mergemaster_0.14.0.5 2019-12-08 03:16:19 +03:00
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
UdjinM6
91a996e325
Make sure mempool txes are properly processed by CChainLocksHandler despite node restarts (#3226)
* Pass nAcceptTime via TransactionAddedToMempool and use it for ChainLocks

Otherwise the "first seen" time is way off after node restart

* Don't skip TransactionAddedToMempool for chainlocks while blockchain is not synced yet

Otherwise txes from mempool.dat won't be processed there
2019-12-07 13:56:17 +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
  66aa1d58a1 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
697d289ebc
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
  66aa1d58a1 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 12:30:17 +01:00
UdjinM6
2b587f0ebc
Slightly refactor CDKGSessionHandler::SleepBeforePhase (#3224)
This should make code a little bit cleaner, should be no changes in the actual behaviour: non-members do not sleep already due to `sleepTime` being negative for them and `phaseTime = 0` does the same on regtest but for everyone.
2019-12-06 12:10:01 +03:00
Alexander Block
fdb05860e2 Don't join thread in CQuorum::~CQuorum when called from within the thread (#3223) 2019-12-06 12:06:13 +03:00
Alexander Block
4c00d98ea6 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-06 12:05:58 +03:00