aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | Merge #8223: [c++11] Use std::unique_ptr for block creation.Wladimir J. van der Laan2016-10-181-3/+4
|\ \ | |/ |/| | | 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-3/+4
| | | | | | | | | | | | 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.
* | Merge #8362: Scale legacy sigop count in CreateNewBlockWladimir J. van der Laan2016-07-251-1/+1
|\ \ | | | | | | | | | 682aa0f Scale legacy sigop count in CreateNewBlock (Suhas Daftuar)
| * | Scale legacy sigop count in CreateNewBlockSuhas Daftuar2016-07-181-1/+1
| | |
* | | Rename "block cost" to "block weight"Suhas Daftuar2016-07-181-21/+21
|/ /
* | Remove -blockminsize optionSuhas Daftuar2016-06-301-6/+1
| |
* | Remove addScoreTxs()Suhas Daftuar2016-06-301-60/+0
| |
* | Exclude witness transactions in addPackageTxs() pre-segwit activationSuhas Daftuar2016-06-301-4/+9
| |
* | CreateNewBlock: add support for size-accounting to addPackageTxsSuhas Daftuar2016-06-271-10/+15
| | | | | | | | | | 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-26/+75
| | | | | | | | Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
* | BIP141: Commitment structure and deploymentPieter Wuille2016-06-221-0/+18
|/ | | | Includes a fix by Suhas Daftuar and LongShao007
* Use ancestor-feerate based transaction selection for miningSuhas Daftuar2016-06-161-1/+205
| | | | Includes changes by Pieter Wuille
* FIX: correctly measure size of priority blockAlex Morcos2016-06-011-1/+1
|
* FIX: Account for txs already added to block in addPriorityTxsAlex Morcos2016-05-241-1/+6
|
* Refactor CreateNewBlock to be a method of the BlockAssembler classAlex Morcos2016-05-181-188/+256
|
* auto_ptr → unique_ptrWladimir J. van der Laan2016-04-281-1/+1
| | | | | | | Change the few occurrences of the deprecated `auto_ptr` to c++11 `unique_ptr`. Silences the deprecation warnings. Also add a missing `std::` for consistency.
* BIP9 ImplementationPieter Wuille2016-03-151-5/+6
| | | | | Inspired by former implementations by Eric Lombrozo and Rusty Russell, and based on code by Jorge Timon.
* Merge #7507: Remove internal minerWladimir J. van der Laan2016-03-141-203/+0
|\ | | | | | | 8d1de43 Remove internal miner (Leviathn)
| * Remove internal minerLeviathn2016-02-101-203/+0
| | | | | | | | | | This code removes the internal miner which is only useful on Testnet. This leaves the internal miner that is useful on RegTest intact.
* | Add tags to mempool's mapTx indicesSuhas Daftuar2016-02-161-2/+2
|/
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Update miner.cpp: Fix typo in commentantonio-fr2015-12-021-1/+1
|
* Rewrite CreateNewBlockAlex Morcos2015-12-011-181/+120
| | | | | | | | | | Use the score index on the mempool to only add sorted txs in order. Remove much of the validation while building the block, relying on mempool to be consistent and only contain txs that can be mined. The mempool is assumed to be consistent as far as not containing txs which spend non-existent outputs or double spends, and scripts are valid. Finality of txs is still checked (except not coinbase maturity, assumed in mempool). Still TestBlockValidity in case mempool consistency breaks and return error state if an invalid block was created. Unit tests are modified to realize that invalid blocks can now be constructed if the mempool breaks its consistency assumptions and also updated to have the right fees, since the cached value is now used for block construction. Conflicts: src/miner.cpp
* Merge pull request #6508Pieter Wuille2015-11-281-1/+2
|\ | | | | | | | | eece63f Switch blocks to a constant-space Merkle root/branch algorithm. (Pieter Wuille) ee60e56 Add merkle.{h,cpp}, generic merkle root/branch algorithm (Pieter Wuille)
| * Switch blocks to a constant-space Merkle root/branch algorithm.Pieter Wuille2015-11-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | This switches the Merkle tree logic for blocks to one that runs in constant (small) space. The old code is moved to tests, and a new test is added that for various combinations of block sizes, transaction positions to compute a branch for, and mutations: * Verifies that the old code and new code agree for the Merkle root. * Verifies that the old code and new code agree for the Merkle branch. * Verifies that the computed Merkle branch is valid. * Verifies that mutations don't change the Merkle root. * Verifies that mutations are correctly detected.
* | Constrain constant values to a single location in codeLuke Dashjr2015-11-281-1/+1
|/
* Chainparams: Explicit CChainParams arg for miner:Jorge Timón2015-11-111-6/+5
| | | | | | | -BitcoinMiner -CreateNewBlock -GenerateBitcoins -ProcessBlockFound
* Chainparams: Explicit CChainParams arg for main (pre miner):Jorge Timón2015-11-111-2/+2
| | | | | -ProcessNewBlock -TestBlockValidity
* Restore MedianTimePast for locktime.Gregory Maxwell2015-11-031-1/+7
| | | | | | | | Revert "Revert "Add rules--presently disabled--for using GetMedianTimePast as endpoint for lock-time calculations"" This reverts commit 40cd32e835092c3158175511da5193193ec54939. After careful analysis it was determined that the change was, in fact, safe and several people were suffering momentary confusion about locktime semantics.
* Revert "Add rules--presently disabled--for using GetMedianTimePast as ↵Gregory Maxwell2015-11-011-7/+1
| | | | | | | | | | | | | endpoint for lock-time calculations" This reverts commit 9d55050773d57c0e12005e524f2e54d9e622c6e2. As noted by Luke-Jr, under some conditions this will accept transactions which are invalid by the network rules. This happens when the current block time is head of the median time past and a transaction's locktime is in the middle. This could be addressed by changing the rule to MAX(this_block_time, MTP+offset) but this solution and the particular offset used deserve some consideration.
* Add rules--presently disabled--for using GetMedianTimePast as endpoint for ↵Mark Friedenbach2015-10-231-1/+7
| | | | | | | | lock-time calculations The lock-time code currently uses CBlock::nTime as the cutoff point for time based locked transactions. This has the unfortunate outcome of creating a perverse incentive for miners to lie about the time of a block in order to collect more fees by including transactions that by wall clock determination have not yet matured. By using CBlockIndex::GetMedianTimePast from the prior block instead, the self-interested miner no longer gains from generating blocks with fraudulent timestamps. Users can compensate for this change by simply adding an hour (3600 seconds) to their time-based lock times. If enforced, this would be a soft-fork change. This commit only adds the functionality on an unexecuted code path, without changing the behaviour of Bitcoin Core.
* Do not store Merkle branches in the wallet.Pieter Wuille2015-09-221-1/+1
| | | | | | | | | | Assume that when a wallet transaction has a valid block hash and transaction position in it, the transaction is actually there. We're already trusting wallet data in a much more fundamental way anyway. To prevent backward compatibility issues, a new record is used for storing the block locator in the wallet. Old wallets will see a wallet file synchronized up to the genesis block, and rescan automatically.
* TxMemPool: Change mapTx to a boost::multi_index_containerAshley Holman2015-09-191-4/+4
| | | | | | Indexes on: - Tx Hash - Fee Rate (fee-per-kb)
* Fix crash when mining with empty keypool.Daniel Kraft2015-08-181-2/+4
| | | | | | | Since the introduction of the ScriptForMining callback, the mining functions (setgenerate and generate) crash with an assertion failure (due to a NULL pointer script returned) if the keypool is empty. Fix this by giving a proper error.
* Add some const declarations where they are appropriate.Daniel Kraft2015-08-081-2/+2
| | | | | 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-3/+11
|\ | | | | | | ef8dfe4 Prevent block.nTime from decreasing (Mark Friedenbach)