aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge AuxPoW support from NamecoreRoss Nicoll2019-07-131-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add Dogecoin block subsidy calculations.Ross Nicoll2019-04-031-1/+3
|
* Merge #13780: 0.17: Pre-branch maintenanceWladimir J. van der Laan2018-08-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 3fc20632a3ad30809356a58d2cf0ea4a4ad4cec3 qt: Set BLOCK_CHAIN_SIZE = 220 (DrahtBot) 2b6a2f4a28792f2fe9dc1be843b1ff1ecae35e8a Regenerate manpages (DrahtBot) eb7daf4d600eeb631427c018a984a77a34aca66e Update copyright headers to 2018 (DrahtBot) Pull request description: Some trivial maintenance to avoid having to do it again after the 0.17 branch off. (The scripts to do this are in `./contrib/`) Tree-SHA512: 16b2af45e0351b1c691c5311d48025dc6828079e98c2aa2e600dc5910ee8aa01858ca6c356538150dc46fe14c8819ed8ec8e4ec9a0f682b9950dd41bc50518fa
| * Update copyright headers to 2018DrahtBot2018-07-271-1/+1
| |
* | Merge #13527: policy: Remove promiscuousmempoolflagsWladimir J. van der Laan2018-08-071-2/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | faa24441ec047ec336b86f586016b9d318c1c0ad policy: Remove promiscuousmempoolflags (MarcoFalke) Pull request description: It seems odd to clutter validation code with features that can only ever be used for testing (testnet or regtest). Removing that test-only code makes the mempool logic less painful to understand and easier to reason about when changed or refactored in the future. Tree-SHA512: 3b897aa9604ac8d82ebe9573c6efd468c93ddaa08d378ebc902e247b7aa6c68fcde71e5b449c08f17a067146cdc66dc50a67ce06d07607c27e5189a49c3fba3f
| * | policy: Remove promiscuousmempoolflagsMarcoFalke2018-06-231-2/+5
| | |
* | | Remove unused argument to DefaultOptions(...)practicalswift2018-07-101-2/+2
| |/ |/|
* | cleanup: avoid hidden copies in range-for loopsCory Fields2018-06-151-2/+2
|/
* Add Clang thread safety analysis annotationspracticalswift2018-05-051-1/+0
|
* Remove duplicate includespracticalswift2018-04-091-1/+0
|
* Merge #12859: Bugfix: Include <memory> for std::unique_ptrWladimir J. van der Laan2018-04-051-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | a5bca13 Bugfix: Include <memory> for std::unique_ptr (Luke Dashjr) Pull request description: Not sure why all these includes were missing, but it's breaking builds for some users: https://bugs.gentoo.org/show_bug.cgi?id=652142 (Added to all files with a reference to `std::unique_ptr`) Tree-SHA512: 8a2c67513ca07b9bb52c34e8a20b15e56f8af2530310d9ee9b0a69694dd05e02e7a3683f14101a2685d457672b56addec591a0bb83900a0eb8e2a43d43200509
| * Bugfix: Include <memory> for std::unique_ptrLuke Dashjr2018-04-021-0/+1
| |
* | [config] Remove blockmaxsize optionJohn Newbery2018-03-221-3/+1
| | | | | | | | | | | | | | | | | | | | The blockmaxsize option was marked as deprecated in V0.15.1, and code was added to convert provided blockmaxsize into blockmaxweight. However, this code was incorrectly implemented, and blockmaxsize was silently ignored. No users have complained about blockmaxsize being ignored, so just remove it in V0.17.
* | Remove unused variable in SortForBlockDrew Rasmussen2018-03-141-2/+2
| |
* | [doc] dev-notes: Members should be initializedMarcoFalke2018-02-161-6/+0
|/ | | | Also, remove mention of threads that were removed long ago
* Use mempool's ancestor sort in transaction selectionSuhas Daftuar2018-01-131-1/+1
| | | | | | | 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
|
* Remove includes in .cpp files for things the corresponding .h file already ↵practicalswift2017-11-161-1/+0
| | | | included
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* Deprecate confusing blockmaxsize, fix getmininginfo outputMatt Corallo2017-09-111-36/+2
| | | | | | | | | | | * 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 potential null dereferencesMeshCollider2017-08-231-0/+1
|
* Merge #9964: Add const to methods that do not modify the object for which it ↵MarcoFalke2017-08-161-1/+1
|\ | | | | | | | | | | | | | | | | | | is called 6e8c48dc5 Add const to methods that do not modify the object for which it is called (practicalswift) Pull request description: Tree-SHA512: a6888111ba16fb796e320e60806e1a77d36f545989b5405dc7319992291800109eab0b8e8c286b784778f41f1ff5289e7cb6b4afd7aec77f385fbcafc02cffc1
| * Add const to methods that do not modify the object for which it is calledpracticalswift2017-07-251-1/+1
| |
* | scripted-diff: stop using the gArgs wrappersMarko Bencun2017-08-141-8/+8
|/ | | | | | | | They were temporary additions to ease the transition. -BEGIN VERIFY SCRIPT- find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g' -END VERIFY SCRIPT-
* scripted-diff: Fully remove BOOST_FOREACHJorge Timón2017-06-051-3/+3
| | | | | | -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 #8329: Consensus: MOVEONLY: Move functions for tx verificationWladimir J. van der Laan2017-05-181-0/+1
|\ | | | | | | | | | | 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
| * MOVEONLY: tx functions to consensus/tx_verify.oJorge Timón2017-04-061-0/+1
| | | | | | | | Functions related to transaction verification.
* | Consensus: Policy: MOVEONLY: Move CFeeRate out of the consensus moduleJorge Timón2017-05-031-0/+1
| | | | | | | | | | | | ...from amount.o to policy/feerate.o Policy, because it moves policy code to the policy directory (common module)
* | Remove excess logic.practicalswift2017-04-101-3/+1
|/
* Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell2017-04-011-1/+1
| | | | | | | | | | | | | | | | | This changes the logging categories to boolean flags instead of strings. This simplifies the acceptance testing by avoiding accessing a scoped static thread local pointer to a thread local set of strings. It eliminates the only use of boost::thread_specific_ptr outside of lockorder debugging. This change allows log entries to be directed to multiple categories and makes it easy to change the logging flags at runtime (e.g. via an RPC, though that isn't done by this commit.) It also eliminates the fDebug global. Configuration of unknown logging categories now produces a warning.
* Merge #9959: Mining: Prevent slowdown in CreateNewBlock on large mempoolsWladimir J. van der Laan2017-03-301-4/+36
|\ | | | | | | | | | | | | | | 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-5/+12
| |
| * Add benchmarking for CreateNewBlockSuhas Daftuar2017-03-291-0/+7
| |
| * Mining: return early when block is almost fullSuhas Daftuar2017-03-291-0/+18
| |
* | [trivial] Dead code removalThomas Snider2017-03-231-13/+0
| |
* | Don't require segwit in getblocktemplate for segwit signalling or miningSuhas Daftuar2017-03-141-2/+2
|/ | | | | | 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-156/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * [debug] Change -printpriority optionAlex Morcos2017-02-271-5/+1
| | | | | | | | -printpriority output is now changed to only show the fee rate and hash of transactions included in a block by the mining code.
| * [mining] Remove -blockprioritysize.Alex Morcos2017-02-271-151/+2
| | | | | | | | Remove ability of mining code to fill part of a block with transactions sorted by coin age.
* | Abstract out BlockAssembler optionsPieter Wuille2017-02-261-17/+30
|/
* Refactor: Remove using namespace <xxx> from src/*.cpp.Karl-Johan Alm2017-01-271-4/+2
|
* Introduce -blockmintxfeeAlex Morcos2017-01-041-2/+8
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Introduce (and use) an IsArgSet accessor methodMatt Corallo2016-12-231-2/+2
|
* Move CTxInWitness inside CTxInPieter Wuille2016-12-041-2/+2
|
* Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo2016-12-021-1/+1
|
* Introduce convenience type CTransactionRefPieter Wuille2016-11-191-2/+2
|
* Make CBlock::vtx a vector of shared_ptr<CTransaction>Pieter Wuille2016-11-191-6/+6
|
* Merge #8838: Calculate size and weight of block correctly in CreateNewBlock()Wladimir J. van der Laan2016-11-171-1/+3
|\ | | | | | | 5f274a1 log block size and weight correctly. (jnewbery)
| * log block size and weight correctly.jnewbery2016-10-031-1/+3
| |