* Don't fully remove protx commands when ENABLE_WALLET is not set
* Check for wallet support at run-time for protx commands
* Only show subcommands that require the wallet when ENABLE_WALLET is set
* Add and use CheckWalletOwnsKey which is able to check wallet support at runtime
* Properly handle disabled wallets in "protx list"
This now also handles the case where ENABLE_WALLET is not defined.
* Drop comment that doesn't fully apply anymore
* Fix wrong index for argument to protx_update_service when error is thrown
* Unify and fix variable name in TxToJSON
The UniValue variable name for TRANSACTION_COINBASE was wrong and is fixed
now. Also changed names for all other special TXs to unify names. This
should avoid such errors in the future when new "else if" branches are
copy/pasted.
* Use "proRegTx" instead of "proTx" as key TRANSACTION_PROVIDER_REGISTER payloads
* Fix incorrect inline help for "protx update_registrar"
Initial ProRegTx does not define a field named "collateralAddress". It is not necessary to use the collateral address to receive payout, any Dash address can be defined here.
* Fix incorrect syntax for "protx revoke" inline help
"operatorKey" is required here
* RPC - Correct protx register_prepare help example
Use collateral hash and index instead of address
* RPC - Change protx register help ECDSA address to BLS operator key
* RPC - protx register_prepare help correction
Should direct to protx register help, not protx register_fund
* RPC - protx help typo
Add decimal places to clarify:
1. Non-integers are valid (e.g. 3.25)
2. Granularity - anything beyond x.xx is rounded (e.g. 3.259 -> 3.26)
This is due to DIP3 allowing values 0-10000 for operator reward (1/10000
= 0.01%)
* RPC: Add help details for the bls RPC
* RPC: Refactor to match gobject RPC behavior
* RPC: Use command instead of strCommand for consistency within file
* RPC: BLS help cleanup
* RCP: Remove leading underscore on bls_help
* Pass CCoinsView reference to special TX handling methods
* Allow referencing other TX outputs for ProRegTx collateral
* Remove "collateralAmount" from "protx register"
* Rename "protx register" to "protx fund_register"
* Remove UpdateSpork15Value from CDeterministicMNManager
Was not used/implemented anymore
* Lock masternode collaterals after chain/DIP3 is fully initialized
Otherwise detection of collaterals does not work.
* Implement new "protx register" RPC which uses existing collaterals
* Remove "masternode info" RPC
It is not consistent with other "masternode" RPCs anymore as it requires
the ProRegTx hash while all other RPCs work with the collateral.
* Load sporks from disk cache before initializing the chain
Otherwise spork15 is not loaded when we check it for the first time.
* Implement "protx info" RPC
* Use "protx info" instead of "masternode info" in DIP3 tests
* Test external collaterals for ProTx
* Handle review comments
* Don't pass CCoinView reference when it's not used
* Revert "Pass CCoinsView reference to special TX handling methods"
This reverts commit 28688724e1.
* Use GetUTXOCoin instead of now removed coinsView
Also remove collateral height check as GetUTXOCoin only returns confirmed
coins.
* Add conflict handling for external collaterals to mempool
* Handle review comments (squashed Github suggestions)
Co-Authored-By: codablock <ablock84@gmail.com>
* Remove nProtocolVersion fields from deterministic masternode lists
This field was part of my initial implementation from DIP3. One of the last
changes of DIP3 was then to remove this field, which I did not bring back
into code yet. This commit removes it now.
We use PROTOCOL_VERSION now in cases were compatibility in the the pre-DIP3
list is needed.
* Add type and mode fields in DIP3 special TXs
These were added to DIP3 but not in-code yet.
* Add DMN_PROTO_VERSION
* Use BLS keys for operator keys
* Add "bls generate" RPC to generate BLS keys
* Use unique_ptr to store blsKeyOperator and blsPubKeyOperator
Needed because the Chia BLS library crashes when keys are created before
the library is initialized, even if keys are not used. This is the case here
as we have static instances here.
* Remove unnecessary CheckSignature calls
This seems to be some garbage I left in by mistake.
* Fixed review comments
* Fix rpc help for operator keys
All keys that are used as examples are random. None of the secret keys
belongs to any of the public keys.
* Use .GetHash() instead of ::SerializeHash() for BLS pubkeys in txmempool.cpp
* Rename mapProTxBlsPubKeys to mapProTxBlsPubKeyHashes
These cause crashes when used in for loops. Reason is very likely that
temporary CDeterministicMNList objects are destroyed before entering the
loop while the adaptors rely on these objects.
Discovered in one of our devnets while calling "protx list"