aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #2224 from sipa/valstateGavin Andresen2013-01-291-200/+193
|\ \ \ | | | | | | | | Improve error handling during validation
| * | | Deal with LevelDB errorsPieter Wuille2013-01-301-28/+42
| | | |
| * | | Improve dealing with abort conditionsPieter Wuille2013-01-301-35/+34
| | | |
| * | | Add disk space checks before flushing CCoins cachePieter Wuille2013-01-301-0/+7
| | | |
| * | | Treat coinbase value violation as DoSPieter Wuille2013-01-301-1/+1
| | | |
| * | | CValidationState frameworkPieter Wuille2013-01-301-175/+148
| |/ /
* / / Fix two clang3.3 warningsGavin Andresen2013-01-291-9/+0
|/ /
* | Merge pull request #2223 from gavinandresen/nonfinalnonstandardGavin Andresen2013-01-281-0/+3
|\ \ | | | | | | Treat non-final transactions as non-standard
| * | Treat non-final transactions as non-standardGavin Andresen2013-01-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least one service that accepted zero-confirmation transactions was vulnerable because an attacker could send a transaction with a lock time far in the future, and then have plenty of time in which to get a double-spend mined (perhaps from a miner who wasn't on the network when the first transaction was broadcast). That is a variation on the "Finney attack". We still don't recommend anybody accept 0-confirmation transactions as final payment for anything. This change keeps non-final transactions from appearing in the wallet, and, assuming most of the network accepts this change, will prevent them from being relayed until they are final.
* | | Merge pull request #2182 from gavinandresen/addressoracleGavin Andresen2013-01-261-27/+26
|\ \ \ | |/ / |/| | Remove IsFromMe() check in CTxMemPool::accept()
| * | Let limitfreerelay=0 reject ALL free transactionsGavin Andresen2013-01-231-1/+1
| | |
| * | Remove IsFromMe() check in CTxMemPool::accept()Gavin Andresen2013-01-151-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue #2178 : attacker could penny-flood with invalid-signature transactions to deduce which addresses belonged to your node. I'm committing this early for code review; I still need to write up a test plan. Executive summary of fix: check all transactions received from the network for penny-flood rate-limiting before adding to the memory pool. But do NOT ratelimit transactions added to the memory pool: - because of blockchain reorgs - stored in the wallet and added at startup - sent from the GUI or one of the send* RPC commands (CWallet::CommitTransaction) The limit-free-transactions code really should be a method on CNode, with counters per-peer. But that is a bigger change for another day.
* | | Check only 288 blocks at startup by defaultPieter Wuille2013-01-261-1/+1
| |/ |/|
* | Merge pull request #2168 from sipa/txindexGavin Andresen2013-01-251-4/+40
|\ \ | | | | | | Add optional transaction index to databases
| * | Add optional transaction index to databasesPieter Wuille2013-01-181-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | By specifying -txindex when initializing the database, a txid-to-diskpos index is maintained in the blktree database. This database is used to help answering getrawtransaction() RPC queries, when enabled. Changing the -txindex value requires a -reindex; the client will abort at startup if the database and the specified -txindex mismatch.
* | | Merge pull request #2187 from CodeShark/SyncWithWalletsFixGavin Andresen2013-01-231-2/+1
|\ \ \ | | | | | | | | Bugfix - Moved SyncWithWallets out of ProcessMessage and into CTxMemPool::accept()
| * | | Moved SyncWithWallets out of ProcessMessage and into CTxMemPool::accept() so ↵Eric Lombrozo2013-01-181-2/+1
| |/ / | | | | | | | | | that when adding multiple wallets they will be aware of each other's transactions.
* | | Merge pull request #2192 from mikehearn/notfoundmsgGavin Andresen2013-01-231-1/+17
|\ \ \ | | | | | | | | Add a notfound message to getdata.
| * | | Add a notfound message to getdata that is sent if any transactions that ↵Mike Hearn2013-01-191-1/+17
| |/ / | | | | | | | | | aren't in the relayable set are requested.
* | | Merge pull request #2188 from TheBlueMatt/bloomGavin Andresen2013-01-231-2/+2
|\ \ \ | | | | | | | | Send transactions after a CMerkleBlock when asked for it in an inv.
| * | | Replace 520 constant with MAX_SCRIPT_ELEMENT_SIZEMatt Corallo2013-01-181-1/+1
| | | |
| * | | Send transactions after a CMerkleBlock when asked for it in an inv.Matt Corallo2013-01-181-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This actually simplifies some SPV code, as they can keep track of a filtered block and its txn before accepting both in one step. The previous argument was that SPV nodes should handle the txn the same as any other free txn and then mark them as connected to a block when they get the filtered block itself. However, it now appears that SPV nodes will need to put in more effort to verify loose txn than they would to verify txn in blocks, thus making it more approriate to send the txn after the filtered block.
* / / Bugfix + simplify special case for genesisPieter Wuille2013-01-191-15/+8
|/ /
* | Merge pull request #2060 from sipa/parallelGavin Andresen2013-01-171-8/+56
|\ \ | | | | | | Parallel script verification
| * | Remove contention on signature cache during block validationPieter Wuille2013-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Since block validation happens in parallel, multiple threads may be accessing the signature cache simultaneously. To prevent contention: * Turn the signature cache lock into a shared mutex * Make reading from the cache only acquire a shared lock * Let block validations not store their results in the cache
| * | Parallelize script verificationPieter Wuille2013-01-081-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * During block verification (when parallelism is requested), script check actions are stored instead of being executed immediately. * After every processed transactions, its signature actions are pushed to a CScriptCheckQueue, which maintains a queue and some synchronization mechanism. * Two or more threads (if enabled) start processing elements from this queue, * When the block connection code is finished processing transactions, it joins the worker pool until the queue is empty. As cs_main is held the entire time, and all verification must be finished before the block continues processing, this does not reach the best possible performance. It is a less drastic change than some more advanced mechanisms (like doing verification out-of-band entirely, and rolling back blocks when a failure is detected). The -par=N flag controls the number of threads (1-16). 0 means auto, and is the default.
| * | Remove CheckSig_mode and move logic out of CheckInputs()Pieter Wuille2013-01-081-6/+7
| | |
| * | Add CScriptCheck: a closure representing a script checkPieter Wuille2013-01-081-7/+8
| | |
| * | Move VerifySignature to mainPieter Wuille2013-01-081-0/+11
| | |
* | | Filter mempool commandMatt Corallo2013-01-161-5/+8
| | |
* | | Use CPartialMerkleTree for CMerkleBlock transactions.Matt Corallo2013-01-161-8/+18
| | |
* | | Add CPartialMerkleTreePieter Wuille2013-01-161-0/+121
| | | | | | | | | | | | | | | This adds a compact representation for a subset of a merkle tree's nodes.
* | | Let a node opt out of tx invs before we get a their bloom filterMatt Corallo2013-01-161-0/+6
| | | | | | | | | | | | | | | | | | Note that the default value for fRelayTxes is false, meaning we now no longer relay tx inv messages before receiving the remote peer's version message.
* | | Relay CMerkleBlocks when asked for MSG_FILTERED_BLOCKMatt Corallo2013-01-161-2/+24
| | |
* | | Add a CMerkleBlock to store merkle branches of filtered txes.Matt Corallo2013-01-161-0/+23
| | |
* | | Replace RelayMessage with RelayTransaction.Matt Corallo2013-01-161-2/+2
| | |
* | | Add a filter field in CNode, add filterload+filteradd+filterclearMatt Corallo2013-01-161-0/+45
| |/ |/|
* | Merge pull request #2161 from sipa/noclientGavin Andresen2013-01-141-30/+13
|\ \ | | | | | | Remove fClient
| * | Remove fClientPieter Wuille2013-01-091-30/+13
| |/ | | | | | | | | | | | | | | | | | | Client (SPV) mode never got implemented entirely, and whatever part was already working, is likely not been tested (or even executed at all) for the past two years. This removes it entirely. If we want an SPV implementation, I think we should first get the block chain data structures to be encapsulated in a class implementing a standard interface, and then writing an alternate implementation with SPV semantics.
* | Merge pull request #2145 from sipa/checkcoinsGregory Maxwell2013-01-111-37/+89
|\ \ | | | | | | Coin database checks
| * | New database check routinePieter Wuille2013-01-041-12/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -checklevel gets a new meaning: 0: verify blocks can be read from disk (like before) 1: verify (contextless) block validity (like before) 2: verify undo files can be read and have good checksums 3: verify coin database is consistent with the last few blocks (close to level 6 before) 4: verify all validity rules of the last few blocks Level 3 is the new default, as it's reasonably fast. As level 3 and 4 are implemented using an in-memory rollback of the database, they are limited to as many blocks as possible without exceeding the limits set by -dbcache. The default of -dbcache=25 allows for some 150-200 blocks to be rolled back. In case an error is found, the application quits with a message instructing the user to restart with -reindex. Better instructions, and automatic recovery (when possible) or automatic reindexing are left as future work.
| * | Add checksums to undo dataPieter Wuille2013-01-031-15/+7
| | | | | | | | | | | | This should be compatible with older code that didn't write checksums.
| * | Make DisconnectBlock fault-tolerantPieter Wuille2013-01-031-18/+37
| | |
* | | Merge pull request #2115 from forrestv/getblocktemplate_allfeesPieter Wuille2013-01-101-10/+18
|\ \ \ | |_|/ |/| | Provide fee data for all txs in RPC getblocktemplate response
| * | changed CreateNewBlock to return a CBlockTemplate object, which includes ↵Forrest Voight2012-12-191-10/+18
| | | | | | | | | | | | per-tx fee and sigop count data
* | | Bitcoin-Qt: never display own block count > estimated block countPhilip Kaufmann2013-01-041-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | - some users reported it as weird, that the estimated block count could be lower than our own nodes block number (which is indeed true and not good) - this pull adds a new default behaviour, which displays our own block number as estimated block number, if own >= est. block count - the pull raises space for nodes block counts in cPeerBlockCounts to 8 to be more accurate - also removes a reduntant setNumBlocks() call in RPCConsole and moves initialisation of numBlocksAtStartup in ClientModel, where it belongs
* | Remove 'T' from remaining date/time format strings.Jeff Garzik2013-01-011-5/+5
|/
* Merge pull request #2096 from 94m3k1n9/fix-time-formatsPieter Wuille2012-12-131-5/+5
|\ | | | | Change timestamps to use ISO8601 formatting
| * Change timestamps to use ISO8601 formattingRichard Schwab2012-12-121-5/+5
| |
* | Merge pull request #2059 from sipa/benchmarkGavin Andresen2012-12-121-0/+20
|\ \ | | | | | | Add -benchmark for reporting block processing times