aboutsummaryrefslogtreecommitdiff
path: root/src/miner.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge AuxPoW support from NamecoreRoss Nicoll2019-07-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes are as below: Wrap CBlockHeader::nVersion into a new class (CBlockVersion). This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID. Update getauxblock.py for new 'generate' RPC call. Add 'auxpow' to block JSON. Accept auxpow as PoW verification. Add unit tests for auxpow verification. Add check for memory-layout of CBlockVersion. Weaken auxpow chain ID checks for the testnet. Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks. Use this to disable the checks on testnet. Introduce CPureBlockHeader. Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two. Differentiate between uint256 and arith_uint256. This change was done upstream, modify the auxpow code. Add missing lock in auxpow_tests. Fix REST header check for auxpow headers. Those can be longer, thus take that into account. Also perform the check actually on an auxpow header. Correctly set the coinbase for getauxblock results. Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be. (BIP30 block height and COINBASE_FLAGS.) Implement getauxblock plus regression test. Turn auxpow test into FIXTURE test. This allows using of the Params() calls. Move CMerkleTx code to auxpow.cpp. Otherwise we get linker errors when building without wallet. Fix rebase with BIP66. Update the code to handle BIP66's nVersion=3. Enforce that auxpow parent blocks have no auxpow block version. This is for compatibility with namecoind. See also https://github.com/namecoin/namecoin/pull/199. Move auxpow-related parameters to Consensus::Params.
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Add Clang thread safety analysis annotationspracticalswift2018-05-051-3/+4
|
* Remove unused variable in SortForBlockDrew Rasmussen2018-03-141-1/+1
|
* Use mempool's ancestor sort in transaction selectionSuhas Daftuar2018-01-131-16/+7
| | | | | | | Transaction selection for mining tracks ancestor feerates that are modified based on transactions that have already been selected. This commit de-duplicates the code so that the ancestor feerate sorting used by the mempool can also be directly applied to the miner.
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* Make boost::multi_index comparators constSuhas Daftuar2017-12-071-2/+2
| | | | This fixes compatibility with boost 1.66
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Remove nBlockMaxSize from miner opt struct as it is no longer used.Gregory Maxwell2017-09-181-1/+0
|
* Deprecate confusing blockmaxsize, fix getmininginfo outputMatt Corallo2017-09-111-3/+1
| | | | | | | | | | | * This removes block-size-limiting code in favor of GBT clients doing the limiting themselves (if at all). * -blockmaxsize is deprecated and only used to calculate an implied blockmaxweight, addressing confusion from multiple users. * getmininginfo's currentblocksize return value was returning garbage values, and has been removed, also removing a GetSerializeSize call in some block generation inner loops and potentially addressing some performance edge cases.
* Fix boost headers included as user instead of system headersDan Raviv2017-08-261-2/+2
| | | | | In most of the project, boost headers are included as system headers. Fix the few inconsistent places where they aren't.
* Declare single-argument (non-converting) constructors "explicit"practicalswift2017-08-161-3/+3
| | | | In order to avoid unintended implicit conversions.
* Add const to methods that do not modify the object for which it is calledpracticalswift2017-07-251-1/+1
|
* Remove unnecessary forward class declarations in header filespracticalswift2017-06-121-2/+0
|
* Merge #9959: Mining: Prevent slowdown in CreateNewBlock on large mempoolsWladimir J. van der Laan2017-03-301-4/+7
|\ | | | | | | | | | | | | | | 011124a Update benchmarking with package statistics (Suhas Daftuar) 42cd8c8 Add benchmarking for CreateNewBlock (Suhas Daftuar) eed816a Mining: return early when block is almost full (Suhas Daftuar) Tree-SHA512: c0d8f71e4e0441acf3f4ca12f8705e413b59b323659346a447145653def71710537fb4c6d80cad8e36d68b0aabf19c92e9eab7135a8897b053ed58720856cdda
| * Update benchmarking with package statisticsSuhas Daftuar2017-03-291-4/+7
| |
* | Don't require segwit in getblocktemplate for segwit signalling or miningSuhas Daftuar2017-03-141-1/+1
|/ | | | | | 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.
* Merge #9602: Remove coin age priority and free transactions - implementationWladimir J. van der Laan2017-03-071-12/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
| * [mining] Remove -blockprioritysize.Alex Morcos2017-02-271-12/+0
| | | | | | | | Remove ability of mining code to fill part of a block with transactions sorted by coin age.
* | Abstract out BlockAssembler optionsPieter Wuille2017-02-261-1/+10
|/
* Introduce -blockmintxfeeAlex Morcos2017-01-041-0/+1
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Merge #8223: [c++11] Use std::unique_ptr for block creation.Wladimir J. van der Laan2016-10-181-1/+1
|\ | | | | | | 9fce062 [c++11] Use std::unique_ptr for block creation. (Daniel Kraft)
| * [c++11] Use std::unique_ptr for block creation.Daniel Kraft2016-06-181-1/+1
| | | | | | | | | | | | CreateNewBlock returns a pointer for which the caller takes ownership. Use std::unique_ptr to make this explicit and simplify handling of these objects in getblocktemplate.
* | Rename "block cost" to "block weight"Suhas Daftuar2016-07-181-2/+2
| |
* | Remove -blockminsize optionSuhas Daftuar2016-06-301-1/+1
| |
* | Remove addScoreTxs()Suhas Daftuar2016-06-301-4/+2
| |
* | Exclude witness transactions in addPackageTxs() pre-segwit activationSuhas Daftuar2016-06-301-2/+5
| |
* | CreateNewBlock: add support for size-accounting to addPackageTxsSuhas Daftuar2016-06-271-1/+1
| | | | | | | | | | Includes a change to not continue to use size-accounting in addScoreTxs or addPackageTxs just because addPriorityTxs() is used.
* | BIP141: Other consensus critical limits, and BIP145Pieter Wuille2016-06-221-7/+9
| | | | | | | | Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
* | BIP141: Commitment structure and deploymentPieter Wuille2016-06-221-0/+2
|/ | | | Includes a fix by Suhas Daftuar and LongShao007
* Use ancestor-feerate based transaction selection for miningSuhas Daftuar2016-06-161-0/+118
| | | | Includes changes by Pieter Wuille
* Refactor CreateNewBlock to be a method of the BlockAssembler classAlex Morcos2016-05-181-1/+55
|
* Remove internal minerLeviathn2016-02-101-5/+0
| | | | | This code removes the internal miner which is only useful on Testnet. This leaves the internal miner that is useful on RegTest intact.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Constrain constant values to a single location in codeLuke Dashjr2015-11-281-0/+3
|
* Chainparams: Explicit CChainParams arg for miner:Jorge Timón2015-11-111-1/+1
| | | | | | | -BitcoinMiner -CreateNewBlock -GenerateBitcoins -ProcessBlockFound
* Bugfix: If genproclimit is omitted to RPC setgenerate, don't change it; also ↵Luke Dashjr2015-10-011-0/+2
| | | | show correct default in getmininginfo
* Add some const declarations where they are appropriate.Daniel Kraft2015-08-081-1/+1
| | | | | Declare some arguments of functions as "const" pointers where they are not meant to be modified.
* Merge pull request #6177Wladimir J. van der Laan2015-08-061-1/+1
|\ | | | | | | ef8dfe4 Prevent block.nTime from decreasing (Mark Friedenbach)
| * Prevent block.nTime from decreasingMark Friedenbach2015-05-271-1/+1
| | | | | | | | | | | | | | | | Under some circumstances it is possible for there to be a significant, discontinuous jump in a node's clock value. On mining nodes, this can result in block templates which are no longer valid due to time-based nLockTime constraints. UpdateTime() is modified so that it will never decrease a block's nLockTime, thereby preventing such invalidations.
* | detach wallet from minerJonas Schnelli2015-06-301-2/+2
|/
* miner.h: fix clang warning because of class/struct mixJonas Schnelli2015-04-161-1/+1
| | | | - class 'Params' was previously declared as a struct
* Chainparams: Refactor: Remove redundant AllowMinDifficultyBlocks() getterJorge Timón2015-04-151-1/+2
|
* Revert mining changes in #5957Wladimir J. van der Laan2015-04-101-4/+2
| | | | | | | This reverts commit e2edf95cd3f43331843676e49a82830128a95050 6b04508e37c5dd18cec1cd61cc4356bd208aa991 0df67f1f7ab4adfe9f0b3ba6276e737b37826464, except the changes to the RPC tests. A `generate` RPC call is introduced based on the old code.
* Bugfix: make CreateNewBlock return pindexPrevPieter Wuille2015-04-011-2/+2
|
* Introduce separate 'generate' RPC callPieter Wuille2015-04-011-0/+2
|
* Merge pull request #5599Wladimir J. van der Laan2015-01-241-3/+0
|\ | | | | | | 0cc0d8d Get rid of the internal miner's hashmeter (jtimon)
| * Get rid of the internal miner's hashmeterjtimon2015-01-041-3/+0
| |
* | MOVEONLY: Move struct CBlockTemplate to miner.h (from main.h)Luke Dashjr2015-01-121-3/+8
| |