From 54c7c5dc4a22c118370b69092851cd5414bb800b Mon Sep 17 00:00:00 2001 From: thephez Date: Tue, 6 Nov 2018 17:21:45 -0500 Subject: [PATCH] V0.13.0 RPC protx (#91) * Content - RPC - Add basic protx details Example calls and subcommands only * Content - RPC - Add parameter info for register RPCs * Content - RPC - Add parameter info for list RPC * Content - Create reusable var for ProTx details * Content - RPC - Add parameter info for remaining protx subcommands info, update_service, update_registrar, revoke, diff * Content - RPC - Minor typo fixes --- _autocrossref.yaml | 6 + _config.yml | 1 + .../devdoc/dash-core/rpcs/quick-reference.md | 1 + _includes/devdoc/dash-core/rpcs/rpcs/protx.md | 752 ++++++++++++++++++ _includes/helpers/summaries.md | 1 + _includes/helpers/vars.md | 127 +++ _includes/layout/base/rpc-table.html | 6 + _includes/references.md | 5 + en/developer-reference.md | 2 + 9 files changed, 901 insertions(+) create mode 100644 _includes/devdoc/dash-core/rpcs/rpcs/protx.md diff --git a/_autocrossref.yaml b/_autocrossref.yaml index 745560d9..5cd39bcf 100644 --- a/_autocrossref.yaml +++ b/_autocrossref.yaml @@ -150,6 +150,10 @@ pki: '`pong` message': pong message '`pong` messages': pong message previous block header hash: +'ProRegTx': proregtx special tx +'ProUpRegTx': proupregtx special tx +'ProUpRevTx': prouprevtx special tx +'ProUpServTx': proupservtx special tx protocol buffer: protobuf protocol buffers: protobuf protocol version 106: section protocol versions @@ -462,6 +466,8 @@ DIP1: '`move` RPC': rpc move '`ping`': rpc ping '`ping` RPC': rpc ping +'`protx`': rpc protx +'`protx` RPC': rpc protx '`preciousblock`': rpc preciousblock '`preciousblock` RPC': rpc preciousblock '`prioritisetransaction`': rpc prioritisetransaction diff --git a/_config.yml b/_config.yml index db5a57ec..b4fab8d2 100644 --- a/_config.yml +++ b/_config.yml @@ -288,6 +288,7 @@ devsearches: - 'MnSync': "/en/developer-reference#mnsync" - 'Move': "/en/developer-reference#move" - 'Ping': "/en/developer-reference#ping-rpc" + - 'ProTx': "/en/developer-reference#protx" - 'PreciousBlock': "/en/developer-reference#preciousblock" - 'PrioritiseTransaction': "/en/developer-reference#prioritisetransaction" - 'PrivateSend': "/en/developer-reference#privatesend" diff --git a/_includes/devdoc/dash-core/rpcs/quick-reference.md b/_includes/devdoc/dash-core/rpcs/quick-reference.md index d9224f18..3c55d81c 100644 --- a/_includes/devdoc/dash-core/rpcs/quick-reference.md +++ b/_includes/devdoc/dash-core/rpcs/quick-reference.md @@ -168,6 +168,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core {% autocrossref %} * [BLS][rpc bls]: {{summary_bls}} {{DASH_NEW0_13_0}} +* [ProTx][rpc protx]: {{summary_proTx}} {{DASH_NEW0_13_0}} {% endautocrossref %} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/protx.md b/_includes/devdoc/dash-core/rpcs/rpcs/protx.md new file mode 100644 index 00000000..400522cd --- /dev/null +++ b/_includes/devdoc/dash-core/rpcs/rpcs/protx.md @@ -0,0 +1,752 @@ +{% comment %} +This file is licensed under the MIT License (MIT) available on +http://opensource.org/licenses/MIT. +{% endcomment %} +{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/protx.md" %} + + + +##### ProTx +{% include helpers/subhead-links.md %} + +{% assign summary_proTx="provides a set of commands to execute ProTx related actions." %} + +{% autocrossref %} + +*Added in Dash Core 0.13.0* + +The `protx` RPC {{summary_proTx}} + +{% endautocrossref %} + +###### ProTx Register + + +{% autocrossref %} + +The `protx register` RPC creates a ProRegTx referencing an existing collateral and and sends it to the network. + +*Parameter #1---collateral address* + +{% itemplate ntpd1 %} +- n: "`collateralHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The collateral transaction hash" +{% enditemplate %} + +*Parameter #2---collateral index* + +{% itemplate ntpd1 %} +- n: "`collateralIndex`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The collateral transaction output index" +{% enditemplate %} + +*Parameter #3---IP Address and port* + +{% itemplate ntpd1 %} +- n: "`ipAndPort`" + t: "string" + p: "Required
(exactly 1)" + d: "IP and port in the form 'IP:PORT'.
Must be unique on the network.
Can be set to '0', which will require a ProUpServTx afterwards." +{% enditemplate %} + +*Parameter #4---owner key address* + +{% itemplate ntpd1 %} +- n: "`ownerKeyAddr`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The owner key used for payee updates and proposal voting. The private key belonging to this address be known in your wallet. The address must be unused and must differ from the `collateralAddress`." +{% enditemplate %} + +*Parameter #5---operator public key* + +{% itemplate ntpd1 %} +- n: "`operatorPubKey`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: " The operator public key. The private key does not have to be known. It has to match the private key which is later used when operating the masternode." +{% enditemplate %} + +*Parameter #6---voting key address* + +{% itemplate ntpd1 %} +- n: "`votingKeyAddr`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The voting key address. The private key does not have to be known by your wallet. It has to match the private key which is later used when voting on proposals. If set to '0' or an empty string, `ownerAddr` will be used." +{% enditemplate %} + +*Parameter #7---operator reward* + +{% itemplate ntpd1 %} +- n: "`operatorReward`" + t: "number" + p: "Required
(exactly 1)" + d: "The fraction in % to share with the operator. If non-zero, `ipAndPort` must be zero as well.
The value must be between '0.00' and '100.00'." +{% enditemplate %} + +*Parameter #8---payout address* + +{% itemplate ntpd1 %} +- n: "`payoutAddress`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The Dash address to use for masternode reward payments. Must match `collateralAddress`." +{% enditemplate %} + +*Result---provider registration transaction hash* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "Provider registration transaction (ProRegTx) hash" +{% enditemplate %} + +*Example from Dash Core 0.13.0* + +{% highlight bash %} +dash-cli -testnet protx register\ + 8b2eab3413abb6e04d17d1defe2b71039ba6b6f72ea1e5dab29bb10e7b745948 1\ + 2.3.4.5:2345 yNLuVTXJbjbxgrQX5LSMi7hV19We8hT2d6\ + 88d719278eef605d9c19037366910b59bc28d437de4a8db4d76fda6d6985dbdf10404fb9bb5cd0e8c22f4a914a6c5566\ + yNLuVTXJbjbxgrQX5LSMi7hV19We8hT2d6 5 yjJJLkYDUN6X8gWjXbCoKEXoiLeKxxMMRt +{% endhighlight %} + +Result: +{% highlight bash %} +61e6d780178d353940c4cb9b3073ac0c50792bbcf0b15c1750d2028b71e34929 +{% endhighlight %} + +{% endautocrossref %} + +###### ProTx Fund-Register + + +{% autocrossref %} + +The `protx fund_register` RPC creates and funds a ProRegTx with the 1,000 DASH necessary for a masternode and then sends it to the network. + +*Parameter #1---collateral address* + +{% itemplate ntpd1 %} +- n: "`collateralAddress`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The Dash address to send the collateral to (must be a P2PKH address)" +{% enditemplate %} + +*Parameter #2---IP Address and port* + +{% itemplate ntpd1 %} +- n: "`ipAndPort`" + t: "string" + p: "Required
(exactly 1)" + d: "IP and port in the form 'IP:PORT'.
Must be unique on the network.
Can be set to '0', which will require a ProUpServTx afterwards." +{% enditemplate %} + +*Parameter #3---owner key address* + +{% itemplate ntpd1 %} +- n: "`ownerKeyAddr`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The owner key used for payee updates and proposal voting. The private key belonging to this address be known in your wallet. The address must be unused and must differ from the `collateralAddress`." +{% enditemplate %} + +*Parameter #4---operator public key* + +{% itemplate ntpd1 %} +- n: "`operatorPubKey`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: " The operator public key. The private key does not have to be known. It has to match the private key which is later used when operating the masternode." +{% enditemplate %} + +*Parameter #5---voting key address* + +{% itemplate ntpd1 %} +- n: "`votingKeyAddr`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The voting key address. The private key does not have to be known by your wallet. It has to match the private key which is later used when voting on proposals. If set to '0' or an empty string, `ownerAddr` will be used." +{% enditemplate %} + +*Parameter #6---operator reward* + +{% itemplate ntpd1 %} +- n: "`operatorReward`" + t: "number" + p: "Required
(exactly 1)" + d: "The fraction in % to share with the operator. If non-zero, `ipAndPort` must be zero as well.
The value must be between '0.00' and '100.00'." +{% enditemplate %} + +*Parameter #7---payout address* + +{% itemplate ntpd1 %} +- n: "`payoutAddress`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The Dash address to use for masternode reward payments. Must match `collateralAddress`." +{% enditemplate %} + +*Result---provider registration transaction hash* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "Provider registration transaction (ProRegTx) hash" +{% enditemplate %} + +*Example from Dash Core 0.13.0* + +{% highlight bash %} +dash-cli -testnet protx fund_register yakx4mMRptKhgfjedNzX5FGQq7kSSBF2e7\ + 3.4.5.6:3456 yX2cDS4kcJ4LK4uq9Hd4TG7kURV3sGLZrw\ + 0e02146e9c34cfbcb3f3037574a1abb35525e2ca0c3c6901dbf82ac591e30218d1711223b7ca956edf39f3d984d06d51\ + yX2cDS4kcJ4LK4uq9Hd4TG7kURV3sGLZrw 5 yakx4mMRptKhgfjedNzX5FGQq7kSSBF2e7 +{% endhighlight %} + +Result: +{% highlight bash %} +ba1b3330e16a0876b7a186e7ceb689f03ec646e611e91d7139de021bbf13afdd +{% endhighlight %} + +{% endautocrossref %} + +###### ProTx List + + +{% autocrossref %} + +The `protx list` RPC returns a list of provider transactions. + +Lists all ProTxs in your wallet or on-chain, depending on the given type. If +`type` is not specified, it defaults to `wallet`. All types have the optional +argument `detailed` which if set to `true` will result in a detailed list being +returned. If set to `false`, only the hashes of the ProTx will be returned. + +*Parameter #1---type* + +{% itemplate ntpd1 %} +- n: "`type`" + t: "string" + p: "Optional
(0 or 1)" + d: "The type of ProTxs to list:
`registered` - all ProTxs registered at height
`valid` - all active/valid ProTxs at height
`wallet` - all ProTxs found in the current wallet

Height defaults to current chain-tip if one is not provided" +{% enditemplate %} + +**List Type - `registered` or `valid`** + +*Parameter #2---height* + +{% itemplate ntpd1 %} +- n: "`height`" + t: "bool" + p: "Optional
(0 or 1)" + d: "List ProTxs from this height." +{% enditemplate %} + +*Parameter #3---detailed* + +{% itemplate ntpd1 %} +- n: "`detailed`" + t: "bool" + p: "Optional
(0 or 1)" + d: "If set to `false` (default), only ProTx hashes are returned. If set to `true`, a detailed list of ProTx details is returned." +{% enditemplate %} + + +**List Type - `wallet`** + +*Parameter #2---detailed* + +{% itemplate ntpd1 %} +- n: "`detailed`" + t: "bool" + p: "Optional
(0 or 1)" + d: "If set to `false` (default), only ProTx hashes are returned. If set to `true`, a detailed list of ProTx details is returned." +{% enditemplate %} + + +*Result (if `detailed` was `false`)---provider registration transaction hash* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "string (hex): array" + p: "Required
(exactly 1)" + d: "Array of provider transaction (ProTx) hashes" +{% enditemplate %} + +*Result (if `detailed` was `true`)---JSON provider registration transaction details* + +{% assign DEPTH="→" %} +{% include helpers/vars.md %} + +{% itemplate ntpd1 %} +- n: "`result`" + t: "array" + p: "Required
(exactly 1)" + d: "An array of objects each containing a provider transaction, or JSON `null` if an error occurred" + + {{INCLUDE_PROTX}} + +{% enditemplate %} + +*Example from Dash Core 0.13.0* + +{% highlight bash %} +dash-cli -testnet protx list +{% endhighlight %} + +Result: +{% highlight json %} +[ + "2b4a07a9b04dc42a0c19b85edb60954a27acaadfe3ee21d0171385778f34e1c2", + "61e6d780178d353940c4cb9b3073ac0c50792bbcf0b15c1750d2028b71e34929", + "ca193751f3cbed2aa4f1b33b0acc48c7ed8b9a3679858d69cf23157a4f545176", + "ba1b3330e16a0876b7a186e7ceb689f03ec646e611e91d7139de021bbf13afdd" +] +{% endhighlight %} + + +List of ProTxs which are active/valid at the given chain height. + +{% highlight bash %} +dash-cli -testnet protx list valid 700 +{% endhighlight %} + +Result: +{% highlight json %} +[ + "2b4a07a9b04dc42a0c19b85edb60954a27acaadfe3ee21d0171385778f34e1c2" +] +{% endhighlight %} + +Detailed list of ProTxs which are active/valid at the given chain height. + +{% highlight bash %} +dash-cli -testnet protx list valid 700 true +{% endhighlight %} + +Result: +{% highlight json %} +[ + { + "proTxHash": "2b4a07a9b04dc42a0c19b85edb60954a27acaadfe3ee21d0171385778f34e1c2", + "collateralHash": "8d23d08ee6e2e0577550c90afde9bc63745f734605724ba9908e0220c48dec04", + "collateralIndex": 1, + "operatorReward": 5, + "state": { + "registeredHeight": 683, + "lastPaidHeight": 700, + "PoSePenalty": 0, + "PoSeRevivedHeight": -1, + "PoSeBanHeight": -1, + "revocationReason": 0, + "keyIDOwner": "29705bab955f252f876cbe47958b20feaa2b3e99", + "pubKeyOperator": "0bfd3d519f16de1669e977c316bd53fc902f83a75b6008dff3a7037ab4d3edaa39eadb13f5d6d1f192673f9ab86f17a2", + "keyIDVoting": "29705bab955f252f876cbe47958b20feaa2b3e99", + "addr": "1.2.3.4:1234", + "payoutAddress": "ybeK49S8ineDqNV698GZdMpdiHaYsZUJ2g" + }, + "confirmations": -1, + "wallet": { + "hasOwnerKey": true, + "hasOperatorKey": false, + "hasVotingKey": true, + "ownsCollateral": true, + "ownsPayeeScript": true, + "ownsOperatorRewardScript": false + } + } +] +{% endhighlight %} + +{% endautocrossref %} + +###### ProTx Info + + +{% autocrossref %} + +The `protx info` RPC returns detailed information about a deterministic masternode. + +{% assign DEPTH="→" %} +{% include helpers/vars.md %} + +{% itemplate ntpd1 %} +- n: "`result`" + t: "object" + p: "Required
(exactly 1)" + d: "An JSON object containing a provider transaction, or JSON `null` if an error occurred" + + {{INCLUDE_PROTX}} +{% enditemplate %} + +*Example from Dash Core 0.13.0* + +{% highlight bash %} +dash-cli -testnet protx info\ + 2b4a07a9b04dc42a0c19b85edb60954a27acaadfe3ee21d0171385778f34e1c2 +{% endhighlight %} + +Result: +{% highlight json %} +{ + "proTxHash": "2b4a07a9b04dc42a0c19b85edb60954a27acaadfe3ee21d0171385778f34e1c2", + "collateralHash": "8d23d08ee6e2e0577550c90afde9bc63745f734605724ba9908e0220c48dec04", + "collateralIndex": 1, + "operatorReward": 5, + "state": { + "registeredHeight": 683, + "lastPaidHeight": 785, + "PoSePenalty": 0, + "PoSeRevivedHeight": -1, + "PoSeBanHeight": -1, + "revocationReason": 0, + "keyIDOwner": "29705bab955f252f876cbe47958b20feaa2b3e99", + "pubKeyOperator": "0bfd3d519f16de1669e977c316bd53fc902f83a75b6008dff3a7037ab4d3edaa39eadb13f5d6d1f192673f9ab86f17a2", + "keyIDVoting": "29705bab955f252f876cbe47958b20feaa2b3e99", + "addr": "1.2.3.4:1234", + "payoutAddress": "ybeK49S8ineDqNV698GZdMpdiHaYsZUJ2g" + }, + "confirmations": 192, + "wallet": { + "hasOwnerKey": true, + "hasOperatorKey": false, + "hasVotingKey": true, + "ownsCollateral": true, + "ownsPayeeScript": true, + "ownsOperatorRewardScript": false + } +} +{% endhighlight %} + +{% endautocrossref %} + +###### ProTx Update Service + + +{% autocrossref %} + +The `protx update_service` RPC creates and sends a ProUpServTx to the network. + +*Parameter #1---initial provider registration transaction hash* + +{% itemplate ntpd1 %} +- n: "`proTxHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the provider transaction as hex in RPC byte order" +{% enditemplate %} + +*Parameter #2---IP Address and port* + +{% itemplate ntpd1 %} +- n: "`ipAndPort`" + t: "string" + p: "Required
(exactly 1)" + d: "IP and port in the form 'IP:PORT'.
Must be unique on the network." +{% enditemplate %} + +*Parameter #3---operator public key* + +{% itemplate ntpd1 %} +- n: "`operatorPubKey`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: " The operator public key. The private key does not have to be known. It has to match the private key which is later used when operating the masternode." +{% enditemplate %} + +*Parameter #4---operator payout address* + +{% itemplate ntpd1 %} +- n: "`operatorPayoutAddress`" + t: "string (hex)" + p: "Optional
(0 or 1)" + d: "The Dash address used for operator reward payments. Only allowed when the ProRegTx had a non-zero `operatorReward` value." +{% enditemplate %} + +*Result---provider update service transaction hash* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "Provider update service transaction (ProUpServTx) hash" +{% enditemplate %} + +*Example from Dash Core 0.13.0* + +{% highlight bash %} +dash-cli -testnet protx update_service\ + ba1b3330e16a0876b7a186e7ceb689f03ec646e611e91d7139de021bbf13afdd\ + "4.3.2.1:4321"\ + 4da7e1ea30fb9e55c73ad23df0b9d3d34342acb24facf4b19420e1a26ae272d1 +{% endhighlight %} + +Result: +{% highlight bash %} +5b6cfa1bdd3c8b7e0b9550b9c4e809381f81a410bc7f241d3879dd736fd51270 +{% endhighlight %} + +{% endautocrossref %} + +###### ProTx Update Registrar + + +{% autocrossref %} + +The `protx update_registrar` RPC creates and sends a ProUpRegTx to the network. + +*Parameter #1---initial provider registration transaction hash* + +{% itemplate ntpd1 %} +- n: "`proTxHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the provider transaction as hex in RPC byte order" +{% enditemplate %} + +*Parameter #2---operator public key* + +{% itemplate ntpd1 %} +- n: "`operatorPubKey`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: " The operator public key. The private key does not have to be known. It has to match the private key which is later used when operating the masternode." +{% enditemplate %} + +*Parameter #3---voting key address* + +{% itemplate ntpd1 %} +- n: "`votingKeyAddr`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The voting key address. The private key does not have to be known by your wallet. It has to match the private key which is later used when voting on proposals. If set to '0' or an empty string, the last on-chain voting key of the masternode will be used." +{% enditemplate %} + +*Parameter #4---operator payout address* + +{% itemplate ntpd1 %} +- n: "`operatorPayoutAddress`" + t: "string (hex)" + p: "Optional
(0 or 1)" + d: "The Dash address to use for masternode reward payments. Must match `collateralAddress` of initial ProRegTx. If set to '0' or an empty string, the last on-chain payout address of the masternode will be used." +{% enditemplate %} + +*Result---provider update registrar transaction hash* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "Provider update registrar transaction (ProUpRegTx) hash" +{% enditemplate %} + +*Example from Dash Core 0.13.0* + +{% highlight bash %} +dash-cli -testnet protx update_registrar\ + "ba1b3330e16a0876b7a186e7ceb689f03ec646e611e91d7139de021bbf13afdd"\ + "0e02146e9c34cfbcb3f3037574a1abb35525e2ca0c3c6901dbf82ac591e30218d1711223b7ca956edf39f3d984d06d51"\ + "yX2cDS4kcJ4LK4uq9Hd4TG7kURV3sGLZrw" "yakx4mMRptKhgfjedNzX5FGQq7kSSBF2e7" +{% endhighlight %} + +Result: +{% highlight bash %} +702390ef06b10c174841ad7b863df23c166c27815e3be2438e2fee6f87882b91 +{% endhighlight %} + +{% endautocrossref %} + +###### ProTx Revoke + + +{% autocrossref %} + +The `protx revoke` RPC creates and sends a ProUpRevTx to the network. + +*Parameter #1---initial provider registration transaction hash* + +{% itemplate ntpd1 %} +- n: "`proTxHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the provider transaction as hex in RPC byte order" +{% enditemplate %} + +*Parameter #2---operator private key* + +{% itemplate ntpd1 %} +- n: "`operatorPubKey`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: " The operator private key belonging to the registered operator public key." +{% enditemplate %} + +*Parameter #3---reason* + +{% itemplate ntpd1 %} +- n: "`reason`" + t: "number" + p: "Required
(exactly 1)" + d: "The reason for revocation." +{% enditemplate %} + +*Result---provider update revoke transaction hash* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "Provider update revoke transaction (ProUpRevTx) hash" +{% enditemplate %} + +*Example from Dash Core 0.13.0* + +{% highlight bash %} +dash-cli -testnet protx revoke\ + "ba1b3330e16a0876b7a186e7ceb689f03ec646e611e91d7139de021bbf13afdd"\ + "4da7e1ea30fb9e55c73ad23df0b9d3d34342acb24facf4b19420e1a26ae272d1" +{% endhighlight %} + +Result: +{% highlight bash %} +2aad36dd2ab254bee06b0b5dad51e7603691b72058d5806fd94e1d2d19a7c209 +{% endhighlight %} + +{% endautocrossref %} + +###### ProTx Diff + + +{% autocrossref %} + +The `protx diff` RPC calculates a diff and a proof between two masternode list. + +*Parameter #1---start block height* + +{% itemplate ntpd1 %} +- n: "`baseBlock`" + t: "number (int)" + p: "Required
(Exactly 1)" + d: "" +{% enditemplate %} + +*Parameter #2---end block height* + +{% itemplate ntpd1 %} +- n: "`block`" + t: "bool" + p: "Required
(Exactly 1)" + d: "" +{% enditemplate %} + +*Result---JSON provider registration transaction details* + +{% assign DEPTH="→" %} +{% include helpers/vars.md %} + +{% itemplate ntpd1 %} +- n: "`result`" + t: "array" + p: "Required
(exactly 1)" + d: "An array of objects each containing a provider transaction, or JSON `null` if an error occurred" + +- n: "→
`baseBlockHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the base block as hex in RPC byte order" + +- n: "→
`blockHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the ending block as hex in RPC byte order" + +- n: "→
`cbTxMerkleTree`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The coinbase transaction merkle tree" + +- n: "→
`cbTx`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The coinbase transaction" + +- n: "→
`deletedMNs`" + t: "array" + p: "Required
(exactly 1)" + d: "An array of deleted masternode hashes" + +- n: "→
`mnlist`" + t: "array" + p: "Required
(exactly 1)" + d: "An array of masternode details" + +- n: "→ →
`proRegTxHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the initial provider registration transaction as hex in RPC byte order" + +- n: "→ →
`pubKeyOperator`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The operator public key" + +- n: "→ →
`keyIDVoting`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The voting key" + +- n: "→ →
`isValid`" + t: "bool" + p: "Required
(exactly 1)" + d: "Set to `true` if masternode is valid" + +- n: "→
`merkleRootMNList`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "Merkle root of the masternode list" +{% enditemplate %} + +*Example from Dash Core 0.13.0* + +{% highlight bash %} +dash-cli -testnet protx diff 600 700 +{% endhighlight %} + +Result: +{% highlight json %} +{ + "baseBlockHash": "0000a691fd23e6e51368b9204ae9ae67fecdda2fd51ab29fde964e335c84f962", + "blockHash": "0000b8291620f592a16eea5bbb937c992217d3ff676aa08a5c4e8d4c1d353c61", + "cbTxMerkleTree": "0100000001351a1d8f0bb20542ce1a83729cdf0048e2deb777e641f7db89b94b0c76544e980101", + "cbTx": "03000500010000000000000000000000000000000000000000000000000000000000000000ffffffff0502bc020101ffffffff0100743ba40b000000232103ad831efe17ae73c016883085313aaa80365218cc029152edc2886c162048bd0bac00000000260100bc02000043ef07f248e6d6beb10c203a17f434201edba8b85d46699728b7a8e048c339fc", + "deletedMNs": [ + ], + "mnList": [ + { + "proRegTxHash": "2b4a07a9b04dc42a0c19b85edb60954a27acaadfe3ee21d0171385778f34e1c2", + "service": "1.2.3.4:1234", + "pubKeyOperator": "0bfd3d519f16de1669e977c316bd53fc902f83a75b6008dff3a7037ab4d3edaa39eadb13f5d6d1f192673f9ab86f17a2", + "keyIDVoting": "29705bab955f252f876cbe47958b20feaa2b3e99", + "isValid": true + } + ], + "merkleRootMNList": "fc39c348e0a8b7289769465db8a8db1e2034f4173a200cb1bed6e648f207ef43" +} +{% endhighlight %} + +{% endautocrossref %} + +{% autocrossref %} + +*See also: none* + +{% endautocrossref %} diff --git a/_includes/helpers/summaries.md b/_includes/helpers/summaries.md index 9b4214f4..08045563 100644 --- a/_includes/helpers/summaries.md +++ b/_includes/helpers/summaries.md @@ -109,6 +109,7 @@ This file is licensed under the terms of its source texts{%endcomment%} {% assign summary_preciousBlock="treats a block as if it were received before others with the same work." %} {% assign summary_prioritiseTransaction="adds virtual priority or fee to a transaction, allowing it to be accepted into blocks mined by this node (or miners which use this node) with a lower priority or fee. (It can also remove virtual priority or fee, requiring the transaction have a higher priority or fee to be accepted into a locally-mined block.)" %} {% assign summary_privateSend="controls the mixing process." %} +{% assign summary_proTx="provides a set of commands to execute ProTx related actions." %} {% assign summary_pruneBlockChain="prunes the blockchain up to a specified height or timestamp." %} {% assign summary_removePrunedFunds="deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds." %} {% assign summary_restGetBlock-noTxDetails="gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions [GET block][rest get block] returns." %} diff --git a/_includes/helpers/vars.md b/_includes/helpers/vars.md index 60624cbf..1a81ad22 100644 --- a/_includes/helpers/vars.md +++ b/_includes/helpers/vars.md @@ -438,6 +438,133 @@ NOT IN DASH {% enditemplate %} {% endcapture %} +{% capture INCLUDE_PROTX %} +- n: "{{DEPTH}}
Provider Transaction" + t: "object/null" + p: "Required
(exactly 1)" + d: "An object containing a provider transaction" + +- n: "{{DEPTH}} →
`proTxHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the provider transaction as hex in RPC byte order" + +- n: "{{DEPTH}} →
`collateralHash`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the collateral transaction as hex in RPC byte order" + +- n: "{{DEPTH}} →
`collateralIndex`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The collateral index" + +- n: "{{DEPTH}} →
`operatorReward`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The operator reward %" + +- n: "{{DEPTH}} →
`state`" + t: "object/null" + p: "Required
(exactly 1)" + d: "An object containing a provider transaction state" + +- n: "{{DEPTH}} → →
`registeredHeight`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The height where the masternode was registered" + +- n: "{{DEPTH}} → →
`lastPaidHeight`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The height where the masternode was last paid" + +- n: "{{DEPTH}} → →
`PoSePenalty`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The masternode's proof of service penalty" + +- n: "{{DEPTH}} → →
`PoSeRevivedHeight`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The height where the masternode recovered from a proof of service ban" + +- n: "{{DEPTH}} → →
`PoSeBanHeight`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The height where the masternode was banned for proof of service violations" + +- n: "{{DEPTH}} → →
`revocationReason`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The reason for a ProUpRegTx revocation" + +- n: "{{DEPTH}} → →
`keyIDOwner`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The owner key" + +- n: "{{DEPTH}} → →
`pubKeyOperator`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The operator public key" + +- n: "{{DEPTH}} → →
`keyIDVoting`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The voting key" + +- n: "{{DEPTH}} → →
`addr`" + t: "string" + p: "Required
(exactly 1)" + d: "The masternode's IP:Port" + +- n: "{{DEPTH}} → →
`payoutAddress`" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The payout address" + +- n: "{{DEPTH}} →
`confirmations`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The number of confirmations this ProTx has" + +- n: "{{DEPTH}} →
`wallet`" + t: "object/null" + p: "Required
(exactly 1)" + d: "An object containing a wallet details related to this ProTx" + +- n: "{{DEPTH}} → →
`hasOwnerKey`" + t: "bool" + p: "Required
(exactly 1)" + d: "The owner key is present in this wallet" + +- n: "{{DEPTH}} → →
`hasOperatorKey`" + t: "bool" + p: "Required
(exactly 1)" + d: "The operator key is present in this wallet" + +- n: "{{DEPTH}} → →
`hasVotingKey`" + t: "bool" + p: "Required
(exactly 1)" + d: "The voting key is present in this wallet" + +- n: "{{DEPTH}} → →
`ownsCollateral`" + t: "bool" + p: "Required
(exactly 1)" + d: "The collateral is owned by this wallet" + +- n: "{{DEPTH}} → →
`ownsPayeeScript`" + t: "bool" + p: "Required
(exactly 1)" + d: "The payee script is owned by this wallet" + +- n: "{{DEPTH}} → →
`ownsOperatorRewardScript`" + t: "bool" + p: "Required
(exactly 1)" + d: "The operator reward script is owned by this wallet" +{% endcapture %} + {% assign WARNING="![Warning icon](/img/icons/icon_warning.svg) **Warning:**" %} {% assign WARNING_ICON="![Warning icon](/img/icons/icon_warning.svg)" %} diff --git a/_includes/layout/base/rpc-table.html b/_includes/layout/base/rpc-table.html index 91681e56..2537d83a 100644 --- a/_includes/layout/base/rpc-table.html +++ b/_includes/layout/base/rpc-table.html @@ -301,6 +301,12 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header:: Y Added in 0.13.0 + + Evolution + ProTx + Y + Added in 0.13.0 + Generating Generate diff --git a/_includes/references.md b/_includes/references.md index f8f7c89b..fd28e792 100644 --- a/_includes/references.md +++ b/_includes/references.md @@ -166,6 +166,7 @@ http://opensource.org/licenses/MIT. [rpc mnsync]: /en/developer-reference#mnsync [rpc move]: /en/developer-reference#move [rpc ping]: /en/developer-reference#ping-rpc +[rpc protx]: /en/developer-reference#protx [rpc preciousblock]: /en/developer-reference#preciousblock [rpc pruneblockchain]: /en/developer-reference#pruneblockchain [rpc prioritisetransaction]: /en/developer-reference#prioritisetransaction @@ -451,6 +452,10 @@ http://opensource.org/licenses/MIT. [Piotr Piasecki's testnet faucet]: https://tpfaucet.appspot.com/ [prime symbol]: https://en.wikipedia.org/wiki/Prime_%28symbol%29 [protobuf]: https://developers.google.com/protocol-buffers/ +[proregtx special tx]: /en/developer-reference#proregtx +[proupregtx special tx]: /en/developer-reference#proupregtx +[prouprevtx special tx]: /en/developer-reference#prouprevtx +[proupservtx special tx]: /en/developer-reference#proupservtx [python-bitcoinlib]: https://github.com/petertodd/python-bitcoinlib [python-blkmaker]: https://gitorious.org/bitcoin/python-blkmaker [Satoshi Nakamoto]: https://en.bitcoin.it/wiki/Satoshi_Nakamoto diff --git a/en/developer-reference.md b/en/developer-reference.md index 49c88ce2..4c4d963e 100644 --- a/en/developer-reference.md +++ b/en/developer-reference.md @@ -282,6 +282,8 @@ untrusted source. {% include devdoc/dash-core/rpcs/rpcs/ping.md %} +{% include devdoc/dash-core/rpcs/rpcs/protx.md %} + {% include devdoc/dash-core/rpcs/rpcs/preciousblock.md %} {% include devdoc/dash-core/rpcs/rpcs/privatesend.md %}