aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Make pcoinsTip memory calculations consistentAlex Morcos2017-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Since we are more accurately measuring pcoinsTip peak usage at twice the current in dynamic usage, it makes sense to double the default (this will lead to the same effective usage and peak usage as previously). We should also double the buffer used to avoid flushing if above 90% but still sufficient space remaining.
* | | | | Make GetWitnessCommitmentIndex callable on blocks without a coinbase txn.Gregory Maxwell2017-04-021-3/+5
| |/ / / |/| | | | | | | | | | | This isn't actually needed anywhere, but it's less brittle.
* | | | Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell2017-04-011-20/+21
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / / Compensate for memory peak at flush timePieter Wuille2017-03-301-1/+1
|/ /
* | [trivial] Fix typos in commentspracticalswift2017-03-211-1/+1
| |
* | Merge #8665: Assert all the things!Wladimir J. van der Laan2017-03-141-2/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | 4d51e9b Assert ConnectBlock block and pIndex are the same block (NicolasDorier) 972714c pow: GetNextWorkRequired never called with NULL pindexLast (Daniel Cousens) cc44c8f ContextualCheckBlockHeader should never have pindexPrev to NULL (NicolasDorier) Tree-SHA512: 7cc568bf9417267c335f21ec3d1505b26e56e5b3d5f4d3dbb555279489800aaa65a3bcd7bc376e274dd102912aec16ddbb18de2e2060b2667b41eb979cd9321e
| * | Assert ConnectBlock block and pIndex are the same blockNicolasDorier2017-02-191-1/+4
| | |
| * | ContextualCheckBlockHeader should never have pindexPrev to NULLNicolasDorier2017-02-151-1/+2
| | |
* | | Merge #9548: Remove min reasonable feeWladimir J. van der Laan2017-03-071-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ad82cb0 Remove unnecessary min fee argument in CTxMemPool constructor (Alex Morcos) 2a7b56c CBlockPolicyEstimator now uses hard coded minimum bucket feerate (Alex Morcos) ac9d3d2 Change fee estimation bucket limit variable names (Alex Morcos) Tree-SHA512: 6e3bc7df3497ed60c7620845d222063e33a0238020f5c3316e61e0eff758078588ea8dd51196ceb59aa561ba106f8cdae62cebe521adb3247108bb49f15252d6
| * | | Remove unnecessary min fee argument in CTxMemPool constructorAlex Morcos2017-01-171-1/+1
| | | |
* | | | Merge #9602: Remove coin age priority and free transactions - implementationWladimir J. van der Laan2017-03-071-35/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | [cleanup] Remove coin age priority completely.Alex Morcos2017-03-031-5/+2
| | | | | | | | | | | | | | | | | | | | Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
| * | | | [rpc] Remove priorityDelta from prioritisetransactionAlex Morcos2017-03-031-6/+4
| | | | | | | | | | | | | | | | | | | | 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.
| * | | | No longer allow "free" transactionsAlex Morcos2017-03-031-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove -limitfreerelay and always enforce minRelayTxFee in the mempool (except from disconnected blocks) Remove -relaypriority, the option was only used for the ability to allow free transactions to be relayed regardless of their priority. Both notions no longer apply.
* | | | | Define 7200 second timestamp window constantRussell Yanofsky2017-03-031-1/+1
|/ / / /
* | | | Merge #9773: Return errors from importmulti if complete rescans are not ↵Wladimir J. van der Laan2017-02-221-1/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | successful e2e2f4c Return errors from importmulti if complete rescans are not successful (Russell Yanofsky)
| * | | | Return errors from importmulti if complete rescans are not successfulRussell Yanofsky2017-02-171-1/+6
| | |_|/ | |/| |
* | | | Merge #9801: Removed redundant parameter from mempool.PrioritiseTransactionWladimir J. van der Laan2017-02-221-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | eaea2bb Removed redundant parameter from mempool.PrioritiseTransaction (gubatron)
| * | | | Removed redundant parameter from mempool.PrioritiseTransactiongubatron2017-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | (Also made the `const uint256 hash` parameter a `const uint256& hash` as suggested by @sdaftuar)
* | | | | Read/write mempool.dat as a binary.Pavel Janík2017-02-201-2/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | mempool.dat is a binary file and thus it should be read/written as such. Fixes #9810.
* | | | Merge #9696: [trivial] Fix recently introduced typos in commentsMarcoFalke2017-02-181-5/+5
|\ \ \ \ | |/ / / |/| | | | | | | 0c9b9b7 [trivial] Fix recently introduced typos in comments (practicalswift)
| * | | [trivial] Fix recently introduced typos in commentspracticalswift2017-02-141-5/+5
| | |/ | |/|
* / | Harden against mistakes handling invalid blocksSuhas Daftuar2017-02-151-5/+11
|/ / | | | | | | | | | | | | | | Fixes a bug in AcceptBlock() in invoking CheckBlock() with incorrect arguments, and restores a call to CheckBlock() from ProcessNewBlock() as belt-and-suspenders. Updates the (overspecified) tests to match behavior.
* | Merge #9644: [refactor] Remove using namespace <xxx> from src/MarcoFalke2017-01-301-24/+22
|\ \ | | | | | | | | | b7b48c8 Refactor: Remove using namespace <xxx> from src/*.cpp. (Karl-Johan Alm)
| * | Refactor: Remove using namespace <xxx> from src/*.cpp.Karl-Johan Alm2017-01-271-24/+22
| | |
* | | Merge #9615: Wallet incremental feeWladimir J. van der Laan2017-01-301-2/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 4b189c1 Change bumpfee result value from 'oldfee' to 'origfee'. (Alex Morcos) 0c0c63f Introduce WALLET_INCREMENTAL_RELAY_FEE (Alex Morcos) e8021ec Use CWallet::GetMinimumFee in bumpfee (Alex Morcos) ae9719a Refactor GetMinimumFee to give option of providing targetFee (Alex Morcos) fe8e8ef [rpc] Add incremental relay fee to getnetworkinfo (Alex Morcos) 6b331e6 Fix to have miner test aware of new separate block min tx fee (Alex Morcos) de6400d Fix missing use of dustRelayFee (Alex Morcos) 5b15870 Use incrementalRelayFee for BIP 125 replacement (Alex Morcos)
| * | Use incrementalRelayFee for BIP 125 replacementAlex Morcos2017-01-191-2/+2
| | |
* | | Merge #9519: Exclude RBF replacement txs from fee estimationWladimir J. van der Laan2017-01-261-5/+7
|\ \ \ | | | | | | | | | | | | de1ae32 Exclude RBF txs from fee estimation (Alex Morcos)
| * | | Exclude RBF txs from fee estimationAlex Morcos2017-01-201-5/+7
| | | |
* | | | [Trivial] fix logging typo in FlushStateToDisk()John Newbery2017-01-241-1/+1
| | | |
* | | | Introduce MemPoolConflictRemovalTrackerAlex Morcos2017-01-231-0/+45
| | | | | | | | | | | | | | | | Analogue to ConnectTrace that tracks transactions that have been removed from the mempool due to conflicts and then passes them through SyncTransaction at the end of its scope.
* | | | mempool: add notification for added/removed entriesWladimir J. van der Laan2017-01-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add notification signals to make it possible to subscribe to mempool changes: - NotifyEntryAdded(CTransactionRef)> - NotifyEntryRemoved(CTransactionRef, MemPoolRemovalReason)> Also add a mempool removal reason enumeration, which is passed to the removed notification based on why the transaction was removed from the mempool.
* | | | Merge #9596: [bugfix] save feeDelta instead of priorityDelta in DumpMempoolPieter Wuille2017-01-231-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | bd92f24 [bugfix] save feeDelta instead of priorityDelta in DumpMempool (Alex Morcos)
| * | | | [bugfix] save feeDelta instead of priorityDelta in DumpMempoolAlex Morcos2017-01-191-1/+1
| | |/ / | |/| |
* | | | Merge #9511: Don't overwrite validation state with corruption checkWladimir J. van der Laan2017-01-231-3/+4
|\ \ \ \ | | | | | | | | | | | | | | | 116419e Don't overwrite validation state with corruption check (Alex Morcos)
| * | | | Don't overwrite validation state with corruption checkAlex Morcos2017-01-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AcceptToMemoryPool has several classes of return false statements. - return state.Invalid or state.DoS directly itself - return false and set fMissingInputs (state is valid) - return false and state is set by failed CheckTransaction - return false and state is set by failed CheckInputs. This commit patches the last case where the state variable was reused for additional calls to CheckInputs to identify witness stripping as cause of validation failure. After this commit, it should be the case that if !fMissingInputs, state is always Invalid if AcceptToMemoryPool returns false.
* | | | | Move wallet callbacks into cs_main (this effectively reverts #7946)Matt Corallo2017-01-191-9/+8
| |/ / / |/| | |
* | | | Merge #9499: Use recent-rejects, orphans, and recently-replaced txn for ↵Wladimir J. van der Laan2017-01-191-7/+11
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compact-block-reconstruction c594580 Add braces around AddToCompactExtraTransactions (Matt Corallo) 1ccfe9b Clarify comment about mempool/extra conflicts (Matt Corallo) fac4c78 Make PartiallyDownloadedBlock::InitData's second param const (Matt Corallo) b55b416 Add extra_count lower bound to compact reconstruction debug print (Matt Corallo) 863edb4 Consider all (<100k memusage) txn for compact-block-extra-txn cache (Matt Corallo) 7f8c8ca Consider all orphan txn for compact-block-extra-txn cache (Matt Corallo) 93380c5 Use replaced transactions in compact block reconstruction (Matt Corallo) 1531652 Keep shared_ptrs to recently-replaced txn for compact blocks (Matt Corallo) edded80 Make ATMP optionally return the CTransactionRefs it replaced (Matt Corallo) c735540 Move ORPHAN constants from validation.h to net_processing.h (Matt Corallo)
| * | | Make ATMP optionally return the CTransactionRefs it replacedMatt Corallo2017-01-091-7/+11
| |/ /
* | | Merge #9484: Introduce assumevalid setting to skip validation presumed valid ↵Pieter Wuille2017-01-161-9/+26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | scripts. 7b5e3fe Add assumevalid testcase (John Newbery) e440ac7 Introduce assumevalid setting to skip presumed valid scripts. (Gregory Maxwell)
| * | | Introduce assumevalid setting to skip presumed valid scripts.Gregory Maxwell2017-01-131-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This disentangles the script validation skipping from checkpoints. A new option is introduced "assumevalid" which specifies a block whos ancestors we assume all have valid scriptsigs and so we do not check them when they are also burried under the best header by two weeks worth of work. Unlike checkpoints this has no influence on consensus unless you set it to a block with an invalid history. Because of this it can be easily be updated without risk of influencing the network consensus. This results in a massive IBD speedup. This approach was independently recommended by Peter Todd and Luke-Jr since POW based signature skipping (see PR#9180) does not have the verifiable properties of a specific hash and may create bad incentives. The downside is that, like checkpoints, the defaults bitrot and older releases will sync slower. On the plus side users can provide their own value here, and if they set it to something crazy all that will happen is more time will be spend validating signatures. Checkblocks and checklevel are also moved to the hidden debug options: Especially now that checkblocks has a low default there is little need to change these settings, and users frequently misunderstand them as influencing security or IBD speed. By hiding them we offset the space added by this new option.
* | | | Merge #9490: Replace FindLatestBefore used by importmuti with ↵Pieter Wuille2017-01-131-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FindEarliestAtLeast. 4b06e41 Add unit test for FindEarliestAtLeast (Suhas Daftuar) 997a98a Replace FindLatestBefore used by importmuti with FindEarliestAtLeast. (Gregory Maxwell)
| * | | | Replace FindLatestBefore used by importmuti with FindEarliestAtLeast.Gregory Maxwell2017-01-121-0/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In spite of the name FindLatestBefore used std::lower_bound to try to find the earliest block with a nTime greater or equal to the the requested value. But lower_bound uses bisection and requires the input to be ordered with respect to the comparison operation. Block times are not well ordered. I don't know what lower_bound is permitted to do when the data is not sufficiently ordered, but it's probably not good. (I could construct an implementation which would infinite loop...) To resolve the issue this commit introduces a maximum-so-far to the block indexes and searches that. For clarity the function is renamed to reflect what it actually does. An issue that remains is that there is no grace period in importmulti: If a address is created at time T and a send is immediately broadcast and included by a miner with a slow clock there may not yet have been any block with at least time T. The normal rescan has a grace period of 7200 seconds, but importmulti does not.
* | | | Merge #9375: Relay compact block messages prior to full block connectionPieter Wuille2017-01-131-10/+28
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 02ee4eb Make most_recent_compact_block a pointer to a const (Matt Corallo) 73666ad Add comment to describe callers to ActivateBestChain (Matt Corallo) 962f7f0 Call ActivateBestChain without cs_main/with most_recent_block (Matt Corallo) 0df777d Use a temp pindex to avoid a const_cast in ProcessNewBlockHeaders (Matt Corallo) c1ae4fc Avoid holding cs_most_recent_block while calling ReadBlockFromDisk (Matt Corallo) 9eb67f5 Ensure we meet the BIP 152 old-relay-types response requirements (Matt Corallo) 5749a85 Cache most-recently-connected compact block (Matt Corallo) 9eaec08 Cache most-recently-announced block's shared_ptr (Matt Corallo) c802092 Relay compact block messages prior to full block connection (Matt Corallo) 6987219 Add a CValidationInterface::NewPoWValidBlock callback (Matt Corallo) 180586f Call AcceptBlock with the block's shared_ptr instead of CBlock& (Matt Corallo) 8baaba6 [qa] Avoid race in preciousblock test. (Matt Corallo) 9a0b2f4 [qa] Make compact blocks test construction using fetch methods (Matt Corallo) 8017547 Make CBlockIndex*es in net_processing const (Matt Corallo)
| * | | Add comment to describe callers to ActivateBestChainMatt Corallo2017-01-121-0/+5
| | | |
| * | | Use a temp pindex to avoid a const_cast in ProcessNewBlockHeadersMatt Corallo2017-01-111-3/+5
| | | |
| * | | Add a CValidationInterface::NewPoWValidBlock callbackMatt Corallo2017-01-051-0/+5
| | | |
| * | | Call AcceptBlock with the block's shared_ptr instead of CBlock&Matt Corallo2017-01-041-8/+12
| | | |
| * | | Make CBlockIndex*es in net_processing constMatt Corallo2017-01-041-2/+4
| | | |
* | | | Merge #9472: Disentangle progress estimation from checkpoints and update itWladimir J. van der Laan2017-01-121-2/+20
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | df36371 Update estimated transaction count data (Pieter Wuille) e356d9a Shorten variable names and switch to tx/s (Pieter Wuille) 6dd8116 Remove SIGCHECK_VERIFICATION_FACTOR (Pieter Wuille) 3641141 Move tx estimation data out of CCheckPointData (Pieter Wuille) a4bac66 [MOVEONLY] Move progress estimation out of checkpoints (Pieter Wuille)