Commit Graph

18892 Commits

Author SHA1 Message Date
dustinface
21cfb4c934
llmq|rpc|test|version: Implement P2P messages QGETDATA <-> QDATA (#3953)
* version: Bump PROTOCOL_VERSION and MIN_MASTERNODE_PROTO_VERSION

* version: Introduce LLMQ_DATA_MESSAGES_VERSION for QGETDATA/QDATA support

* test: Bump MY_VERSION to 70219 (LLMQ_DATA_MESSAGES_VERSION)

* llmq: Introduce CQuorumDataRequest as wrapper for QGETDATA requests

* llmq: Implement CQuorum::{SetVerificationVector, SetSecretKeyShare}

* llmq|net|protocol: Implement QGETDATA/QDATA P2P messages

* llmq: Restrict processing QGETDATA/QDATA to masternodes only

* llmq: Implement request limiting for QGETDATA/QDATA

* llmq: Implement CQuorumManger::RequestQuorumData

* rpc: Implement "quorum getdata" as wrapper around QGETDATA

Allows to trigger sending QGETDATA messages to connected peers by RPC.

* test: Handle QGETDATA/QDATA messages in mininode

* test: Add data structures to support QGETDATA/QDATA

* test: Add some helper in test_framework.py

* test: Implement tests for QGETDATA/QDATA in p2p_quorum_data.py

* test: Add p2p_quorum_data.py to BASE_SCRIPTS

* llmq|test: Add QWATCH support for QGETDATA/QDATA

* llmq: Store CQuorumPtr in cache, not CQuorumCPtr

* llmq: Fix cache usage after recent changes

* Use uacomment to create/find specific p2ps

* No need to use network adjusted time here, GetTime should be enough

* rpc: check proTxHash

* minor tweaks

* test: Adjustments after 4e27d6513e

* llmq: Rename and improve error lambda in CQuorumManager::ProcessMessage

* llmq: Process QDATA if -watchquorums is enabled

* test: Handle qwatch messages in mininode

* test: Add test for -watchquorums support

* test: Just some empty lines

* test: Properly stop the p2p network thread at the end of the test

* rpc: Adjust "quorum getdata" parameter descriptions

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

* rpc: Fix optionality of proTxHash in "quorum getdata" command

* test: Test optionality of proTxHash for "quorum getdata" command

* test: Be more specific about imports in p2p_quorum_data.py

* llmq|rpc: Add some comments about the request.GetDataMask checks

* test: Some more empty lines

* rpc: One more parameter description

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

* test: Unify assert statements / drop parentheses for all of them

* fix typo

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

* adjust some line wrapping to 80 chars

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

* tests: Seperate out into dif atomic methods, add logging

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

* test: Avoid restarting masternodes, just let available requests expire

Just takes a lot time and isn't required imo.

* test: Drop redundant code/tests after separation

This was introduced in 9e224ec2f2

* test: Merge three tests

"test_mnauth_restriction", "test_invalid_messages" and "test_invalid_unexpected_qdata" with the resulting name "test_basics" because i don't feel like DKG recovery thing should be part of a test called "test_invalid_messages" and giving it an own test probably wouldn't make a lot sense because it would still depend on "test_invalid_messages". I also think there is no need for a separated "test_invalid_unexpected_qdata".

* test: Rename test_ratelimiting_banscore -> test_request_limit

* test: Apply python style

* test: Wrap all at 120 characters

Thats the default "draw annoying warnings" setting for PyCharm (and IMO a reasonable line length).

* test: Move some variables

* test: Optimize for speed

* tests: use wait_until in get_mininode_id

* test: Don't use `!=` to check for `None`

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: pasta <pasta@dashboost.org>
2021-01-28 17:33:18 -05:00
UdjinM6
5d4431c017
refactor: Add (and use) queueAndMaybePushInv helper (#3961) 2021-01-25 22:35:18 -05:00
PastaPastaPasta
671b336a34
refactor: misc. governance refactoring (#3958)
* fix typos

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

* remove unneeded initialization

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

* make method const

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

* use default for trivial destructor

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

* governance: remove all typedefs for iterators, use auto instead

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

* remove redundant size_type

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

* Remove unused and singly used typedefs

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

* remove unused code

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

* mark constructor as explicit

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

* remove unused typedef

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

* remove unneeded initialization

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

* remove singly used typedef

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

* pass const reference, and don't copy for no reason

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

* make method const

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

* make method const

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

* make method const

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

* typo

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

* make constructor explicit

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

* Clang-Tidy: 'virtual' is redundant since the function is already declared 'override'

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

* Clang-Tidy: Prefer using 'override' or (rarely) 'final' instead of 'virtual'

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

* use default for trivial destructor

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

* remove unused include

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

* remove unneeded semicolon

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

* fix typos

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

* fix typo

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

* mark constructor explicit

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

* remove unused typedef

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

* remove commented out code

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

* mark constructor explicit

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

* remove unused spork

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

* remove boolean check where always true

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

* make method const

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

* Remove nCount completely

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

* Use default path

Signed-off-by: pasta <pasta@dashboost.org>
2021-01-25 22:31:31 -05:00
UdjinM6
783f07e9f7
tests: Add uacomment in P2PConnection and use it to create (correct network specific) strSubVer (#3969) 2021-01-25 19:35:17 +01:00
dustinface
dc2473cd04
llmq: Some fixes/improvements (#3943)
* llmq: Detach dash-q-cachepop from caller

There should be no reason to keep this tread attached
to its parent, if so, let me know.

* llmq: Avoid nullptr access for pindexStart in ScanQuorums

* llmq: Add cacheKey in ProcessCommitment

* llmq: Erase minable commitments if they have been processed

* llmq: Add CLLMQUtils::InitQuorumsCache

* llmq: Use unordered_lru_cache for quorumsCache and rename it

* llmq: Use unordered_lru_cache for hasMinedCommitmentCache and rename it

* llmq: Drop redundant check

* llmq: Rename nMaxCount2 -> nScanCommitments

* llmq: Refactor storeCache -> fCacheExists

* llmq: Rename maxCount -> nCountRequested

* llmq: Rename result -> vecResultQuorums

* llmq: Return an empty vector if the are zero elements requested

* unordered_lru_cache: Add max_size()

* llmq: Partially reuse existing cache if more than max is requested

* llmq: std::map<LLMQType, unordered_lru_cache<...>> for scanQuoumsCache

* llmq: Drop params

* llmq: Only emplace to cache if there is something available
2021-01-25 10:22:28 +01:00
UdjinM6
f69d0f4d64
instantsend: Relay IS-locks for matching txes when replying to merkleblock inv in getdata (#3959) 2021-01-25 00:01:08 -05:00
UdjinM6
a328756396
Flush callbacks one more time at shutdown (#3963)
This is needed to be able to process SetBestChain callback generated by the first FlushStateToDisk call in PrepareShutdown

Partially reverts #3378
2021-01-24 23:56:18 -05:00
UdjinM6
48bf736525
wallet: Upgrade path for non-HD wallets to HD (#3933)
* Check mnemonic passphrase size in SetMnemonic instead of CreateWalletFromFile

* Move processing of cmd-line options and recovery via hdseed out of GenerateNewHDChain

* Implement GenerateNewHDChainEncrypted and tweak EncryptHDChain to be able to generate new encrypted HD chains in an already encrypted wallet

* rpc: Implement upgradetohd rpc

* Address review comments

* tweak rpc response

* tests: Test various non-HD to HD wallet upgrade paths

* Apply suggestions from code review

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

* Fix suggestions

* tests: Check upgradetohd return value

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-01-24 22:03:33 -05:00
dustinface
ce3bcab3ab
rpc|test: Introduce "mnauth" RPC command to override masternode authentications (#3930)
* rpc: Introduce "mnauth" RPC command to fake masternode authentications

* test: Test "mnauth" RPC command

* test: Add rpc_mnauth.py to BASE_SCRIPTS

* Update src/rpc/misc.cpp

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

* Update test/functional/rpc_mnauth.py

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2021-01-24 21:50:16 -05:00
dustinface
0c1a02be2c
net|rpc: getpeerinfo - Add verified_pubkey_hash, fix a typo in verified_proregtx_hash docs (#3929)
* net|rpc: Add verified_pubkey_hash in getpeerinfo for MN connections

* Apply suggestions from code review

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

* rpc: One more typo

Co-authored-by: thephez <thephez@users.noreply.github.com>
2021-01-22 17:12:22 -05:00
dustinface
ec1281c7ad
llmq: Store encrypted DKG contributitons (#3948)
* llmq: Add CDKGSessionManager::WriteEncryptedContributions

Allows to store each member's encrypted contributions of the DKG.

* llmq: Store each member's contributions in the llmq database

* llmq: Add CDKGSessionManager::GetEncryptedContributions

I decided to don't cache here since its probably very unlikely this is called twice in a short period with what we have planed for it so far. We can add caching if the requirement for it changes at some point?
2021-01-22 10:11:06 -05:00
Kolby Moroz Liebl
e197f976e1
backport bitcoin#16509 and add devnet test (#3946)
* Merge #16509: test: Adapt test framework for chains other than "regtest"

faf36838bdba7393960fce6ad0c56dc1f93f5870 test: Avoid hardcoding the chain name in combine_logs (MarcoFalke)
fa8a1d7ba30040f8c74f93fc41a61276c255a6a6 test: Adapt test framework for chains other than "regtest" (MarcoFalke)
68f546635d5de2ccfedadeabc7bc79e12e5eca6a test: Fix “local variable 'e' is assigned to but never used” (Ben Woosley)

Pull request description:

  This is required for various work in progress:

  * testchains #8994
  * signet #16411
  * some of my locally written tests

  While it will be unused in the master branch as of now, it will make all of those pull requests shorter. Thus review for non-regtest tests can focus on the actual changes and not some test framework changes.

ACKs for top commit:
  jonatack:
    ACK faf36838bdba7393960fce6ad0c56dc1f93f5870, ran tests and reviewed the code.

Tree-SHA512: 35add66c12cab68f2fac8f7c7d47c604d3f24eae9336ff78f83e2c92b3dc08a25e7f4217199bac5393dd3fb72f945bba9c001d6fbb8efd298c88858075fcb3d6

* Add devnet support for tests

* test: make sure devnet can connect to each other and start

* Partial merge bitcoin/bitcoin#16681: Tests: Use self.chain instead of 'regtest' in almost all current tests, revert one TODO while at it

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
Co-authored-by: Jorge Timón <jtimon@jtimon.cc>
2021-01-22 09:58:07 -05:00
dustinface
e695209d6c
spork: Add more constness in CSporkManager and CSporkMessage (#3955) 2021-01-22 00:57:42 -05:00
UdjinM6
1e0cc1254c
Use single-threaded scheduler for IS, CL and Governance notifications (#3954)
* Use single-threaded scheduler for IS, CL and Governance notifications

* Pass shared_ptr-s instead of objects themselves for CL, IS and Governance notifiers in CMainSignals/CValidatibnInterface

* llmq: Create shared_ptr for clsig at the root of its lifetime

* llmq: Create shared_ptr for islock clsig at the root of its lifetime

* llmq: Create shared_ptr for recSig at the root of its lifetime

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-01-21 23:32:15 -05:00
dustinface
ccbf574fa3
chainparams|init: Add -llmqinstantsend command line parameter for devnets (#3956)
* chainparams: Add methods to adjust llmqTypeInstantSend

* init: Add -llmqinstantsend command line parameter for devnets
2021-01-21 14:29:14 -06:00
dustinface
e6cc0b9bec
bls: Modify CBLSIES classes - Introduce individually encrypted objects (#3937)
* bls: Adjust CBLSIESEncryptedBlob to match CBLSIESMultiRecipientBlobs

With this change a single encrypted object of CBLSIESMultiRecipientBlobs is has the same structure like CBLSIESEncryptedBlob

* bls: Add CBLSIESEncryptedObject constructor

* bls: Add CBLSIESMultiRecipientObjects::Get

Allows to query a individual encrypted object as CBLSIESEncryptedObject

* bls: Drop unneeded constructor call

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-01-21 14:25:42 -06:00
UdjinM6
62c38282d8
blockchain: Implement auto-recovery from hardforks (#3926)
* Implement auto-recovery from hardforks

This should help users who fail to update their nodes/wallets in time when there is a hardfork.

* tests: tweak feature_llmq_chainlocks.py to check new behaviour

* tests: tidy up feature_llmq_chainlocks.py a bit
2021-01-21 11:18:25 -05:00
PastaPastaPasta
393ed59718
spork: implement spork caching (#3942)
* Implement Spork Caching

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

* spork: Add missing lock

* spork: Keep constness of SporkValueIsActive

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-01-21 03:04:14 +01:00
thephez
3f51db3401
docs: fix typo in addmultisigaddress (#3952) 2021-01-20 17:30:14 -05:00
UdjinM6
e9341da0a7
spork: Fix a couple of issues with multikey sporks cleanup, add more tests (#3947)
* Fix a couple of issues with multikey sporks cleanup

1. Should remove sporks with signatures from unknown signers from mapSporksActive
2. Should advance itSignerPair while doing (1)...

* tests: make sure sporks cleanup works as expected for multikey sporks

* tests: make sure multiple multikey sporks (and their cleanups) work together as expected

* Prettify node extra args
2021-01-20 17:27:41 -05:00
UdjinM6
e6a351993b
privatesend: Track mixing rounds via CTxDSIn and not via CTxOut (#3950)
* Do not use CTxDSIn when we don't care about PS rounds

Also refactor CreateCollateralTransaction

* Track input rounds via CTxDSIn and not via CTxOut

* refactor: Create collateral transactions in CPrivateSendClientSession

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-01-20 11:38:05 -05:00
UdjinM6
dcad667e17
wallet: Detect potential deadlocks in AddToWallet (#3949) 2021-01-20 11:36:09 -05:00
UdjinM6
fc92f8e13e
wallet: Update wallet utxo set when new keys are found for already known transactions (#3944)
* wallet: Update wallet utxo set when new keys are found for already known transactions

* Update src/wallet/wallet.cpp

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-01-20 11:35:46 -05:00
UdjinM6
611511589d
privatesend: Calculate base size in CTransactionBuilder ctor based on actual scriptPubKey-s (#3938)
* Store CInputCoin-s instead of COutpoint-s in CompactTallyItem

* Calculate base size in CTransactionBuilder ctor based on actual scriptPubKey-s

It breaks on non-p2pkh otherwise.
2021-01-20 11:31:51 -05:00
PastaPastaPasta
f4c39a5897
Simplify PreVerifyInstantSendLock (#3941)
Signed-off-by: pasta <pasta@dashboost.org>
2021-01-18 20:29:10 +01:00
dustinface
ddb57ce2a3
llmq: Some refactoring in CQuorumManger (#3935)
* llmq: Refactor CQuorumManager::{BuildQuorumFromCommitment, GetQuorum}

Construct and cache new quorums inside BuildQuorumFromCommitment

* llmq: Make all methods of CQuorumManager const
2021-01-18 13:54:50 -05:00
dustinface
bdbadc1809
llmq:: Return const reference in GetLLMQParams() and move it out of CLLMQUtils (#3936)
* llmq: Return const reference in CLLMQUtils::GetLLMQParams

* llmq: Move GetLLMQParams out of CLLMQUtils
2021-01-18 01:27:29 +01:00
UdjinM6
482ba4f5ae
Always mark conflicting blocks with BLOCK_CONFLICT_CHAINLOCK flag (#3924)
* More accurate handling of the BLOCK_CONFLICT_CHAINLOCK flag

* Update test/functional/feature_llmq_chainlocks.py

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

* tests: make sure that previous tip on the reorged node is marked conflicting after chainlock

* Apply suggestions from code review

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

Co-authored-by: thephez <thephez@users.noreply.github.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-01-16 14:47:13 -05:00
dustinface
4a6eee2511
test: Check for the actual llmq_test session, not just for any (#3934) 2021-01-15 21:59:42 -05:00
dustinface
59991bec25
test/refactor: Fix typo, remove_mastermode -> remove_masternode (#3931) 2021-01-14 14:00:57 -06:00
UdjinM6
1f1f2d8078
refactor: Rename fMasternode and fMasternodeProbe (#3928)
* fMasternode -> m_masternode_connection

* fMasternodeProbe -> m_probe_connection

* probe_connection -> masternode_probe_connection
2021-01-14 13:59:18 -06:00
Kolby Moroz Liebl
3ee7c291b0
qt: Add masternode info to peer page (#3927)
* Add masternode info to peer page

* Update src/qt/forms/debugwindow.ui

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

* Use verifiedProRegTxHash to check if node is masternode

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-01-14 13:55:06 -06:00
dustinface
cc8a1bc19c
llmq|rpc|test: Add optional "submit" parameter to "quorum sign" (#3917)
* llmq: Split CSigShare creation/processing in CSigSharesManager

* rpc: Add "submit" parameter to "quorum sign"

* test: Add CSigShare and msg_qsigshare to messages.py

* test: Test the optional "submit" parameter of "quorum sign"
2021-01-14 20:53:26 +01:00
Kittywhiskers Van Gogh
4f38f5c2ef
Partial merge bitcoin#14624: Some simple improvements to the RNG code (#3923)
* random: Introduce std::shuffle alternative for FastRandomContext

3db746beb4

* random: change std::random_shuffle calls to std::shuffle

https://en.cppreference.com/w/cpp/algorithm/random_shuffle (deprecated in c++14)

* random: change FastRandomContext std::random_shuffle calls to shuffle

* random: change last std::shuffle calls to Shuffle

std::shuffle doesn't accept only two arguments so we use FastRandomContext()

* llmq: use inherited FastRandomContext

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

* llmq: use inherited FastRandomContext

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

* Make the linter happy :)

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-01-14 13:46:16 -06:00
UdjinM6
38ac83e385
Do not store hashes in ProcessPendingMessageBatch and do not pass them to ReceiveMessage-s (#3921)
* Do not store hashes in ProcessPendingMessageBatch and do not pass them to ReceiveMessage-s

* follow up: refactor/unify code in ProcessPendingMessageBatch
2021-01-14 13:42:08 -06:00
dustinface
a3a391dd32
rpc|test: Improve platform restrictions, add new commands to the whitelist (#3918)
* rpc: Rename platformAllowedCommands => mapPlatformRestrictions

* rpc: Use std::multimap instead of std::map for mapPlatformRestrictions

* rpc|init: Move restrictions to CRPCTable and initialize them in seperate

This is to allow restrictions based on the currently active network.

* rpc: Allow multiple parameter of type UniValue for mapPlatformRestrictions

* rpc: Add "quorum {sign,verify}" to the platform-user whitelist

* test: Add "quorum {sign, verify}" tests, test some invalid combinations

* rpc|test: Add verifyislock to platform-user whitelist
2021-01-14 13:39:34 -06:00
tomthoros
4ce3635d99
Consensus: DIP-0020: Dash opcode updates. Remaining dip0020 opcodes (#3893)
* DIP-0020: Dash opcode updates - enable AND, OR, XOR

* DIP-0020: Dash opcode updates - enable DIV, MOD

* DIP-0020: Dash opcode updates - enable BIN2NUM, NUM2BIN

* DIP-0020: Dash opcode updates - enable CHECKDATASIG, CHECKDATASIGVERIFY (no tests)

* DIP-0020: Dash opcode updates - fix whitespace

* DIP-0020: Dash opcode updates - add checkdatasig and datacheckdatasigverify json tests

* More AND_OR_XOR tests

* DIP-0020: Dash opcode updates - move opcodes enabled tests around. Add unit tests back

* DIP-0020: Dash opcode updates - sort BITCOIN_TESTS aplhabetically

* DIP-0020: Dash opcode updates - formatting

* DIP-0020: Dash opcode updates - formatting

* DIP-0020: Dash opcode updates - formatting references alignment

* DIP-0020: Dash opcode updates - formatting references alignment

* Update src/script/interpreter.h

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

* Update src/script/interpreter.h

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

* Update src/test/script_tests.cpp

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-01-13 14:45:04 -06:00
PastaPastaPasta
79ef4f8dee
Adjust version formatting and add formatted version to rpc (#3908)
* Always show full version precision

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

* add field "formattedversion" to `getnetworkinfo` that is the version, to include rc info, commit info, dirty, etc as available

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

* use `buildversion` instead of `formattedversion`

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

* adjust unit tests

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-01-11 20:34:42 +01:00
dustinface
0f62d55af6
llmq|rpc|test: Fix "quorumHash" parameter of "quorum sign" (#3914)
* llmq: Add an optional quorum hash to CSigningManager::AsyncSignIfMember

Allows to select the quorum to sign by its hash.

* rpc: Fix quorum selection of "quorum sign"

* test: Test the optional "quorumHash" parameter of "quorum sign"

* llmq: Move quorum checks up to avoid calling WriteVoteForId if they fail
2021-01-11 11:17:41 -06:00
UdjinM6
f3e8401da5
rpc: Introduce verifyislock (#3906)
* Introduce `verifyislock` rpc

* Update test/functional/rpc_verifyislock.py

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

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2021-01-11 11:13:50 -06:00
Kolby Moroz Liebl
724db5e1cb
rpc: Add runtime error for Generate commands when the build compiles without mining support (#3922)
* Add runtime error for generate commands when builds compile without mining support

* Update src/rpc/mining.cpp

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

* Update src/wallet/rpcwallet.cpp

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-01-10 21:30:24 -06:00
dustinface
885dcb1b66
refactor: Drop some unused code (#3919)
* llmq: Drop hash parameter in PreVerifyMessage methods

* llmq: Drop some unused variables

* rpc: Drop unused variable

* llmq|net: Drop some unused CConnman parameter

* llmq: Drop some unused quorum parameter

* llmq: Drop some unused nodeId parameter

* Drop unused variables

* llmq: Drop more

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-01-10 21:28:37 -06:00
UdjinM6
8178b297ee
spork: Introduce SPORK_23_QUORUM_POSE (#3907)
This splits SPORK_21_QUORUM_ALL_CONNECTED into two which should let us control node connectivity and quorum PoSe individually.
2021-01-10 21:23:01 -06:00
UdjinM6
074318a9ba
rpc: Introduce quorum verify (#3904)
* rpc: Introduce `quorum verify`

* test: Test both "quorum not found" paths

* rpc: Check both "quorum not found" failures in one place

* rpc: Adjust description of "quorum verify"

* auto -> int

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-01-10 21:21:16 -06:00
PastaPastaPasta
84ed589c15
Merge pull request #3903 from UdjinM6/bp11372
Backport 11167 (partial), 11372, 11630 and 14242
2021-01-10 21:20:47 -06:00
UdjinM6
7b3bac65eb
tests: fix random feature_dip4_coinbasemerkleroots.py failures (#3916) 2021-01-08 13:56:32 -06:00
UdjinM6
c4e269cf0c
A couple of fixes for stats (#3920)
* Use gaugeDouble for hashrate and difficulty stats

* Add transactions.totalTransactions gauge

Also group "transactions" gauges in PeriodicStats
2021-01-08 13:45:57 -06:00
UdjinM6
51027eed43
tests: Test all rpc commands in rpc_platform_filter.py (#3913)
* tests: Test all rpc commands in rpc_platform_filter.py

* bugfix: test "debug 1" instead of "stop" to avoid interference with the regular test shutdown process

* Apply suggestions from code review

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-01-08 13:43:59 -06:00
UdjinM6
171b17523f
Fix quorum selection for low heights (#3912) 2021-01-08 13:39:40 -06:00
dustinface
aff2d47ee8
llmq: Improve/Fix GetVerifiedContributions (#3911)
* llmq: Fix GetVerifiedContribution to return false in case of failure

* llmq: Move GetVerifiedContribution into GetVerifiedContributions

* llmq: Drop GetVerifiedContribution

* llmq: Keep cache locked while building GetVerifiedContributions result

* llmq: Read from DB into vvecPtr directly
2021-01-08 13:36:26 -06:00