Commit Graph

18978 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
e20dc9f374
partial merge #13815: Add [[nodiscard]] to all {Decode,Parse}[...](...) functions returning bool (#4035)
* Merge #13815: Explicitly ignore the return value of DecodeBase58(...)

579497e77a

* Merge #13815: Default to DEFAULT_BLOCK_MIN_TX_FEE if unable to parse arg

7c5bc2a523

* Merge #13815: Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool.

9cc0230cfc
2021-03-22 13:10:27 -04:00
UdjinM6
bca9577b8f
partial/logic backport #18544: net: limit BIP37 filter lifespan (active between 'filterload'..'filterclear') (#4043)
* partial backport 18544: net: limit BIP37 filter lifespan (active between 'filterload'..'filterclear')

Previously, a default match-everything bloom filter was set for every peer,
i.e. even before receiving a 'filterload' message and after receiving a
'filterclear' message code branches checking for the existence of the filter
by testing the pointer "pfilter" were _always_ executed.

* net: Match the backport PR a bit more

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-03-22 13:29:31 +03:00
dustinface
ea9daa762a
Merge pull request #4047 from UdjinM6/bp13341_2
Backport 13190 and 13341
2021-03-22 11:11:51 +01:00
MarcoFalke
b27554ba3f
Merge #13341: Stop translating command line options
3d4fa83587 Stop translating command line options (Wladimir J. van der Laan)

Pull request description:

  Many options are extremely technical, and refer internals, making it difficult to translate usefully. This came up in discussion of e.g.  #10949. If a message is not understood by translators (which are typically end-users, not developers) they'll either translate it literally, making it harder to understand instead of easier, with the added drawback of the user no longer being able to google it.

  Also the translation was only working for bitcoin-qt as with the console programs, there is no translation backend. So it was injecting never-used translation messages for bitcoin-cli, -tx.

  For these reasons, stop translating options help completely. This should not affect the output **in any way** \* except for bitcoin-qt when a non-English language is configured in the locale.

  This implements #10962.

  \*) I checked this, but please do verify this.

