aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/mining.cpp
AgeCommit message (Collapse)Author
2017-07-14Remove checking of mempool min fee from estimateSmartFee.Alex Morcos
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.
2017-07-14Remove confusing MAX_BLOCK_BASE_SIZE.Gregory Maxwell
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.
2017-07-10Improve error reporting for estimaterawfeeAlex Morcos
2017-07-10Change API to estimaterawfeeAlex Morcos
Report results for all 3 possible time horizons instead of specifying time horizon as an argument.
2017-06-29rpc: Move the `generate` RPC call to rpcwalletWladimir J. van der Laan
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`.
2017-06-24Merge #10191: [trivial] Rename unused RPC arguments 'dummy'Wladimir J. van der Laan
0ef7de9 [RPCs] Remove submitblock parameters argument help text (John Newbery) Tree-SHA512: f39ad4bb3006e3d722fa51ae2ab4a48726e740993d6bed5737b355d1e0a99cf475ca9519f97adf8cde1b7187b14a24d5951ce4f34624d01d9ef84b49124c2894
2017-06-15Merge #10284: Always log debug information for fee calculation in ↵Wladimir J. van der Laan
CreateTransaction 1bebfc8 Output Fee Estimation Calculations in CreateTransaction (Alex Morcos) Tree-SHA512: e25a27f7acbbc3a666d5d85da2554c5aaec4c923ee2fdbcfc532c29c6fbdec3c9e0d6ae6044543ecc339e7bd81df09c8d228e0b53a2c5c2dae0f1098c9453272
2017-06-14[RPCs] Remove submitblock parameters argument help textJohn Newbery
2017-06-13Merge #10502: scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPEPieter Wuille
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
2017-06-13Output Fee Estimation Calculations in CreateTransactionAlex Morcos
2017-06-12Merge #10488: Note that the prioritizetransaction dummy value is deprecated, ↵Wladimir J. van der Laan
and has no meaning 40796e1 Remove references to priority that snuck back in in 870824e9. (Matt Corallo) Tree-SHA512: fd6f772a9fdf14b3b125e84a79059d7ab34b3571b35dc48f8d4b9f22ea71c6cdd4ae88c2e135ae317a16744c28dd23cf7f7dd88ea9d8b2d408e57845ef87d03b
2017-06-09Merge #10521: Limit variable scopePieter Wuille
90593ed92 Limit variable scope (practicalswift) Tree-SHA512: 4719e303688a31aefbe1d239e86b21dd3c2045524e08bd628c6ba0c6c2a97de14d04305b9beafe0b1dcde7229793e6663168953f192e88ed409be5c30fd2a9a9
2017-06-06Use list initialization (C++11) for maps/vectors instead of ↵practicalswift
boost::assign::map_list_of/list_of
2017-06-06Remove references to priority that snuck back in in 870824e9.Matt Corallo
The "priority" field should be appropriately marked as a "dummy" value and noted that it is deprecated and will likely be removed.
2017-06-06Merge #10252: RPC/Mining: Restore API compatibility for prioritisetransactionWladimir J. van der Laan
870824e RPC/Mining: Restore API compatibility for prioritisetransaction (Luke Dashjr) Tree-SHA512: eb507500dc5ba8d17521f34f3d6eae45aa9259c38d15a75dc3e3ad45774ffb53db943be1720a97e6cd5f08e7832801e27ffb636da081a58955018b6f8f9d8fba
2017-06-05scripted-diff: Fully remove BOOST_FOREACHJorge Timón
-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-
2017-06-05Limit variable scopepracticalswift
2017-05-30scripted-diff: s/BIP9DeploymentInfo/VBDeploymentInfo/Jorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/BIP9DeploymentInfo/VBDeploymentInfo/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
2017-05-23RPC/Mining: Restore API compatibility for prioritisetransactionLuke Dashjr
Breaking API serves no purpose other than to be incompatible with older versions and other implementations that do support priority
2017-05-17Make more json-like output from estimaterawfeeAlex Morcos
2017-05-10Comments and improved documentationAlex Morcos
2017-05-10Introduce a scale factorAlex Morcos
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.. )
2017-05-10Rewrite estimateSmartFeeAlex Morcos
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.
2017-05-10Track failures in fee estimation.Alex Morcos
Start tracking transactions which fail to confirm within the target and are then evicted or otherwise leave mempool. Fix slight error in unit test.
2017-05-10Expose estimaterawfeeAlex Morcos
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.
2017-04-20Merge #9942: Refactor CBlockPolicyEstimatorWladimir J. van der Laan
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
2017-04-10Call estimate(Smart)Fee directly from CBlockPolicyEstimatorAlex Morcos
2017-04-07Use std::shared_ptr instead of boost::shared_ptr in ScriptForMiningMatt Corallo
2017-04-07Add override to functions using CValidationInterface methodsMatt Corallo
2017-04-03Add braces to submitblock per current style.Gregory Maxwell
2017-04-03Check transaction count early in submitblock.Gregory Maxwell
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.
2017-03-27refactor: Move GetDifficulty out of `rpc/server.h`Wladimir J. van der Laan
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`)
2017-03-14Don't require segwit in getblocktemplate for segwit signalling or miningSuhas Daftuar
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.
2017-03-08Refactor: Remove using namespace <xxx> from rpc/Karl-Johan Alm
2017-03-03[rpc] Remove priorityDelta from prioritisetransactionAlex Morcos
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.
2017-02-27[rpc] Remove estimatepriority and estimatesmartpriority.Alex Morcos
The RPC calls were already deprecated.
2017-02-22Merge #9801: Removed redundant parameter from mempool.PrioritiseTransactionWladimir J. van der Laan
eaea2bb Removed redundant parameter from mempool.PrioritiseTransaction (gubatron)
2017-02-21Removed redundant parameter from mempool.PrioritiseTransactiongubatron
(Also made the `const uint256 hash` parameter a `const uint256& hash` as suggested by @sdaftuar)
2017-02-02Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before segwit activatesLuke Dashjr
2017-01-14Remove redundant semicolonspracticalswift
2017-01-10Merge #8811: rpc: Add support for JSON-RPC named argumentsWladimir J. van der Laan
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)
2017-01-10Update RPC argument namesJohn Newbery
2017-01-05Merge #8747: [rpc] Fix transaction size comments and RPC help text.Wladimir J. van der Laan
d29505d Fix transaction size comments. Size now refers to virtual size as defined in BIP141. (jonnynewbs)
2017-01-05rpc: Named arguments for mining callsWladimir J. van der Laan
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-22Added missing colons in when running help commandAnditto Heristyo
2016-12-08Fix transaction size comments. Size now refers to virtual size as defined in ↵jonnynewbs
BIP141.
2016-12-04Remove unused CDiskBlockPos* argument from ProcessNewBlockMatt Corallo
2016-12-04Switch pblock in ProcessNewBlock to a shared_ptrMatt Corallo
This (finally) fixes a performance regression in b3b3c2a5623d5c942d2b3565cc2d833c65105555
2016-12-02Merge #9260: Mrs Peacock in The Library with The Candlestick (killed ↵Pieter Wuille
main.{h,cpp}) 76faa3c Rename the remaining main.{h,cpp} to validation.{h,cpp} (Matt Corallo) e736772 Move network-msg-processing code out of main to its own file (Matt Corallo) 87c35f5 Remove orphan state wipe from UnloadBlockIndex. (Matt Corallo)