aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Avoid duplicate CheckBlock checksPieter Wuille2015-09-221-0/+6
| | | | |
| * | | | 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.
* | | | | Merge pull request #6688Wladimir J. van der Laan2015-09-231-35/+33
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 131c23d Fix locking in GetTransaction. (Alex Morcos)
| * | | | | Fix locking in GetTransaction.Alex Morcos2015-09-171-35/+33
| | |/ / / | |/| | | | | | | | | | | | | GetTransaction needs to lock cs_main until ReadBlockFromDisk completes, the data inside CBlockIndex's can change since pruning. This lock was held by all calls to GetTransaction except rest_tx.
* | | | | Merge pull request #6148Wladimir J. van der Laan2015-09-231-3/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ae6f957 Enable block relay when pruning (Suhas Daftuar) 0da6ae2 Do not inv old or missing blocks when pruning (Suhas Daftuar)
| * | | | | Enable block relay when pruningSuhas Daftuar2015-06-171-3/+1
| | | | | |
| * | | | | Do not inv old or missing blocks when pruningSuhas Daftuar2015-06-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When responding to a getblocks message, only return inv's as long as we HAVE_DATA for blocks in the chain, and only for blocks that we aren't likely to delete in the near future.
* | | | | | Merge pull request #6646Wladimir J. van der Laan2015-09-231-6/+5
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | 6ecaec3 [Trivial] [logging] Rm extraneous cleansubver in serveral debug messages. (Gregory Maxwell)
| * | | | | [Trivial] [logging] Rm extraneous cleansubver in serveral debug messages.Gregory Maxwell2015-09-081-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We log the cleanSubVer as part of connect. It is not uniquely more informative than any of the other data we have about a peer, often less. It's also often long now as well. There is no need to output it as part of mempoolrej, AcceptToMemoryPool, or pong entries. Leaving it out makes our log entries more uniform and consistent.
* | | | | | Track transaction packages in CTxMemPoolEntrySuhas Daftuar2015-09-191-3/+24
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Associate with each CTxMemPoolEntry all the size/fees of descendant mempool transactions. Sort mempool by max(feerate of entry, feerate of descendants). Update statistics on-the-fly as transactions enter or leave the mempool. Also add ancestor and descendant limiting, so that transactions can be rejected if the number or size of unconfirmed ancestors exceeds a target, or if adding a transaction would cause some other mempool entry to have too many (or too large) a set of unconfirmed in- mempool descendants.
* | | | | Add UpdatedBlockTip signal to CMainSignals and CValidationInterfaceJoão Barbosa2015-09-161-0/+1
| | | | |
* | | | | Add NODE_BLOOM service bit and bump protocol versionMatt Corallo2015-09-051-0/+15
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lets nodes advertise that they offer bloom filter support explicitly. The protocol version bump allows SPV nodes to assume that NODE_BLOOM is set if NODE_NETWORK is set for pre-70011 nodes. Also adds an option to turn bloom filter support off for nodes which advertise a version number >= 70011. Nodes attempting to use bloom filters on such protocol versions are banned, and a later upgade should drop nodes of an older version which attempt to use bloom filters. Much code stolen from Peter Todd. Implements BIP 111
* | / / Record nMinPingUsecTimePatrick Strateman2015-08-221-0/+1
| |/ / |/| |
* | | Merge pull request #6539Wladimir J. van der Laan2015-08-191-1/+1
|\ \ \ | | | | | | | | | | | | 9f68ed6 typofixes (found by misspell_fixer) (Veres Lajos)
| * | | typofixes (found by misspell_fixer)Veres Lajos2015-08-101-1/+1
| | | |
* | | | Merge pull request #6519Wladimir J. van der Laan2015-08-111-71/+60
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7f1f8f5 Move mempool rejections to new debug category (Wladimir J. van der Laan) 66daed5 Add information to errors in ConnectBlock, CheckBlock (Wladimir J. van der Laan) 6cab808 Remove most logging from transaction validation (Wladimir J. van der Laan) 9003c7c Add function to convert CValidationState to a human-readable message (Wladimir J. van der Laan) dc58258 Introduce REJECT_INTERNAL codes for local AcceptToMempool errors (Wladimir J. van der Laan) fbf44e6 Add debug message to CValidationState for optional extra information (Wladimir J. van der Laan)
| * | | | Move mempool rejections to new debug categoryWladimir J. van der Laan2015-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move mempool rejections to debug category `mempoolrej`, to make it possible to show them without enabling the entire category `mempool` which is high volume.
| * | | | Add information to errors in ConnectBlock, CheckBlockWladimir J. van der Laan2015-08-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add detailed state information to the errors, as it is no longer being logged downstream. Also add the state information to mempool rejection debug message in ProcessMessages.
| * | | | Remove most logging from transaction validationWladimir J. van der Laan2015-08-111-59/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary direct logging in CheckTransaction, AcceptToMemoryPool, CheckTxInputs, CScriptCheck::operator() All status information should be returned in the CValidationState. Relevant debug information is also added to the CValidationState using the recently introduced debug message. Do keep the "BUG! PLEASE REPORT THIS! ConnectInputs failed against MANDATORY but not STANDARD flags" error as it is meant to appear as bug in the log.
| * | | | Add function to convert CValidationState to a human-readable messageWladimir J. van der Laan2015-08-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | It is necessary to be able to concisely log a validation state. Convert CValidationState to a human-readable message for logging.
| * | | | Introduce REJECT_INTERNAL codes for local AcceptToMempool errorsWladimir J. van der Laan2015-08-111-8/+10
| |/ / / | | | | | | | | | | | | | | | | | | | | Add status codes specific to AcceptToMempool procession of transactions. These can never happen due to block validation, and must never be sent over the P2P network. Add assertions where appropriate.
* | | | Add some const declarations where they are appropriate.Daniel Kraft2015-08-081-7/+7
| | | | | | | | | | | | | | | | | | | | Declare some arguments of functions as "const" pointers where they are not meant to be modified.
* | | | Merge pull request #6377Wladimir J. van der Laan2015-08-071-2/+4
|\ \ \ \ | |/ / / |/| | | | | | | c433828 Handle no chain tip available in InvalidChainFound() (Ross Nicoll)
| * | | Handle no chain tip available in InvalidChainFound()Ross Nicoll2015-07-221-2/+4
| | | | | | | | | | | | | | | | Handle the case where no chain tip is available, in InvalidChainFound(). This fixes a null pointer deference when running unit tests, if the genesis block or block validation code is broken.
* | | | Merge pull request #5913Wladimir J. van der Laan2015-08-051-4/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 5922b67 Add assertion and cast before sending reject code (Wladimir J. van der Laan) a651403 Add absurdly high fee message to validation state (for RPC propagation) (Shaul Kfir)
| * | | | Add assertion and cast before sending reject codeWladimir J. van der Laan2015-08-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets rid of a warning. Add an assertion to make sure that the reject code is in the correct range for the network protocol (if it is outside the range it must be a bug)
| * | | | Add absurdly high fee message to validation state (for RPC propagation)Shaul Kfir2015-06-301-3/+4
| | | | |
* | | | | Merge pull request #6462Wladimir J. van der Laan2015-08-051-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 7b79cbd limit total length of user agent comments (Pavol Rusnak) 557f8ea implement uacomment config parameter which can add comments to user agent as per BIP-0014 (Pavol Rusnak)
| * | | | | limit total length of user agent commentsPavol Rusnak2015-08-051-1/+1
| | |_|_|/ | |/| | | | | | | | | | | | | Reworked-By: Wladimir J. van der Laan <[email protected]>
* | | | | Merge pull request #6498Wladimir J. van der Laan2015-08-031-10/+64
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a8d0407 Move recentRejects initialization to top of InitBlockIndex (Wladimir J. van der Laan) 0847d9c Keep track of recently rejected transactions (Peter Todd) d741371 Only use randomly created nonces in CRollingBloomFilter. (Pieter Wuille) d2d7ee0 Make CRollingBloomFilter set nTweak for you (Peter Todd) a3d65fe Reuse vector hashing code for uint256 (Pieter Wuille) bbe4108 Add uint256 support to CRollingBloomFilter (Peter Todd)
| * | | | | Move recentRejects initialization to top of InitBlockIndexWladimir J. van der Laan2015-07-311-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids that premature return in the condition that a new chain is initialized results in NULL pointer errors due to recentReject not being constructed. Also add assertions where it is used.
| * | | | | Keep track of recently rejected transactionsPeter Todd2015-07-281-9/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nodes can have divergent policies on which transactions they will accept and relay. This can cause you to repeatedly request and reject the same tx after its inved to you from various peers which have accepted it. Here we add rolling bloom filter to keep track of such rejections, clearing the filter every time the chain tip changes. Credit goes to Alex Morcos, who created the patch that this code is based on. Original code by Peter Todd. Refactored to not construct the filter at startup time by Pieter Wuille.
| * | | | | Make CRollingBloomFilter set nTweak for youPeter Todd2015-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While CBloomFilter is usually used with an explicitly set nTweak, CRollingBloomFilter is only used internally. Requiring every caller to set nTweak is error-prone and redundant; better to have the class handle that for you with a high-quality randomness source. Additionally when clearing the filter it makes sense to change nTweak as well to recover from a bad setting, e.g. due to insufficient randomness at initialization, so the clear() method is replaced by a reset() method that sets a new, random, nTweak value.
* | | | | | Make sure LogPrintf strings are line-terminatedWladimir J. van der Laan2015-08-031-1/+1
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the cases where LogPrint[f] was accidentally called without line terminator, which resulted in concatenated log lines. (see e.g. #6492)
* | | | | Merge pull request #6224Wladimir J. van der Laan2015-07-291-3/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 59b49cd Eliminate signed/unsigned comparison warning (Suhas Daftuar) 04b5d23 Replace sleep with syncing using pings (Suhas Daftuar) 6b1066f Ignore whitelisting during IBD for unrequested blocks. (Suhas Daftuar) bfc30b3 Ignore unrequested blocks too far ahead of tip (Suhas Daftuar)
| * | | | | Eliminate signed/unsigned comparison warningSuhas Daftuar2015-07-111-1/+1
| | | | | |
| * | | | | Ignore whitelisting during IBD for unrequested blocks.Suhas Daftuar2015-06-301-2/+6
| | | | | |
| * | | | | Ignore unrequested blocks too far ahead of tipSuhas Daftuar2015-06-031-1/+8
| | | | | |
* | | | | | Revert "Cache transaction validation successes"Pieter Wuille2015-07-281-26/+0
| |/ / / / |/| | | | | | | | | | | | | | This reverts commit 17b11428c135203342aff38cabc8047e673f38ac.
* | | | | Cache transaction validation successesPieter Wuille2015-07-271-0/+26
| | | | |
* | | | | Merge pull request #5697Wladimir J. van der Laan2015-07-271-0/+8
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 60c8bac Includes: Cleanup around net main and wallet (Jorge Timón) 9dd793f TRIVIAL: Missing includes (Jorge Timón)
| * | | | | Includes: Cleanup around net main and walletJorge Timón2015-07-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
| * | | | | TRIVIAL: Missing includesJorge Timón2015-07-231-0/+2
| | |_|/ / | |/| | |
* | | | | Merge pull request #6287Wladimir J. van der Laan2015-07-231-7/+7
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | a794284 locking: add a quick example of GUARDED_BY (Cory Fields) 2b890dd locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields) cd27bba locking: teach Clang's -Wthread-safety to cope with our scoped lock macros (Cory Fields)
| * | | | locking: add a quick example of GUARDED_BYCory Fields2015-06-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | This was chosen not because it's necessarily helpful, but because its locking assumptions were already correct.
* | | | | remove unused inv from ConnectTip()Pavel Vasin2015-07-161-2/+1
| | | | |
* | | | | Merge pull request #6335Wladimir J. van der Laan2015-07-061-138/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 9238ecb Policy: MOVEONLY: 3 functions to policy.o: (Luke Dashjr) 627b9de Policy: MOVEONLY: Create policy/policy.h with some constants (Jorge Timón)
| * | | | | Policy: MOVEONLY: 3 functions to policy.o:Luke Dashjr2015-06-261-138/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - [script/standard.o] IsStandard - [main.o] IsStandardTx - [main.o] AreInputsStandard Also, don't use namespace std in policy.cpp
| * | | | | Policy: MOVEONLY: Create policy/policy.h with some constantsJorge Timón2015-06-261-0/+2
| | |_|/ / | |/| | |
* | | | | Merge pull request #6329Wladimir J. van der Laan2015-07-031-2/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 0c37634 acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only (Luke Dashjr)