aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
AgeCommit message (Collapse)Author
2015-02-17Rename Interval() to DifficultyAdjustmentInterval()Shaul Kfir
2015-02-09Merge pull request #5739Wladimir J. van der Laan
f4b2078 Replace difficulty readjustment blocks with Interval() (Shaul Kfir)
2015-02-04fix getblocktemplate lock issueJonas Schnelli
getblocktemplate didn't have a wallet lock before #5711 and IMO there is no need for LEAVE/ENTER critical section.
2015-02-02Replace difficulty readjustment blocks with Interval()Shaul Kfir
2015-01-28Removed main.h dependency from rpcserver.cppEric Lombrozo
Rebased by @laanwj: - update for RPC methods added since 84d13ee: setmocktime, invalidateblock, reconsiderblock. Only the first, setmocktime, required a change, the other two are thread safe.
2015-01-24Merge pull request #5599Wladimir J. van der Laan
0cc0d8d Get rid of the internal miner's hashmeter (jtimon)
2015-01-05Use arith_uint256 where necessaryWladimir J. van der Laan
Also add conversion from/to uint256 where needed.
2015-01-04Get rid of the internal miner's hashmeterjtimon
2014-12-31Merge pull request #5499Wladimir J. van der Laan
7f71813 Bugfix: prioritisetransaction: Do some basic sanity checking on txid (Luke Dashjr)
2014-12-23en: Avoid ambiguous language regarding when transactions confirmLuke Dashjr
2014-12-19Added "Core" to copyright headerssandakersmann
Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-17Bugfix: prioritisetransaction: Do some basic sanity checking on txidLuke Dashjr
Besides giving a nicer error, this also prevents logging arbitrary data (which could have been used to exploit log readers) into debug.log
2014-12-01prioritisetransaction RPC: Restore compatibility with existing ↵Luke Dashjr
implementations by using satoshis for fee offset rather than BTC
2014-11-24Merge pull request #1816Wladimir J. van der Laan
b867e40 CreateNewBlock: Stick height in coinbase so we pass template sanity check (Luke Dashjr) 60755db submitblock: Check for duplicate submissions explicitly (Luke Dashjr) bc6cb41 QA RPC tests: Add tests block block proposals (Luke Dashjr) 9765a50 Implement BIP 23 Block Proposal (Luke Dashjr) 3dcbb9b Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock (Luke Dashjr) 132ea9b miner_tests: Disable checkpoints so they don't fail the subsidy-change test (Luke Dashjr) df08a62 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) (Luke Dashjr) 4ea1be7 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock (Luke Dashjr) a48f2d6 Abstract context-dependent block checking from acceptance (Luke Dashjr)
2014-11-20Update comments in src/rpc* to be doxygen compatibleMichael Ford
2014-11-20submitblock: Check for duplicate submissions explicitlyLuke Dashjr
2014-11-20Implement BIP 23 Block ProposalLuke Dashjr
2014-11-18Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblockLuke Dashjr
2014-11-14Optimize -regtest setgenerate block generationGavin Andresen
Speed up generating blocks in regression test mode, by moving block-creating and nonce-finding directly into the setgenerate RPC call (instead of starting up a mining thread and waiting for it to find a block). This makes the forknotify RPC test three times quicker, for example (10 seconds runtime instead of 30 seconds, assuming the initial blockchain cache is already built).
2014-11-03Merge pull request #3727Wladimir J. van der Laan
e69a587 RPC: submitblock: Support for returning specific rejection reasons (Luke Dashjr)
2014-11-03Merge pull request #5106Wladimir J. van der Laan
1bea2bb Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and document it (Luke Dashjr) d29a291 Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for submitblock (Luke Dashjr) f877aaa Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock, now that it no longer does the full block validity check (Luke Dashjr) 24e8896 Add CValidationInterface::BlockChecked notification (Luke Dashjr)
2014-10-30RPC: submitblock: Support for returning specific rejection reasonsLuke Dashjr
2014-10-28Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and ↵Luke Dashjr
document it
2014-10-27MOVEONLY: Move CFeeRate and Amount constants to amount.ojtimon
2014-10-21Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for ↵Luke Dashjr
submitblock
2014-10-21Bugfix: submitblock: Use a temporary CValidationState to determine ↵Luke Dashjr
accurately the outcome of ProcessBlock, now that it no longer does the full block validity check
2014-10-10Add fTestnetToBeDeprecatedFieldRPC to CChainParamsjtimon
2014-09-26Use a typedef for monetary valuesMark Friedenbach
2014-09-16Merge pull request #4911Pieter Wuille
611116d header include cleanup (Philip Kaufmann)
2014-09-15Fixing compiler warning C4101ENikS
Github-Pull: #4856
2014-09-14header include cleanupPhilip Kaufmann
- ensures alphabetical ordering for includes etc. in source file headers
2014-08-27Merge pull request #4377Pieter Wuille
654871d replace ComputeMinWork with CheckMinWork (jtimon) b343c1a Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon) c2c02f3 Move UpdateTime to pow (jtimon)
2014-08-26Split up util.cpp/hWladimir J. van der Laan
Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-23Move UpdateTime to powjtimon
2014-07-29Consolidate CTransaction hex encode/decode into core_io.h, core_{read,write}.cppJeff Garzik
2014-07-15Add helptexts for -whitelist and rpc prioritisetransaction and switch to ↵Cozz Lovan
bitcoin instead of satoshis
2014-07-11getblocktemplate: longpolling supportLuke Dashjr
2014-07-07Use GetBlockTime() morejtimon
2014-06-28Replace HexBits with strprintfjtimon
2014-06-26JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>Luke Dashjr
Accepts the transaction into mined blocks at a higher (or lower) priority
2014-06-25Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan
This commit removes all the unnecessary dependencies (key, core, netbase, sync, ...) from bitcoin-cli. To do this it shards the chain parameters into BaseParams, which contains just the RPC port and data directory (as used by utils and bitcoin-cli) and Params, with the rest.
2014-06-23Refactor proof of work related functions out of mainjtimon
2014-06-21Remove getwork() RPC callPieter Wuille
2014-06-17Add "chain" to getmininginfo, improve help in getblockchaininfojtimon
2014-06-17Get rid of Params().RPCisTestNet()jtimon
2014-06-10small formatting, indentation and comment fixesPhilip Kaufmann
- contains zero code changes
2014-06-09Merge pull request #3824Wladimir J. van der Laan
f0a83fc Use Params().NetworkID() instead of TestNet() from the payment protocol (jtimon) 2871889 net.h was using std namespace through chainparams.h included in protocol.h (jtimon) c8c52de Replace virtual methods with static attributes, chainparams.h depends on protocol.h instead of the other way around (jtimon) a3d946e Get rid of TestNet() (jtimon) 6fc0fa6 Add RPCisTestNet chain parameter (jtimon) cfeb823 Add RequireStandard chain parameter (jtimon) 21913a9 Add AllowMinDifficultyBlocks chain parameter (jtimon) d754f34 Move majority constants to chainparams (jtimon) 8d26721 Get rid of RegTest() (jtimon) cb9bd83 Add DefaultCheckMemPool chain parameter (jtimon) 2595b9a Add DefaultMinerThreads chain parameter (jtimon) bfa9a1a Add MineBlocksOnDemand chain parameter (jtimon) 1712adb Add MiningRequiresPeers chain parameter (jtimon)
2014-06-06estimatefee / estimatepriority RPC methodsGavin Andresen
New RPC methods: return an estimate of the fee (or priority) a transaction needs to be likely to confirm in a given number of blocks. Mike Hearn created the first version of this method for estimating fees. It works as follows: For transactions that took 1 to N (I picked N=25) blocks to confirm, keep N buckets with at most 100 entries in each recording the fees-per-kilobyte paid by those transactions. (separate buckets are kept for transactions that confirmed because they are high-priority) The buckets are filled as blocks are found, and are saved/restored in a new fee_estiamtes.dat file in the data directory. A few variations on Mike's initial scheme: To estimate the fee needed for a transaction to confirm in X buckets, all of the samples in all of the buckets are used and a median of all of the data is used to make the estimate. For example, imagine 25 buckets each containing the full 100 entries. Those 2,500 samples are sorted, and the estimate of the fee needed to confirm in the very next block is the 50'th-highest-fee-entry in that sorted list; the estimate of the fee needed to confirm in the next two blocks is the 150'th-highest-fee-entry, etc. That algorithm has the nice property that estimates of how much fee you need to pay to get confirmed in block N will always be greater than or equal to the estimate for block N+1. It would clearly be wrong to say "pay 11 uBTC and you'll get confirmed in 3 blocks, but pay 12 uBTC and it will take LONGER". A single block will not contribute more than 10 entries to any one bucket, so a single miner and a large block cannot overwhelm the estimates.
2014-06-04Add RPCisTestNet chain parameterjtimon
2014-06-04Add MineBlocksOnDemand chain parameterjtimon