aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
Commit message (Collapse)AuthorAgeFilesLines
* fees: Reduce minimum relay fee to 0.001 DOGE, final change from tx to 0.01Michi Lumin2021-08-111-1/+1
|
* Use CAmount for constant amounts tooRoss Nicoll2021-08-081-1/+1
|
* Initial back end framework to separate wallet and relay fees + dust.Michi Lumin2021-07-301-3/+6
|
* Don't re-check AuxPoW when sending data to peersShibe2021-02-081-3/+3
| | | | | | Checking scrypt PoW is expensive and needless in this case. All block headers are already checked when they are accepted, and they will be checked again on the receiving end.
* Halve timeoutsRoss Nicoll2021-02-071-4/+4
|
* Adapt block download timeouts to DogecoinRoss Nicoll2021-02-051-2/+2
| | | | | Block download timeouts are expressed as a fraction of block interval time, so Dogecoin values have been too aggressive. Matching Bitcoin values as a starting point.
* Default policy: reduce default mempool expiry timePatrick Lodder2021-01-271-1/+1
| | | | | | | | | | | | | | | | | Reduces DEFAULT_MEMPOOL_EXPIRY from 336 hours to 24 hours. Motivation is that while blocks are empty, un-relayable tx are stuck in mempools for a long time and effectively locking utxo for 2 weeks until they can be respent, if no RBF opt-in was performed (most wallet implementations do not do RBF opt-in.) As the expectation is that block space will not be fully utilized for the foreseeable future, and therefore, as long as this is the case, no valid transaction should ever live in the mempool for more than a couple of minutes. This default setting can be overridden with the -mempoolexpiry parameter by individual node operators to a value (expressed in hours) that makes the most sense for the use cases the node serves.
* [backport] [rpc] getblockchaininfo: add size_on_disk, prune_target_size, ↵Daniel Edgecumbe2020-07-241-0/+3
| | | | | | | | | | automatic_pruning Fix pruneheight help text. Move fPruneMode block to match output ordering with help text. Add functional tests for new fields in getblockchaininfo. Rebase-from: bitcoin#b7dfc6c4
* Re-introduce alert functionality (#1470)Ross Nicoll2018-09-191-0/+3
| | | Re-introduce alert functionality removed from Bitcoin upstream
* Clean up RPC tests (#1465)Ross Nicoll2018-09-191-1/+1
| | | | | | | | | | * Enable full block tests * Fix invalidblocktest * Move watch only address funding to immediately before it's used, so node 0 doesn't spend the output before it checks it later. * Fix `fundrawtransaction` tests and sanitize fee calculation at the same time * Correct resolution of chain parameters when validating tx inputs, especially from previous coinbase transactions * Set block versions on full block tests so that the generated blocks are AuxPoW compatible
* Enforce minor Dogecoin parameters (#1427)Ross Nicoll2018-09-191-9/+9
| | | | | | * Minimum number of blocks and blockchain size are increased for pruning. In comparison to Bitcoin this uses 24 hours as a minimum, rather than 48, although given blocks are rarely full this likely reflects a lot longer in reality. * Multiply fork detection parameters by 5. The wall clock time elapsed for "long" forks is therefore half that of Bitcoin, but IMHO those figures are excessive for a chain with 1 minute block times. * BIP16 and BIP30 have both been enabled on Dogecoin since inception and should not be conditional.
* Bring 1.14 fees in line with 1.10 (#1425)Ross Nicoll2018-09-191-2/+2
| | | | | | * Disable free transactions * Updating remaining fee calculation constants * Round up to the nearest 1k, not up 1k so the UI fee estimator is correct
* Add Dogecoin current fee calculation logic (#1413)Ross Nicoll2018-09-191-3/+3
| | | Introduces 1 COIN/kb fees, rounded up to the next 1 COIN.
* Modify chain consensus parameters to be height aware (#1396)Ross Nicoll2018-09-191-4/+4
| | | | | | | | | * Modify chain consensus parameters to be height aware * Correct implementation of simplified rewards in parameters * Correct max money * Use base block version in IsSuperMajority() instead of full version * Correct mining of blocks in AuxPoW tests * Add in missing pre-AuxPoW consensus checks
* Merge AuxPoW support from NamecoreRoss Nicoll2018-09-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Return errors from importmulti if complete rescans are not successfulRussell Yanofsky2017-02-221-1/+9
| | | | | Github-Pull: #9773 Rebased-From: e2e2f4c856363bbb0e3b5ba4df225f3754c3db39
* Merge #9499: Use recent-rejects, orphans, and recently-replaced txn for ↵Wladimir J. van der Laan2017-01-191-9/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+6
| |
| * Move ORPHAN constants from validation.h to net_processing.hMatt Corallo2017-01-091-6/+0
| |
* | Merge #9484: Introduce assumevalid setting to skip validation presumed valid ↵Pieter Wuille2017-01-161-0/+3
|\ \ | | | | | | | | | | | | | | | | | | 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-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #9375: Relay compact block messages prior to full block connectionPieter Wuille2017-01-131-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Make CBlockIndex*es in net_processing constMatt Corallo2017-01-041-1/+1
| | |
* | | Merge #9472: Disentangle progress estimation from checkpoints and update itWladimir J. van der Laan2017-01-121-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | Remove SIGCHECK_VERIFICATION_FACTORPieter Wuille2017-01-041-1/+1
| | | |
| * | | Move tx estimation data out of CCheckPointDataPieter Wuille2017-01-041-2/+2
| | | |
| * | | [MOVEONLY] Move progress estimation out of checkpointsPieter Wuille2017-01-041-0/+4
| |/ /
* | / Add pruneblockchain RPC to enable manual block file pruning.mrbandrews2017-01-101-0/+2
| |/ |/|
* | Merge #9138: Improve fee estimationPieter Wuille2017-01-051-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 44b64b9 Fix edge case with stale fee estimates (Alex Morcos) 78ae62d Add clarifying comments to fee estimation (Alex Morcos) 5fe0f47 Add extra logging to processBlock in fee estimation. (Alex Morcos) dc008c4 Add IsCurrentForFeeEstimatation (Alex Morcos) ebafdca Pass pointers to existing CTxMemPoolEntries to fee estimation (Alex Morcos) d825838 Always update fee estimates on new blocks. (Alex Morcos) 6f06b26 rename bool to validFeeEstimate (Alex Morcos) 84f7ab0 Remove member variable hadNoDependencies from CTxMemPoolEntry (Alex Morcos) 60ac00d Don't track transactions at all during IBD. (Alex Morcos) 4df4479 Remove extraneous LogPrint from fee estimation (Alex Morcos)
| * | Add clarifying comments to fee estimationAlex Morcos2017-01-041-1/+1
| | |
| * | Add IsCurrentForFeeEstimatationAlex Morcos2017-01-041-0/+2
| |/ | | | | | | Make a more conservative notion of whether the node is caught up to the rest of the network and only count transactions as fee estimation data points if the node is caught up.
* | Merge #9312: Increase mempool expiry time to 2 weeksWladimir J. van der Laan2017-01-051-1/+1
|\ \ | |/ |/| | | 5f0e27f Increase mempool expiry time to 2 weeks (Alex Morcos)
| * Increase mempool expiry time to 2 weeksAlex Morcos2016-12-091-1/+1
| |
* | Merge #9283: A few more CTransactionRef optimizationsWladimir J. van der Laan2017-01-041-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 91335ba Remove unused MakeTransactionRef overloads (Pieter Wuille) 6713f0f Make FillBlock consume txn_available to avoid shared_ptr copies (Pieter Wuille) 62607d7 Convert COrphanTx to keep a CTransactionRef (Pieter Wuille) c44e4c4 Make AcceptToMemoryPool take CTransactionRef (Pieter Wuille)
| * | Make AcceptToMemoryPool take CTransactionRefPieter Wuille2016-12-211-2/+2
| | |
* | | Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
|/ / | | | | | | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* | Merge #9236: Fix races for strMiscWarning and fLargeWork*Found, make QT ↵Wladimir J. van der Laan2016-12-191-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | runawayException use GetWarnings 749be01 Move GetWarnings() into its own file. (Gregory Maxwell) e3ba0ef Eliminate data races for strMiscWarning and fLargeWork*Found. (Gregory Maxwell) c63198f Make QT runawayException call GetWarnings instead of directly access strMiscWarning. (Gregory Maxwell)
| * | Make QT runawayException call GetWarnings instead of directly access ↵Gregory Maxwell2016-12-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | strMiscWarning. This is a first step in avoiding racy accesses to strMiscWarning. The change required moving GetWarnings and related globals to util.
* | | Merge #9273: Remove unused CDiskBlockPos* argument from ProcessNewBlockWladimir J. van der Laan2016-12-141-2/+1
|\ \ \ | |_|/ |/| | | | | a13fa4c Remove unused CDiskBlockPos* argument from ProcessNewBlock (Matt Corallo)
| * | Remove unused CDiskBlockPos* argument from ProcessNewBlockMatt Corallo2016-12-041-2/+1
| | |
* | | Merge #9014: Fix block-connection performance regressionWladimir J. van der Laan2016-12-051-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | dd0df81 Document ConnectBlock connectTrace postconditions (Matt Corallo) 2d6e561 Switch pblock in ProcessNewBlock to a shared_ptr (Matt Corallo) 2736c44 Make the optional pblock in ActivateBestChain a shared_ptr (Matt Corallo) ae4db44 Create a shared_ptr for the block we're connecting in ActivateBCS (Matt Corallo) fd9d890 Keep blocks as shared_ptrs, instead of copying txn in ConnectTip (Matt Corallo) 6fdd43b Add struct to track block-connect-time-generated info for callbacks (Matt Corallo)
| * | Switch pblock in ProcessNewBlock to a shared_ptrMatt Corallo2016-12-041-1/+1
| | | | | | | | | | | | | | | This (finally) fixes a performance regression in b3b3c2a5623d5c942d2b3565cc2d833c65105555
| * | Make the optional pblock in ActivateBestChain a shared_ptrMatt Corallo2016-12-041-1/+1
| |/
* / Switch GetTransaction to returning a CTransactionRefPieter Wuille2016-12-021-1/+1
|/
* Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo2016-12-021-0/+565