Tree-SHA512: 46c5f2ac0d4dbe9a6710fab498781e442dd6d6ac17613a99fcfe7a62bf6811fa1c92400d35bd389772cb4b31c6918df261548cbc677addba653f44083b9aeeda
2021-03-19 20:23:58 +03:00
UdjinM6
6bcc1bf0a3
backport bitcoin#13190: Have gArgs handle printing help 2021-03-19 18:00:24 +03:00
PastaPastaPasta
9f4080d1ce
trivial: remove double space (#4045)
Signed-off-by: pasta <pasta@dashboost.org>
2021-03-19 11:24:28 +03:00
PastaPastaPasta
a565437849
refactor: move some protocol constants (#4022)
* governance/net: move protocol constants into version.h, drop GOVERNANCE_FILTER_PROTO_VERSION

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

* drop GOVERNANCE_FILTER_PROTO_VERSION

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

* move MIN_COINJOIN_PEER_PROTO_VERSION into version.h and adjust includes accordingly

Signed-off-by: pasta <pasta@dashboost.org>
2021-03-19 11:11:41 +03:00
dustinface
ab819ce489
llmq: Move GetAllQuorumMembers into CFinalCommitment::Verify (#4032)
Instead of calling `CLLMQUtils::GetAllQuorumMembers` before each `CFinalCommitment::Verify` call to get the quorum members, just get them inside `CFinalCommitment::Verify`.
2021-03-17 19:49:58 -04:00
UdjinM6
d66d52a256
chainlocks: Run CheckActiveState before processing new CLSIG (#4042)
This avoids race condition for "spork19 off, spork 19 on" situations when some nodes might call CheckActiveState already, created new clsig and sent it so that other nodes processed it too already but they will call CheckActiveState afterwards (because it's done every 5 sec) and reset best chainlock to null.
2021-03-17 19:45:41 -04:00
dustinface
fecdbefe5b
test: Make some tests executable (#4044) 2021-03-17 19:43:54 -04:00
dustinface
ae506bae66
refactor: PrivateSend -> CoinJoin + Move the tab (#4038)
* qt|wallet|privatesend: Rename PrivateSend to CoinJoin in GUI strings

* qt: Move CoinJoin next to Transactions

* qt: Adjust status tip of privateSendCoinsMenuAction

Co-authored-by: thephez <thephez@users.noreply.github.com>

* rename: privateSend -> coinJoin

* rename: privatesend -> coinjoin

* rename: PrivateSend -> CoinJoin

* rename: use_ps -> use_cj

* rename: PRIVATESEND -> COINJOIN

* rename: privatesend -> coinjoin for files and folders

* refactor: Re-order coinjoin files in cmake/make files

* refactor: Re-order coinjoin includes where it makes sense

* test: Update lint-circular-dependencies.sh

* Few cleanups

* test: test/coinjoin_tests.cpp -> wallet/test/coinjoin_test.cpp

* s/AdvancedPSUI/AdvancedCJUI/g

* s/privateSentAmountChanged/coinJoinAmountChanged/g

* wallet: Rename "ps_salt" backwards compatible

* Minimal PrivateSend -> CoinJoin migration for settings and cmd-line

* wallet: Fix privatesendrounds -> coinjoinrounds migration

* qt: Migrate nPrivateSendAmount -> nCoinJoinAmount

* `-coinjoindenoms` never existed

* Migrate all PS options/settings

* rpc: Formatting only

* qt: Make Send/CoinJoin tabs a bit more distinguishable

Co-authored-by: thephez <thephez@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-03-17 18:36:11 -04:00
dustinface
4feb38b6ab
llmq|init|test: Add "mode" to -llmq-qvvec-sync parameter (#4030)
* llmq|init|test: Add "mode" to -llmq-qvvec-sync parameter

This changes the paramter from `-llmq-qvvec-sync=<quorum_name>` to `-llmq-qvvec-sync=<quorum_name:mode>`

With the following definitions:

- `quorum_name`: Internal name of the quorum type
- `mode=0` - Sync always from all quorums of the type defined by `quorum_name`
- `mode=1` - Sync only if member of any from all other quorum of the type defined by `quorum_name`

`-llmq-qvvec-sync=llmq_100_67:0` To always request qvvec's from all `LLMQ_100_67`.
`-llmq-qvvec-sync=llmq_100_67:1` Only request if type member.

This means, if platform enables this on all MNs with `mode=0` we will
have all nodes asking new quorum for their verification vector instead
of only `24*100` at max.

* llmq: Adjust GetQuorumRecoveryStartOffset to use all MNs

* Turn `QvvecSyncMode` into `enum class`

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-03-16 18:50:41 -04:00
UdjinM6
95e8492f31
llmq: Implement Intra-Quorum Relay connections for qrecsig-s (#4020)
* llmq: Implement Intra-Quorum Relay connections for qrecsig-s

Avoid relaying recsigs to non-masternodes.

* test: Simplify loop

* test: Assert connections are equal to llmq_size instead of static number

* test: Drop redundant brackets

* test: Fix typo

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-03-14 22:49:38 -04:00
UdjinM6
bc3137166f
bls: Avoid needless hashing (#4013)
* bls: Only update cached hash in CBLSWrapper when it's really needed

* bls: Reset cached hash in CBLSLazyWrapper instead of re-assigning uint256() to it

* bench: Update expected numbers in bls benchmarks

* bls: Drop UpdateHash methods

Make sure the hash is updated via GetHash() only.
2021-03-12 17:54:20 -05:00
dustinface
033623ebec
evo: Fix CEvoDB::VerifyBestBlock (#4040)
Just return the result of the comparison in case there is a block and
false otherwise. This should allow to reach the currently unreachable
two error cases below instead of crashing because the assert doesn't
pass in case of inconsistency.
c2d7d0cab4/src/validation.cpp (L1687-L1691)
c2d7d0cab4/src/validation.cpp (L2094-L2098)
2021-03-12 14:47:54 -05:00
dustinface
659daa7e67
refactor: Avoid useless evoDB reads in ConnectBlock()/DisconnectBlock() (#4039) 2021-03-12 14:46:32 -05:00
dustinface
716a07cab5
llmq: Drop unused timer in CDKGSession::FinalizeCommitments (#4034) 2021-03-12 14:42:14 -05:00
dustinface
cb6741b28f
llmq: Some refactoring in CInstantSendManager::ProcessTx (#4031)
* llmq: Let return ProcessTx void instead of bool

The returned boolean is never used..

* llmq: Combine some "bail out early" cases

* llmq: Explicitly check for nullptr
2021-03-12 14:41:37 -05:00
UdjinM6
1dd7e9741a
doc: Update macOS build instructions with the fix for broken PATH (#4029) 2021-03-12 14:40:05 -05:00
UdjinM6
58024dded0
bugfix: Add missing return in TrySignInputLocks (#4026) 2021-03-09 12:59:57 -05:00
PastaPastaPasta
6da3d5cad7
instantsend: Implement Spork 2 Mempool Signing signalling (#4024)
* instantsend: refactor input locking into it's own method

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

* instantsend: introduce spork 24 `SPORK_24_INSTANTSEND_SIGNING_ENABLED`

This spork tells masternodes to refuse to lock transactions in mempool. Only transactions included in a block should be retroactively signed.

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

add spork defenition

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

* instantsend: refactor `sed -i 's/allowReSigning/fRetroactive/g' src/llmq/*`

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

* instantsend: adjust comments

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

* instantsend/tests: implement Spork 24 support in tests, and test it's usage

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

* fix feature_llmq_is_retroactive.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* drop Spork 24 and use Spork 2 value 1 as being no mempool signing

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

* fix spork check

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

* Fix tests

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Change comment

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* IsInstantSendSigningEnabled -> IsInstantSendMempoolSigningEnabled

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-03-08 22:51:39 +03:00
PastaPastaPasta
38e222c483
trivial: remove unneeded lock (#4019)
Signed-off-by: pasta <pasta@dashboost.org>
2021-03-08 22:50:15 +03:00
PastaPastaPasta
fa06de1abc
trvial/quorums: Resolve some Clang-Tidy warnings
Signed-off-by: pasta <pasta@dashboost.org>
2021-02-28 15:26:50 -05:00
UdjinM6
8ab0047d38
bench: Tweak BLS benchmarks (#4012)
* bench: Add a simple BLS signature aggregation benchmark

* bench: Tweak `BLS_*KeyAggregate_Normal` benchmarks

* bench: Adjust the expected number of iterations for `BLS_*KeyAggregate_Normal` benchmarks

* bench: Add LargeBlock*100 benchmarks, drop LargeBlock*10000 ones

These huge ones are kind of meaningless (results are ~10x slower than 1000) and it's a waste of time. Smaller ones should give an idea if there is a performance drop with the growth of the "block" size.
2021-02-27 16:15:49 -05:00
dustinface
a281cf6b3c
bls: Some char[] -> std::vector<uint8_t> refactoring in CBLSWrapper (#4010)
* refactor: CBLSWrapper::GetBuf -> CBLSWrapper::ToByteVector

* bls: Use std::vector<uint8_t> in CBLSWrapper::Unserialize

* bls: Refactor CBLSWrapper::SetBuf -> CBLSWrapper::SetByteVector

SetBuf(const void*, size_t) -> SetByteVector(std::vector<uint8_t>&)
2021-02-27 02:36:00 -05:00
UdjinM6
3d8f72a116
Rename -recsigsmaxage option to better match other similar options (#3997)
s/-recsigsmaxage/-maxrecsigsage/
2021-02-27 00:58:47 -05:00
UdjinM6
0b591043a0
instantsend: optimize db and cache usage (#3986)
* instantsend: keep islocks cache when removing confirmed islocks from db

unordered_lru_cache should truncate it automagically

* instantsend: Batched write/erase for connected/disconnected blocks
2021-02-24 12:32:34 -05:00
UdjinM6
821210a2ca
llmq: Avoid holding cs_data_requests longer than needed (#4009) 2021-02-23 01:47:36 +03:00
UdjinM6
07d020e1e1
chainlocks: Another attempt to fix deadlocks (#4007) 2021-02-23 01:47:13 +03:00
UdjinM6
8da57523b7
Make recently added help strings dynamic, add one missing string (#3996)
* docs: Add help for -recsigsmaxage option

* Make `-llmq-data-recovery` help string dynamic

* Make devnet/regtest specific help strings dynamic

Only show devnet related help strings on devnet.

* Make linter happy

* Skip FindDevNetGenesisBlock when creating devnet params for help purposes only
2021-02-23 01:46:40 +03:00
PastaPastaPasta
64b05b61d3
Merge pull request #4005 from xdustinface/pr-fix-qt-debug
depends|build: Make sure configuration detects Qt built with DEBUG=1
2021-02-21 16:36:25 -06:00
UdjinM6
c631d042c7
llmq: Use thread pool for quorum cache and data recovery threads (#4008)
* llmq: Use thread pool for quorum cache and data recovery threads

Move quorum data and cache thread handling into CQuorumManager.

* llmq: Fix explicit capture list

* llmq: Directly push the lamdas to workerPool

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-02-20 15:43:43 -05:00
PastaPastaPasta
10b0c70079
Merge pull request #4003 from xdustinface/pr-backport-some-dependencies
depends|build: Upgrade boost to 1.70, fix macOS (10.15) depends build
2021-02-20 14:40:18 -06:00
UdjinM6
44e9ba50cc
instantsend: Ignore IS while reindexing/loading blocks from file, bail out early when IS is off (#3985)
* instantsend: Bail out early on disabled IS in more places

* instantsend: Disable InstantSend while reindexing and importing blocks

* Drop extra checks in GetInstantSendLockHashByTxid, GetInstantSendLockByInput and GetInstantSendLockByHash
2021-02-20 15:37:25 -05:00
fanquake
086bb0bae8 Merge #16408: depends: Prune X packages
0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong)
222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong)
65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong)
924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong)
689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong)
aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong)
9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong)
1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong)

Pull request description:

  Related to: #16150

  We noticed that we could build QT without using XLib/libX11 as a library. XLib/libX11's headers are still used, and a minimal `configure.ac` has been added to eliminate overly-enthusiastic configure-time dependencies that aren't actually required to obtain the headers.

  This also means that we eliminate XLib/libX11 as required shared libraries at runtime, which is desirable.

  See commit messages for more details.

  ---

  Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome.

ACKs for top commit:
  theuni:
    ACK 0c55d8b58186ba69fffc147cd02b174450dac578
  fanquake:
    ACK 0c55d8b58186ba69fffc147cd02b174450dac578

Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2021-02-18 16:24:11 +01:00
MarcoFalke
79a913830e Merge #15978: .gitignore: Don't ignore depends patches
a3592c91a2 .gitignore: Don't ignore depends patches (Carl Dong)

Pull request description:

  Ignoring patches might be useful for those who use `git format-patch` often, but in our depends folder we **_want_** to keep track of our patches.

ACKs for commit a3592c:
  practicalswift:
    utACK a3592c91a2d39efe80eb5fe81511da12728d2687
  laanwj:
    utACK a3592c91a2d39efe80eb5fe81511da12728d2687
  jonasschnelli:
    utACK a3592c91a2d39efe80eb5fe81511da12728d2687
  fanquake:
    utACK a3592c9

Tree-SHA512: 439479cc2ff05335c3d21551a23b34ef2f8a4d0eb05085d2422c2c8d7d7035f529b83dc4056f18cb96234d6fa74075adaa14f0e5fb4c99e6189a4af9078fd28e
2021-02-18 14:17:24 +01:00
dustinface
2ec8f21c4a
gitlab: Typo nowalet -> nowallet (#4004) 2021-02-17 21:13:33 +01:00
Hennadii Stepanov
0180cdd729 Merge #18298: build: Fix Qt processing of configure script for depends with DEBUG=1
Now, if depends is built with DEBUG=1, the configure script correctly
finds Qt for macOS and Windows.
2021-02-17 20:53:33 +01:00
fanquake
3e8687603d Merge #19689: build: Add Qt version checking
4af4672525f698c7b491023fcd36a17a4e982070 build, qt: Add Qt version checking (Hennadii Stepanov)
30e336f785e1b662cade3cfacea91a9785ea1023 build: Drop unused bitcoin_cv_qt58 (Hennadii Stepanov)

Pull request description:

  Now `configure` script checks that Qt version is not less then minimum required (currently [5.5.1](https://github.com/bitcoin/bitcoin/pull/15393)).

  This PR is an alternative to #15706 (see https://github.com/bitcoin/bitcoin/pull/15706#issuecomment-629076962).

  Closes #15688.

  The first commit removes dead code (see https://github.com/bitcoin/bitcoin/pull/18297#issuecomment-603252662).

ACKs for top commit:
  fanquake:
    ACK 4af4672525f698c7b491023fcd36a17a4e982070 - this looks ok. I've tested this with Qt 5.15.0 and Qt 5.7.1 system libs, as well as 5.9.8 from depends.

Tree-SHA512: 8e3b82fa3a98926814923331038185633fabad962c271f31bd158e1ab293dcde52ab1dbf997745540a9ed27e16835cf5b5f3701d405876d877fa561eb03cc619
2021-02-17 19:25:55 +01:00
fanquake
e2d3235eb2 Merge #18297: build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts including Windows
8a26848c460160e1279f26bc413f693a34e33b9d build: Fix m4 escaping (Hennadii Stepanov)
9123ec15db104397998f5084afc69403d2f9e4b8 build: Remove extra tokens warning (Hennadii Stepanov)
fded4f48c33742d7c790335c8de59c15b80d94e6 build: Remove duplicated QT_STATICPLUGIN define (Hennadii Stepanov)
05a93d5d96101b45d87571af5b772c7a1e82fd27 build: Fix indentation in bitcoin_qt.m4 (Hennadii Stepanov)
ddbb41931019ed4226af3df37874c7eb7cf570f1 build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts (Hennadii Stepanov)
492971de35bab26346545f68365872211f458b00 build: Fix mingw pkgconfig file and dependency naming (Hennadii Stepanov)

Pull request description:

  This PR makes `bitcoin_qt.m4` to use `pkg-config` for all hosts and removes non-pkg-config paths from it. This is a step towards the idea which was clear [stated](https://github.com/bitcoin/bitcoin/pull/8314#issue-76644643) by Cory Fields:
  > I believe the consensus is to treat Windows like the others and require pkg-config across the board. We can drop all of the non-pkg-config paths, and simply AC_REQUIRE(PKG_PROG_PKG_CONFIG)

  There are two unsolved problems with this PR. If depends is built with `DEBUG=1` the `configure` script fails to pickup Qt:
  - for macOS host (similar to, but not the same as #16391)
  - for Windows host (regression)

  The fix is ~on its way~ submitted in #18298 (as a followup).

  Also this PR picks some small improvements from #17820.

ACKs for top commit:
  theuni:
    Code review ACK 8a26848c460160e1279f26bc413f693a34e33b9d
  dongcarl:
    Code Review ACK 8a26848c460160e1279f26bc413f693a34e33b9d
  laanwj:
    Code review ACK 8a26848c460160e1279f26bc413f693a34e33b9d

Tree-SHA512: 3b25990934b939121983df7707997b31d61063b1207d909f539d69494c7cb85212f353092956d09ecffebb9fef28b869914dd1216a596d102fcb9744bb5487f7
2021-02-17 19:25:55 +01:00
fanquake
822db34008 Merge #17005: build: Qt version appears only if GUI is being built
57b0cd4db9ec26d5a00714016639e218cfa1ccda build: Installed Qt version only appears if being built (Jon Layton)

Pull request description:

  Closes #16989.

  Simplifies `./configure` output for `x$bitcoin_enable_qt`.

  Now:
  `checking whether to build Bitcoin Core GUI... no`
  `checking whether to build Bitcoin Core GUI... yes (Qt5)`

ACKs for top commit:
  laanwj:
    ACK 57b0cd4db9ec26d5a00714016639e218cfa1ccda
  fanquake:
    ACK 57b0cd4db9ec26d5a00714016639e218cfa1ccda

Tree-SHA512: 3ca2082f251c206bb1661277dac1075acea046f0a1d2cd997550aa83dd886036b7282f0e30cdaf51ed636d8a40d9b7ffb8600743450f4f4c014c541cb7b2eb0d
2021-02-17 19:25:55 +01:00
UdjinM6
1a61c5d9aa
wallet: Always skip conflicting txes in SelectCoinsGroupedByAddresses (#4002)
* wallet: Always skip conflicting txes in SelectCoinsGroupedByAddresses

* tests: add tests for SelectCoinsGroupedByAddresses
2021-02-17 12:02:17 -05:00
UdjinM6
5d9c9089bb
instantsend: Introduce KnownInstantSendLock, optimize ProcessInstantSendLock a bit (#3984)
* instantsend: Introduce (and use) KnownInstantSendLock

Check islock hash against both current and archived islocks

* instantsend: Optimize ProcessInstantSendLock, check for known islocks first

Two reasons:
1. GetTransaction is a potentially much heavier one
2. Doesn't make much sense to look for a tx if we have a known islock already

* Drop extra pendingInstantSendLocks.count(hash)

* Check pindexMined != nullptr

* Update src/llmq/quorums_instantsend.cpp

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Update src/llmq/quorums_instantsend.h

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2021-02-17 10:59:16 -05:00
Wladimir J. van der Laan
53ad08710c Merge #20195: build: fix mutex detection when building bdb on macOS
d0a829e9632379e42f0be5c554e3b692f0d14a95 build: fix mutex detection when building bdb on macOS (fanquake)

Pull request description:

  Starting with the Apple Clang shipped with Xcode 12, [Apple has enabled -Werror=implicit-function-declaration by default](https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes):
  > Clang now reports an error when you use a function without an explicit declaration when building C or Objective-C code for macOS (-Werror=implicit-function-declaration flag is on). This additional error detection unifies Clang’s behavior for iOS/tvOS and macOS 64-bit targets for this diagnostic. (49917738)

  This causes bdbs mutex detection to fail when building on macOS (not cross-compiling):
  ```bash
  checking for mutexes... UNIX/fcntl
  configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM.
  configure: error: Unable to find a mutex implementation
  ```

  as previously emitted warnings are being turned into errors. i.e:
  ```bash
  configure:18704: checking for mutexes
  configure:18815: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -mmacosx-version-min=10.12 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -o conftest -pipe -O2  -I/Users/michael/github/fanquake-bitcoin/depends/x86_64-apple-darwin19.6.0/include -L/Users/michael/github/fanquake-bitcoin/depends/x86_64-apple-darwin19.6.0/lib conftest.c  -lpthread >&5
  conftest.c:46:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
  main() {
  ^
  conftest.c:51:2: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
          exit (
          ^
  conftest.c:51:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
  1 warning and 1 error generated.
  ```

  Append `-Wno-error=implicit-function-declaration` to `cflags` so that `-Wimplicit-function-declaration` [returns to being a warning](https://clang.llvm.org/docs/UsersManual.html#cmdoption-wno-error), and the configure checks succeed.

  Fixes #19411.

ACKs for top commit:
  laanwj:
    Code review ACK d0a829e9632379e42f0be5c554e3b692f0d14a95

Tree-SHA512: 7813005b1fc0b370f843b6c0672acab32c999416e92c3f02b75d866e9c7aa41fe5822704fc74de6b65f0d7d94f2cdd05cc7c3ee83295ff1ecbc71d8492b9a2bf
2021-02-17 15:21:53 +01:00
Wladimir J. van der Laan
badc91f98e Merge #17231: depends: fix boost mac cross build with clang 9+
50037e97d11356218c4b36767232e47b74742b0b depends: fix boost mac cross build with clang 9+ (Cory Fields)

Pull request description:

  The ancient "darwin-4.9.1" profile has long been used to match against clang, which prior to version 9, reported 4.9.1 as its version when invoking "clang++ -dumpversion". Presumably this was a historical compatibility quirk related to Apple's switch from gcc to clang.

  This was "fixed" in clang 9.0, so that -dumpversion reports the real version. Unfortunately that had the side-effect of breaking the (brittle) boost compiler detection.

  Move to the seemingly more-correct "clang-darwin" profile, which passes the checks and builds correctly.

  Also switch to using ar rather than libtool for archiving, as it's what the clang-darwin profile expects to be using.

  Note that because this is using a different profile, some of the final command-line arguments end up changing. Those changes look sane at a glance.

ACKs for top commit:
  fanquake:
    ACK 50037e97d11356218c4b36767232e47b74742b0b - tested on on macOS, will wait for the gitian build.

Tree-SHA512: eac1f353513a445add6fbece7fc78dd3dbdde5e2219bfb7739b82f40bb14de449667a94d2e303d43c67d9b38e7ceb0ba5f0d8fe20b40be2017b1ca0875467c2c
2021-02-17 14:53:57 +01:00
Wladimir J. van der Laan
d390a1412e Merge #15461: [depends] update to Boost 1.70
2620e24b83d16bf0f2bfe360dee1e98b4be59ca5 [depends] boost: update to 1.70 (Sjors Provoost)

Pull request description:

  Version [1.70](https://www.boost.org/users/history/version_1_70_0.html) is most recent.

  Versions needed for:
  * 1.66: #12557: fixes the single arm64 configuration ([06ee5b5](06ee5b54ef))

ACKs for commit 2620e2:

Tree-SHA512: 6e0174f1d92c2c24314c0689d4809e048914f8f42d17aa73799f5ee232169e0dd0ed71f5f973903c44c08309f2837c629c493f15e5c31ec6c7bd1daae5f3b25f
2021-02-17 14:22:09 +01:00
UdjinM6
77e9a4a83b
chainlocks: Relay clsig inv only after bestChainLock(Hash) are assigned (#3990)
Fixes a race condidion when we might reply with `notfound` to other nodes because we might still be waiting for locks here.
2021-02-16 16:54:19 +01:00
UdjinM6
ebea362d06
qt: Decouple transaction label updates from transaction status updates (#3994)
* qt: Decouple tx label updates from tx status updates

* Update src/qt/transactionrecord.cpp

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-02-14 17:27:28 -06:00
dustinface
6ec8b9a5c8
llmq: Some refactoring in CChainLocksHandler::ProcessNewChainLock (#3976)
* llmq: Drop InternalHasConflictingChainLock in ProcessNewChainLock

* llmq: Directly use clsig.blockHash instead of copying it into msgHash

* llmq: Reuse CInv(MSG_CLSIG, hash)

* llmq: Add const in two places
2021-02-14 16:12:40 -06:00
UdjinM6
054be30344
llmq: Sleep less in quorum data recovery threads (#3989)
Speeds up feature_llmq_data_recovery.py test ~25% and makes sense overall imo.
2021-02-14 16:11:20 -06:00