aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/mining.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Convert named argument from nblocks to conf_targetAlex Morcos2017-07-171-21/+15
| | | | | | | | in estimatesmartfee and estimaterawfee. Also reuse existing bounds checking.
* | Improve api to estimatesmartfeeAlex Morcos2017-07-171-15/+35
|/ | | | | | Change parameter for conservative estimates to be an estimate_mode string. Change to never return a -1 for failure but to instead omit the feerate and return an error string. Throw JSONRPC error on invalid nblocks parameter.
* Properly bound check conf_target in wallet RPC callsAlex Morcos2017-07-141-0/+10
|
* Remove checking of mempool min fee from estimateSmartFee.Alex Morcos2017-07-141-2/+1
| | | | | | | | | | This check has been moved to the wallet logic GetMinimumFee. The rpc call to estimatesmartfee will now no longer return a result maxed with the mempool min fee, but automated fee calculations from the wallet will produce the same result as before and coincontrol and sendcoins dialogs in the GUI will correctly display the right prospective fee. changes to policy/fees.cpp include a big whitespace indentation change.
* Remove confusing MAX_BLOCK_BASE_SIZE.Gregory Maxwell2017-07-141-4/+5
| | | | | | | | | | | | | | | | | | Some people keep thinking that MAX_BLOCK_BASE_SIZE is a separate size limit from the weight limit when it fact it is superfluous, and used in early tests before the witness data has been validated or just to compute worst case sizes. The size checks that use it would not behave any differently consensus wise if they were eliminated completely. Its correct value is not independently settable but is a function of the weight limit and weight formula. This patch just eliminates it and uses the scale factor as required to compute the worse case constants. It also moves the weight factor out of primitives into consensus, which is a more logical place for it.
* Improve error reporting for estimaterawfeeAlex Morcos2017-07-101-25/+46
|
* Change API to estimaterawfeeAlex Morcos2017-07-101-49/+51
| | | | Report results for all 3 possible time horizons instead of specifying time horizon as an argument.
* rpc: Move the `generate` RPC call to rpcwalletWladimir J. van der Laan2017-06-291-37/+1
| | | | | | | | | | | This makes it possible to mine to any wallet when multi-wallet mode is added. Solves the same problem as #10649, but IMO in a cleaner way. It also gets rid of the circuitous `ScriptForMining` method on `CValidationInterface`, which really doesn't belong there. After this change it's still possible to mine without wallet through `generatetoaddress`.
* Merge #10191: [trivial] Rename unused RPC arguments 'dummy'Wladimir J. van der Laan2017-06-241-7/+4
|\ | | | | | | | | | | 0ef7de9 [RPCs] Remove submitblock parameters argument help text (John Newbery) Tree-SHA512: f39ad4bb3006e3d722fa51ae2ab4a48726e740993d6bed5737b355d1e0a99cf475ca9519f97adf8cde1b7187b14a24d5951ce4f34624d01d9ef84b49124c2894
| * [RPCs] Remove submitblock parameters argument help textJohn Newbery2017-06-141-7/+4
| |
* | Merge #10284: Always log debug information for fee calculation in ↵Wladimir J. van der Laan2017-06-151-3/+3
|\ \ | |/ |/| | | | | | | | | | | CreateTransaction 1bebfc8 Output Fee Estimation Calculations in CreateTransaction (Alex Morcos) Tree-SHA512: e25a27f7acbbc3a666d5d85da2554c5aaec4c923ee2fdbcfc532c29c6fbdec3c9e0d6ae6044543ecc339e7bd81df09c8d228e0b53a2c5c2dae0f1098c9453272
| * Output Fee Estimation Calculations in CreateTransactionAlex Morcos2017-06-131-3/+3
| |
* | Merge #10502: scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPEPieter Wuille2017-06-131-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 1238f13cf scripted-diff: Remove PAIRTYPE (Jorge Timón) 18dc3c396 scripted-diff: Remove Q_FOREACH (Jorge Timón) 7c00c2672 scripted-diff: Fully remove BOOST_FOREACH (Jorge Timón) a5410ac5e Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal (Jorge Timón) Tree-SHA512: d3ab4a173366402e7dcef31608977b757d4aa07abbbad2ee1bcbcfa311e994a4552f24e5a55272cb22c2dcf89a4b0495e02e9d9aceae4b08c0bab668f20e324c
| * | scripted-diff: Fully remove BOOST_FOREACHJorge Timón2017-06-051-1/+1
| | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
* | | Merge #10488: Note that the prioritizetransaction dummy value is deprecated, ↵Wladimir J. van der Laan2017-06-121-4/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | and has no meaning 40796e1 Remove references to priority that snuck back in in 870824e9. (Matt Corallo) Tree-SHA512: fd6f772a9fdf14b3b125e84a79059d7ab34b3571b35dc48f8d4b9f22ea71c6cdd4ae88c2e135ae317a16744c28dd23cf7f7dd88ea9d8b2d408e57845ef87d03b
| * | | Remove references to priority that snuck back in in 870824e9.Matt Corallo2017-06-061-4/+5
| | |/ | |/| | | | | | | | | | The "priority" field should be appropriately marked as a "dummy" value and noted that it is deprecated and will likely be removed.
* | | Merge #10521: Limit variable scopePieter Wuille2017-06-091-4/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | 90593ed92 Limit variable scope (practicalswift) Tree-SHA512: 4719e303688a31aefbe1d239e86b21dd3c2045524e08bd628c6ba0c6c2a97de14d04305b9beafe0b1dcde7229793e6663168953f192e88ed409be5c30fd2a9a9
| * | | Limit variable scopepracticalswift2017-06-051-4/+2
| | |/ | |/|
* | | Use list initialization (C++11) for maps/vectors instead of ↵practicalswift2017-06-061-5/+3
| |/ |/| | | | | boost::assign::map_list_of/list_of
* | Merge #10252: RPC/Mining: Restore API compatibility for prioritisetransactionWladimir J. van der Laan2017-06-061-7/+12
|\ \ | | | | | | | | | | | | | | | 870824e RPC/Mining: Restore API compatibility for prioritisetransaction (Luke Dashjr) Tree-SHA512: eb507500dc5ba8d17521f34f3d6eae45aa9259c38d15a75dc3e3ad45774ffb53db943be1720a97e6cd5f08e7832801e27ffb636da081a58955018b6f8f9d8fba
| * | RPC/Mining: Restore API compatibility for prioritisetransactionLuke Dashjr2017-05-231-7/+12
| |/ | | | | | | Breaking API serves no purpose other than to be incompatible with older versions and other implementations that do support priority
* / scripted-diff: s/BIP9DeploymentInfo/VBDeploymentInfo/Jorge Timón2017-05-301-4/+4
|/ | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/BIP9DeploymentInfo/VBDeploymentInfo/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
* Make more json-like output from estimaterawfeeAlex Morcos2017-05-171-20/+25
|
* Comments and improved documentationAlex Morcos2017-05-101-1/+1
|
* Introduce a scale factorAlex Morcos2017-05-101-0/+2
| | | | For the per confirmation number tracking of data, introduce a scale factor so that in the longer horizones confirmations are bucketed together at a resolution of the scale. (instead of 1008 individual data points for each fee bucket, have 42 data points each covering 24 different confirmation values.. (1-24), (25-48), etc.. )
* Rewrite estimateSmartFeeAlex Morcos2017-05-101-5/+14
| | | | Change the logic of estimateSmartFee to check a 60% threshold at half the target, a 85% threshold at the target and a 95% threshold at double the target. Always check the shortest time horizon possible and ensure that estimates are monotonically decreasing. Add a conservative mode, which makes sure that the 95% threshold is also met at longer time horizons as well.
* Track failures in fee estimation.Alex Morcos2017-05-101-0/+3
| | | | | | Start tracking transactions which fail to confirm within the target and are then evicted or otherwise leave mempool. Fix slight error in unit test.
* Expose estimaterawfeeAlex Morcos2017-05-101-0/+74
| | | | Track information the ranges of fee rates that were used to calculate the fee estimates (the last range of fee rates in which the data points met the threshold and the first to fail) and provide an RPC call to return this information.
* Merge #9942: Refactor CBlockPolicyEstimatorWladimir J. van der Laan2017-04-201-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | 68af651 MOVEONLY: move TxConfirmStats to cpp (Alex Morcos) 2332f19 Initialize TxConfirmStats in constructor (Alex Morcos) 5ba81e5 Read and Write fee estimate file directly from CBlockPolicyEstimator (Alex Morcos) 14e10aa Call estimate(Smart)Fee directly from CBlockPolicyEstimator (Alex Morcos) dbb9e36 Give CBlockPolicyEstimator it's own lock (Alex Morcos) f6187d6 Make processBlockTx private. (Alex Morcos) ae7327b Make feeEstimator its own global instance of CBlockPolicyEstimator (Alex Morcos) Tree-SHA512: dbf3bd2b30822e609a35f3da519b62d23f8a50e564750695ddebd08553b4c01874ae3e07d792c6cc78cc377d2db33b951ffedc46ac7edaf5793f9ebb931713af
| * Call estimate(Smart)Fee directly from CBlockPolicyEstimatorAlex Morcos2017-04-101-2/+3
| |
* | Use std::shared_ptr instead of boost::shared_ptr in ScriptForMiningMatt Corallo2017-04-071-4/+3
| |
* | Add override to functions using CValidationInterface methodsMatt Corallo2017-04-071-1/+1
|/
* Add braces to submitblock per current style.Gregory Maxwell2017-04-031-8/+13
|
* Check transaction count early in submitblock.Gregory Maxwell2017-04-031-0/+4
| | | | | | | | | There is no point in even hashing a submitted block which doesn't have a coinbase transaction. This also results in more useful error reporting on corrupted input. Thanks to rawodb for the bug report.
* refactor: Move GetDifficulty out of `rpc/server.h`Wladimir J. van der Laan2017-03-271-0/+1
| | | | | | | | | | | It has no business in `rpcserver.h`. Define it in the interface header of the implementation unit `rpcblockchain` where it is defined. Also modernize the signature to: double GetDifficulty(const CBlockIndex* blockindex = nullptr); (remove `extern`, replace `NULL` with `nullptr`)
* Don't require segwit in getblocktemplate for segwit signalling or miningSuhas Daftuar2017-03-141-4/+14
| | | | | | Segwit's version bit will be signalled for all invocations of CreateNewBlock, and not specifying segwit only will cause CreateNewBlock to skip transactions with witness from being selected.
* Refactor: Remove using namespace <xxx> from rpc/Karl-Johan Alm2017-03-081-13/+11
|
* [rpc] Remove priorityDelta from prioritisetransactionAlex Morcos2017-03-031-11/+8
| | | | This a breaking API change to the prioritisetransaction RPC call which previously required exactly three arguments and now requires exactly two (hash and feeDelta). The function prioritiseTransaction is also updated.
* [rpc] Remove estimatepriority and estimatesmartpriority.Alex Morcos2017-02-271-65/+0
| | | | The RPC calls were already deprecated.
* Merge #9801: Removed redundant parameter from mempool.PrioritiseTransactionWladimir J. van der Laan2017-02-221-1/+1
|\ | | | | | | eaea2bb Removed redundant parameter from mempool.PrioritiseTransaction (gubatron)
| * Removed redundant parameter from mempool.PrioritiseTransactiongubatron2017-02-211-1/+1
| | | | | | | | (Also made the `const uint256 hash` parameter a `const uint256& hash` as suggested by @sdaftuar)
* | Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before segwit activatesLuke Dashjr2017-02-021-2/+6
|/
* Remove redundant semicolonspracticalswift2017-01-141-2/+2
|
* Merge #8811: rpc: Add support for JSON-RPC named argumentsWladimir J. van der Laan2017-01-101-31/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4e7e2e1 Update RPC argument names (John Newbery) 481f289 rpc: Named argument support for bitcoin-cli (Wladimir J. van der Laan) 9adb4e1 rpc: Argument name consistency (Wladimir J. van der Laan) 8d713f7 rpc: Named arguments for rawtransaction calls (Wladimir J. van der Laan) 37a166f rpc: Named arguments for wallet calls (Wladimir J. van der Laan) 78b684f rpc: Named arguments for mining calls (Wladimir J. van der Laan) b8ebc59 rpc: Named arguments for net calls (Wladimir J. van der Laan) 2ca9dcd test: Add test for RPC named arguments (Wladimir J. van der Laan) fba1a61 rpc: Named arguments for misc calls (Wladimir J. van der Laan) 286ec08 rpc: Add 'echo' call for testing (Wladimir J. van der Laan) 495eb44 rpc: Named arguments for blockchain calls (Wladimir J. van der Laan) 6f1c76a rpc: Support named arguments (Wladimir J. van der Laan) 5865d41 authproxy: Add support for RPC named arguments (Wladimir J. van der Laan)
| * Update RPC argument namesJohn Newbery2017-01-101-11/+11
| |
| * rpc: Named arguments for mining callsWladimir J. van der Laan2017-01-051-22/+22
| |
* | Merge #8747: [rpc] Fix transaction size comments and RPC help text.Wladimir J. van der Laan2017-01-051-2/+4
|\ \ | |/ |/| | | d29505d Fix transaction size comments. Size now refers to virtual size as defined in BIP141. (jonnynewbs)
| * Fix transaction size comments. Size now refers to virtual size as defined in ↵jonnynewbs2016-12-081-2/+4
| | | | | | | | BIP141.
* | Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | | | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* | Added missing colons in when running help commandAnditto Heristyo2016-12-221-4/+4
| |