Commit Graph

19193 Commits

Author SHA1 Message Date
UdjinM6
9420314377
rpc: Adjust some masternode rpcs (#4060)
* rpc: Deprecate `masternode current` and `masternode winner`

* rpc: Drop deprecated `mode` param in `masternode count`
2021-03-26 13:17:25 +01:00
UdjinM6
83663c564e
trivial|doc: Some trivial housekeeping (#4059)
* Fix extra line break in CommitTransaction log message

Introduced in #3680 ebe7e80a49 (diff-b2bb174788c7409b671c46ccc86034bdR4113)

* doc: Fix `quorum sign` help

* doc: Add `getdata` to quorum commands list help

* doc: Drop "P2WSH" from signrawtransactionwithkey help

* trivial: Replace "push_back(Pair(..))" with "pushKV"

* trivial: Reorder wallet cmd-line options

* git: Add macos debug simbols to .gitignore

* trivial: Fix typos and whitespaces, drop unused stuff
2021-03-26 13:11:11 +01:00
PastaPastaPasta
fc96e34f28
trivial/wallet: remove unneeded spork include (#4057)
Signed-off-by: pasta <pasta@dashboost.org>
2021-03-26 13:07:31 +01:00
thephez
b0bafc0b07
trivial: -llmq-qvvec-sync help description (#4056)
* Update init.cpp

Fix parentheses

* Update src/init.cpp

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-03-25 12:59:40 -04:00
dustinface
1c667710be
llmq: Verify final commitments in CDKGSession::FinalizeCommitments (#4033)
* llmq: Verify final commitments in CDKGSession::FinalizeCommitments

* llmq: Measure verification time separated
2021-03-25 12:32:12 -04:00
dustinface
df0bf93cb7
llmq|rpc|test: Fix previous active set checks in RPC commands (#4048)
* llmq: Introduce signOffset in CSigningManager::VerifyRecoveredSig

* rpc|test: Fix `signHeight + dkgInterval` check in verifyislock

* rpc|test: Fix `signHeight + dkgInterval` check in `quorum verify`

* test: Test `signHeight + dkgInterval` checks

In `quorum verify` and `verifyislock` RPC commands
2021-03-25 12:30:00 -04:00
UdjinM6
f525f6148b
llmq: A couple of tweaks/fixes for handling nodeStates in CSigSharesManager (#4054)
* llmq: Protect nodeStates in CSigSharesManager::Cleanup()

* refactor: Tweak nodeState cleanup in CSigSharesManager::Cleanup()

* llmq: Add a couple of AssertLockHeld-s to ensure nodeStates protection
2021-03-24 13:13:55 +03:00
UdjinM6
00d237f98f
Add/fix/tweak translated strings (#4052)
* wallet: translate some dash specific warnings

* transaction type: "CoinJoin Denominate" -> "CoinJoin Mixing"

* transaction type: "CoinJoin" -> "CoinJoin Send"

* Avoid translating "CoinJoin"

* Move the link to CoinJoin doc out of the translated string

* Remove trailing whitespace

* Apply suggestions from code review

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

* Update src/wallet/test/wallet_tests.cpp

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

* Update src/coinjoin/coinjoin.cpp

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: thephez <thephez@users.noreply.github.com>
2021-03-24 13:13:25 +03:00
strophy
fb311468b7
Docker release CI (#4051)
* feat:add github actions

* add release tag

* multi-arch download

* remove erroneous add command

* install wget properly

* parse tag

* no multi-arch for now

* show vars

* more debug

* show uname

* install certs

* manually mutate tag

* fix syntax

* use env

* remove debug

* try docker meta

* try semver with v

* multi-arch

* remove v

* use tag-match

* match group 1

* prepare for dashpay repo

* optimize dockerfile

* remove unnecessary space

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

* Update .github/workflows/release_docker_hub.yml

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-03-24 13:11:50 +03:00
PastaPastaPasta
567909403c
Merge pull request #4050 from UdjinM6/bp13190_no_ShutdownRequested
qt: Avoid accessing ShutdownRequested directly from qt, use Node interface
2021-03-23 12:27:38 -04:00
PastaPastaPasta
6dd49002c0
Merge pull request #4049 from UdjinM6/bp17068
Fix two translation build issues
2021-03-23 12:26:20 -04:00
PastaPastaPasta
8ab18b439a
trivial: remove unused struct (#4053)
Signed-off-by: pasta <pasta@dashboost.org>
2021-03-23 12:16:20 -04:00
UdjinM6
221adfb426
Avoid accessing ShutdownRequested directly from qt, use Node interface 2021-03-23 04:37:16 +03:00
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
25c14b999f
Fix "Qualifying with unknown namespace/class" warnings on make translate 2021-03-22 13:40:17 +03:00
Franck Royer
689da59e3d
backport #17068: qt: Always generate bitcoinstrings.cpp on make translate
`bitcoinstrings.cpp` is to be generated at release time. Hence,
it should not depend on whether the source files are younger as the
releaser may proceed from a fresh checkout.
2021-03-22 13:39:50 +03: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