From 5f6008d276ff3aed49b1c0dc7deffe2931a7d5d3 Mon Sep 17 00:00:00 2001 From: thephez Date: Tue, 20 Feb 2018 16:33:30 -0500 Subject: [PATCH] content - Mempool related RPC updates - Add getmempoolancestors, getmempooldescendants, and getmempoolentry RPCs - Update Ref and Table --- .../devdoc/dash-core/rpcs/quick-reference.md | 6 +- .../rpcs/rpcs/getmempoolancestors.md | 71 +++++++----------- .../rpcs/rpcs/getmempooldescendants.md | 73 +++++++------------ .../dash-core/rpcs/rpcs/getmempoolentry.md | 52 ++++++------- _includes/layout/base/rpc-table.html | 12 +-- 5 files changed, 84 insertions(+), 130 deletions(-) diff --git a/_includes/devdoc/dash-core/rpcs/quick-reference.md b/_includes/devdoc/dash-core/rpcs/quick-reference.md index eb8c5ef3..48fcb2e2 100644 --- a/_includes/devdoc/dash-core/rpcs/quick-reference.md +++ b/_includes/devdoc/dash-core/rpcs/quick-reference.md @@ -106,6 +106,9 @@ These RPCs are all Dash-specific and not found in Bitcoin Core * [GetBlockHeaders][rpc getblockheaders]: {{summary_getBlockHeaders}} {{DASH_NEW0_12_1}} * [GetChainTips][rpc getchaintips]: {{summary_getChainTips}} {{DASH_UPDATED0_12_1}} * [GetDifficulty][rpc getdifficulty]: {{summary_getDifficulty}} +* [GetMemPoolAncestors][rpc getmempoolancestors]: {{summary_getMemPoolAncestors}} {{DASH_NEW0_12_3}} {{NEW0_13_0}} +* [GetMemPoolDescendants][rpc getmempooldescendants]: {{summary_getMemPoolDescendants}} {{DASH_NEW0_12_3}} {{NEW0_13_0}} +* [GetMemPoolEntry][rpc getmempoolentry]: {{summary_getMemPoolEntry}} {{DASH_NEW0_12_3}} {{NEW0_13_0}} * [GetMemPoolInfo][rpc getmempoolinfo]: {{summary_getMemPoolInfo}} {{UPDATED0_12_0}} * [GetRawMemPool][rpc getrawmempool]: {{summary_getRawMemPool}} {{UPDATED0_13_0}} * [GetSpentInfo][rpc getspentinfo]: {{summary_getSpentInfo}} {{DASH_NEW0_12_1}} @@ -121,9 +124,6 @@ These RPCs are all Dash-specific and not found in Bitcoin Core {% autocrossref %} -* {{DASH_NOT_IMPLEMENTED}} [GetMemPoolAncestors][rpc getmempoolancestors]: {{summary_getMemPoolAncestors}} {{NEW0_13_0}} -* {{DASH_NOT_IMPLEMENTED}} [GetMemPoolDescendants][rpc getmempooldescendants]: {{summary_getMemPoolDescendants}} {{NEW0_13_0}} -* {{DASH_NOT_IMPLEMENTED}} [GetMemPoolEntry][rpc getmempoolentry]: {{summary_getMemPoolEntry}} {{NEW0_13_0}} * {{DASH_NOT_IMPLEMENTED}} [PreciousBlock][rpc preciousblock]: {{summary_preciousBlock}} {{NEW0_14_0}} * {{DASH_NOT_IMPLEMENTED}} [PruneBlockChain][rpc pruneblockchain]: {{summary_pruneBlockChain}} {{NEW0_14_0}} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/getmempoolancestors.md b/_includes/devdoc/dash-core/rpcs/rpcs/getmempoolancestors.md index 2a4fd641..84099efd 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/getmempoolancestors.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/getmempoolancestors.md @@ -9,22 +9,21 @@ http://opensource.org/licenses/MIT. {% assign summary_getMemPoolAncestors="returns all in-mempool ancestors for a transaction in the mempool." %} + + {% autocrossref %} -*Added in Bitcoin Core 0.13.0* +*Added in Dash Core 0.12.3* -**_Not implemented in Dash Core (as of 0.12.2)_** - -{% comment %} The `getmempoolancestors` RPC {{summary_getMemPoolAncestors}} *Parameter #1---a transaction identifier (TXID)* {% itemplate ntpd1 %} -- n: "Address" - t: "string" +- n: "TXID" + t: "string (hex)" p: "Required
(exactly 1)" - d: "The address whose transactions should be tallied" + d: "The TXID of a transaction in the memory pool, encoded as hex in RPC byte order" {% enditemplate %} @@ -143,66 +142,48 @@ The `getmempoolancestors` RPC {{summary_getMemPoolAncestors}} {% enditemplate %} -*Examples from Bitcoin Core 0.13.1* +*Examples from Dash Core 0.12.3* The default (`false`): {% highlight bash %} -bitcoin-cli getmempoolancestors 52273e0ce6cf3452932cfbc1c517c0ce\ -1af1d255fda67a6e3bd63ba1d908c8c2 +dash-cli getmempoolancestors 49a512c3d567effd4f605a6023df8b4b523\ +ac0ae7bccbaeed1c8a7db1e05e15a {% endhighlight %} Result: {% highlight json %} [ - "b104586f229e330caf42c475fd52684e9eb5e2d02f0fcd216d9554c5347b0873", - "094f7dcbc7494510d4daeceb2941ed73b1bd011bf527f6c3b7c897fee85c11d4" + "d1eefe8a006e2c21b55bc97c1f5b10000d63aa6a777bb11abc0daf62e4296660" ] {% endhighlight %} Verbose output (`true`): {% highlight bash %} -bitcoin-cli getmempoolancestors 52273e0ce6cf3452932cfbc1c517c0ce\ -1af1d255fda67a6e3bd63ba1d908c8c2 true +dash-cli getmempoolancestors 49a512c3d567effd4f605a6023df8b4b523\ +ac0ae7bccbaeed1c8a7db1e05e15a true {% endhighlight %} Result: {% highlight json %} { - "b104586f229e330caf42c475fd52684e9eb5e2d02f0fcd216d9554c5347b0873": { - "size": 485, - "fee": 0.00009700, - "modifiedfee": 0.00009700, - "time": 1479423635, - "height": 439431, - "startingpriority": 15327081.81818182, - "currentpriority": 21536936.36363636, - "descendantcount": 1, - "descendantsize": 485, - "descendantfees": 9700, + "d1eefe8a006e2c21b55bc97c1f5b10000d63aa6a777bb11abc0daf62e4296660": { + "size": 963, + "fee": 0.00000966, + "modifiedfee": 0.00000966, + "time": 1519160516, + "height": 79045, + "startingpriority": 4514051697.115385, + "currentpriority": 4520474899.74359, + "descendantcount": 2, + "descendantsize": 1189, + "descendantfees": 1192, "ancestorcount": 1, - "ancestorsize": 485, - "ancestorfees": 9700, - "depends": [ - ] - }, - "094f7dcbc7494510d4daeceb2941ed73b1bd011bf527f6c3b7c897fee85c11d4": { - "size": 554, - "fee": 0.00005540, - "modifiedfee": 0.00005540, - "time": 1479423327, - "height": 439430, - "startingpriority": 85074.91071428571, - "currentpriority": 3497174.4375, - "descendantcount": 1, - "descendantsize": 554, - "descendantfees": 5540, - "ancestorcount": 1, - "ancestorsize": 554, - "ancestorfees": 5540, + "ancestorsize": 963, + "ancestorfees": 966, "depends": [ ] } @@ -214,6 +195,4 @@ Result: * [GetMemPoolDescendants][rpc getmempooldescendants]: {{summary_getMemPoolDescendants}} * [GetRawMemPool][rpc getrawmempool]: {{summary_getRawMemPool}} -{% endcomment %} - {% endautocrossref %} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/getmempooldescendants.md b/_includes/devdoc/dash-core/rpcs/rpcs/getmempooldescendants.md index d430b6e0..c2d8c671 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/getmempooldescendants.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/getmempooldescendants.md @@ -9,23 +9,21 @@ http://opensource.org/licenses/MIT. {% assign summary_getMemPoolDescendants="returns all in-mempool descendants for a transaction in the mempool." %} + + {% autocrossref %} -*Added in Bitcoin Core 0.13.0* - -**_Not implemented in Dash Core (as of 0.12.2)_** - -{% comment %} +*Added in Dash Core 0.12.3* The `getmempooldescendants` RPC {{summary_getMemPoolDescendants}} *Parameter #1---a transaction identifier (TXID)* {% itemplate ntpd1 %} -- n: "Address" - t: "string" +- n: "TXID" + t: "string (hex)" p: "Required
(exactly 1)" - d: "The address whose transactions should be tallied" + d: "The TXID of a transaction in the memory pool, encoded as hex in RPC byte order" {% enditemplate %} @@ -144,67 +142,50 @@ The `getmempooldescendants` RPC {{summary_getMemPoolDescendants}} {% enditemplate %} -*Examples from Bitcoin Core 0.13.1* +*Examples from Dash Core 0.12.3* The default (`false`): {% highlight bash %} -bitcoin-cli getmempooldescendants 52273e0ce6cf3452932cfbc1c517c0\ -ce1af1d255fda67a6e3bd63ba1d908c8c2 +dash-cli getmempooldescendants 49a512c3d567effd4f605a6023df8b4b5\ +23ac0ae7bccbaeed1c8a7db1e05e15a {% endhighlight %} Result: {% highlight json %} [ - "b104586f229e330caf42c475fd52684e9eb5e2d02f0fcd216d9554c5347b0873", - "094f7dcbc7494510d4daeceb2941ed73b1bd011bf527f6c3b7c897fee85c11d4" + "49a512c3d567effd4f605a6023df8b4b523ac0ae7bccbaeed1c8a7db1e05e15a" ] {% endhighlight %} Verbose output (`true`): {% highlight bash %} -bitcoin-cli getmempooldescendants 52273e0ce6cf3452932cfbc1c517c0\ -ce1af1d255fda67a6e3bd63ba1d908c8c2 true +dash-cli getmempooldescendants 49a512c3d567effd4f605a6023df8b4b5\ +23ac0ae7bccbaeed1c8a7db1e05e15a true {% endhighlight %} Result: {% highlight json %} { - "b104586f229e330caf42c475fd52684e9eb5e2d02f0fcd216d9554c5347b0873": { - "size": 485, - "fee": 0.00009700, - "modifiedfee": 0.00009700, - "time": 1479423635, - "height": 439431, - "startingpriority": 15327081.81818182, - "currentpriority": 21536936.36363636, + "49a512c3d567effd4f605a6023df8b4b523ac0ae7bccbaeed1c8a7db1e05e15a": { + "size": 226, + "fee": 0.00000226, + "modifiedfee": 0.00000226, + "time": 1519160551, + "height": 79046, + "startingpriority": 0, + "currentpriority": 0, "descendantcount": 1, - "descendantsize": 485, - "descendantfees": 9700, - "ancestorcount": 1, - "ancestorsize": 485, - "ancestorfees": 9700, - "depends": [ - ] - }, - "094f7dcbc7494510d4daeceb2941ed73b1bd011bf527f6c3b7c897fee85c11d4": { - "size": 554, - "fee": 0.00005540, - "modifiedfee": 0.00005540, - "time": 1479423327, - "height": 439430, - "startingpriority": 85074.91071428571, - "currentpriority": 3497174.4375, - "descendantcount": 1, - "descendantsize": 554, - "descendantfees": 5540, - "ancestorcount": 1, - "ancestorsize": 554, - "ancestorfees": 5540, + "descendantsize": 226, + "descendantfees": 226, + "ancestorcount": 2, + "ancestorsize": 1189, + "ancestorfees": 1192, "depends": [ + "d1eefe8a006e2c21b55bc97c1f5b10000d63aa6a777bb11abc0daf62e4296660" ] } } @@ -215,6 +196,4 @@ Result: * [GetMemPoolAncestors][rpc getmempoolancestors]: {{summary_getMemPoolAncestors}} * [GetRawMemPool][rpc getrawmempool]: {{summary_getRawMemPool}} -{% endcomment %} - {% endautocrossref %} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/getmempoolentry.md b/_includes/devdoc/dash-core/rpcs/rpcs/getmempoolentry.md index b62b7679..50ed6d5f 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/getmempoolentry.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/getmempoolentry.md @@ -9,23 +9,21 @@ http://opensource.org/licenses/MIT. {% assign summary_getMemPoolEntry="returns mempool data for given transaction (must be in mempool)." %} + + {% autocrossref %} -*Added in Bitcoin Core 0.13.0* - -**_Not implemented in Dash Core (as of 0.12.2)_** - -{% comment %} +*Added in Dash Core 0.12.3* The `getmempoolentry` RPC {{summary_getMemPoolEntry}} *Parameter #1---a transaction identifier (TXID)* {% itemplate ntpd1 %} -- n: "Address" - t: "string" +- n: "TXID" + t: "string (hex)" p: "Required
(exactly 1)" - d: "The address whose transactions should be tallied" + d: "The TXID of a transaction in the memory pool, encoded as hex in RPC byte order" {% enditemplate %} @@ -114,32 +112,32 @@ The `getmempoolentry` RPC {{summary_getMemPoolEntry}} {% enditemplate %} -*Examples from Bitcoin Core 0.13.1* +*Examples from Dash Core 0.12.3* {% highlight bash %} -bitcoin-cli getmempoolentry 52273e0ce6cf3452932cfbc1c517c0ce1af1\ -d255fda67a6e3bd63ba1d908c8c2 +dash-cli getmempoolentry d1eefe8a006e2c21b55bc97c1f5b10000d63aa6\ +a777bb11abc0daf62e4296660 {% endhighlight %} Result: {% highlight json %} { - "size": 485, - "fee": 0.00009700, - "modifiedfee": 0.00009700, - "time": 1479423635, - "height": 439431, - "startingpriority": 15327081.81818182, - "currentpriority": 21536936.36363636, - "descendantcount": 1, - "descendantsize": 485, - "descendantfees": 9700, - "ancestorcount": 1, - "ancestorsize": 485, - "ancestorfees": 9700, - "depends": [ - ] + "size": 226, + "fee": 0.00000226, + "modifiedfee": 0.00000226, + "time": 1519159538, + "height": 79036, + "startingpriority": 0, + "currentpriority": 0, + "descendantcount": 2, + "descendantsize": 452, + "descendantfees": 452, + "ancestorcount": 1, + "ancestorsize": 226, + "ancestorfees": 226, + "depends": [ + ] } {% endhighlight %} @@ -149,6 +147,4 @@ Result: * [GetMemPoolDescendants][rpc getmempooldescendants]: {{summary_getMemPoolDescendants}} * [GetRawMemPool][rpc getrawmempool]: {{summary_getRawMemPool}} -{% endcomment %} - {% endautocrossref %} diff --git a/_includes/layout/base/rpc-table.html b/_includes/layout/base/rpc-table.html index b38b572e..3ba59c11 100644 --- a/_includes/layout/base/rpc-table.html +++ b/_includes/layout/base/rpc-table.html @@ -124,20 +124,20 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header:: Blockchain GetMemPoolAncestors - N - N/A + Y + 0.12.3.0+ Blockchain GetMemPoolDescendants - N - N/A + Y + 0.12.3.0+ Blockchain GetMemPoolEntry - N - N/A + Y + 0.12.3.0+ Blockchain