aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2013-05-22More bestblock records in walletsPieter Wuille
Write bestblock records in wallets: * Every 20160 blocks synced, no matter what (before: none during IBD) * Every 144 blocks after IBD (before: for every block, slow) * When creating a new wallet * At shutdown This should result in far fewer spurious rescans.
2013-05-21CreateNewBlock performance improvementsPieter Wuille
2013-05-04Merge pull request #2577 from gavinandresen/fee_bandaidGavin Andresen
Treat dust outputs as non-standard, un-hardcode TX_FEE constants
2013-05-03Un-hardcode TX_FEE constantsGavin Andresen
Allow setting of MIN_TX_FEE / MIN_RELAY_TX_FEE with -mintxfee / -mintxrelayfee Default values are the same (0.0001 BTC).
2013-05-03Define dust transaction outputs, and make them non-standardGavin Andresen
2013-04-25Allow the default key to be unavailablePieter Wuille
This solves the issue where no default key can be added after -salvagewallet.
2013-04-18Do not invoke DoS for non-canonical sigsPieter Wuille
2013-04-14Require strictly-standard encodings in mempoolPieter Wuille
2013-04-12Use a uint256 for bnChainWorkPieter Wuille
Every block index entry currently requires a separately-allocated CBigNum. By replacing them with uint256, it's just 32 bytes extra in CBlockIndex itself. This should save us a few megabytes in RAM, and less allocation overhead.
2013-04-09Merge pull request #2478 from sipa/fullhashGavin Andresen
Always print full hashes (tx, block, inv)
2013-04-07Make sure we always have a node to do IBD fromPieter Wuille
This introduces the concept of the 'sync node', which is the one we asked for missing blocks. In case the sync node goes away, a new one will be selected. For now, the heuristic is very simple, but it can easily be extended later to add better policies.
2013-04-07Always print full hashes (tx, block, inv)Pieter Wuille
2013-04-06small indentation, space, formatting fixes (no code changes)Philip Kaufmann
2013-04-03Merge pull request #2423 from TheBlueMatt/limitedmapalreadyaskedforGavin Andresen
Limited mapAlreadyAskedFor
2013-04-03Merge pull request #2357 from gavinandresen/shutdowncleanupGavin Andresen
Thread / shutdown cleanup
2013-04-03Merge pull request #2453 from sipa/txstatsGavin Andresen
Update transaction statistics
2013-04-04Update transaction statisticsPieter Wuille
As these were not updated when 'backporting' the 225430 checkpoint into head. Additionally, also report verification progress in debug.log, and tweak the sigcheck-verification-speed-factor a bit.
2013-04-03Clean up shutdown processGavin Andresen
2013-04-03Port Thread* methods to boost::thread_groupGavin Andresen
2013-04-03Rename util.h Sleep --> MilliSleepGavin Andresen
Two reasons for this change: 1. Need to always use boost::thread's sleep, even on Windows, so the sleeps can be interrupted (prior code used Windows' built-in Sleep). 2. I always forgot what units the old Sleep took.
2013-04-03Shutdown cleanup prep-workGavin Andresen
Create a boost::thread_group object at the qt/bitcoind main-loop level that will hold pointers to all the main-loop threads. This will replace the vnThreadsRunning[] array. For testing, ported the BitcoinMiner threads to use its own boost::thread_group.
2013-04-02Merge pull request #2420 from sipa/globcleanGavin Andresen
Global cleanups
2013-04-01Revert "Actually use mapAlreadyAskedFor."Matt Corallo
This reverts commit 643160f6e7e5e8ca84bc7d2c1a0f37d9cf43a6e1. Turns out this commit was useless after a more careful reading of CNode::AskFor
2013-03-30Process getdata invs separately until send buffer overflowsPieter Wuille
There exists a per-message-processed send buffer overflow protection, where processing is halted when the send buffer is larger than the allowed maximum. This protection does not apply to individual items, however, and getdata has the potential for causing large amounts of data to be sent. In case several hundreds of blocks are requested in one getdata, the send buffer can easily grow 50 megabytes above the send buffer limit. This commit breaks up the processing of getdata requests, remembering them inside a CNode when too many are requested at once.
2013-03-29Use per-message send buffer, rather than per connectionPieter Wuille
2013-03-29Some fixes to CNetMessage processingPieter Wuille
* Change CNode::vRecvMsg to be a deque instead of a vector (less copying) * Make sure to acquire cs_vRecvMsg in CNode::CloseSocketDisconnect (as it may be called without that lock).
2013-03-29P2P: parse network datastream into header/data components in socket threadJeff Garzik
Replaces CNode::vRecv buffer with a vector of CNetMessage's. This simplifies ProcessMessages() and eliminates several redundant data copies. Overview: * socket thread now parses incoming message datastream into header/data components, as encapsulated by CNetMessage * socket thread adds each CNetMessage to a vector inside CNode * message thread (ProcessMessages) iterates through CNode's CNetMessage vector Message parsing is made more strict: * Socket is disconnected, if message larger than MAX_SIZE or if CMessageHeader deserialization fails (latter is impossible?). Previously, code would simply eat garbage data all day long. * Socket is disconnected, if we fail to find pchMessageStart. We do not search through garbage, to find pchMessageStart. Each message must begin precisely after the last message ends. ProcessMessages() always processes a complete message, and is more efficient: * buffer is always precisely sized, using CDataStream::resize(), rather than progressively sized in 64k chunks. More efficient for large messages like "block". * whole-buffer memory copy eliminated (vRecv -> vMsg) * other buffer-shifting memory copies eliminated (vRecv.insert, vRecv.erase)
2013-03-29Clean up global datastructures at shutdown.Pieter Wuille
This should make detecting leaks much easier.
2013-03-17Before 15 May, limit created block size to 500KGavin Andresen
2013-03-17CheckBlock rule until 15-May for 10,000 BDB lock compatibilityGavin Andresen
2013-02-23Merge pull request #2186 from Diapolo/misc_stuffWladimir J. van der Laan
small changes in init, main, checkpoints.h and bitcoin-qt.pro
2013-02-22Merge pull request #2221 from sipa/perfoGavin Andresen
Various performance tweaks to CCoinsView
2013-02-22Merge pull request #2229 from sipa/preallocGavin Andresen
Native versions for AllocateFileRange()
2013-02-20small changes in init, main, checkpoints.h and bitcoin-qt.proPhilip Kaufmann
- remove an unneeded MODAL flag, as MSG_ERROR sets MODAL - re-order an if-clause in main to have bool checks before a function call - fix some log messages that used wrong function names - make a log message use a correct ellipsis - remove some unneded spaces, brackets and line-breaks - fix style for adding files in the Qt project
2013-02-17Improve block database load error reportingPieter Wuille
2013-02-06Merge pull request #2279 from sipa/cvrbip30Gavin Andresen
Bugfix CValidationResult for BIP30 + add DoS
2013-02-06Bugfix CValidationResult for BIP30 + add DoSPieter Wuille
2013-02-05Do not call ResendWalletTransactions when reindexing, importing or on IBDRubén Darío Ponticelli
Calling ResendWalletTransactions when reindexing, importing or on IBD spams other nodes with our old transactions, because they become unconfirmed.
2013-02-05Merge branch 'reindexgen' of git://github.com/sipa/bitcoinGavin Andresen
2013-02-05Merge pull request #2273 from gavinandresen/txsizeGavin Andresen
Make transactions larger than 100K non-standard
2013-02-05Make transactions larger than 100K non-standardGavin Andresen
Extremely large transactions with lots of inputs can cost the network almost as much to process as they cost the sender in fees. We would never create transactions larger than 100K big; this change makes transactions larger than 100K non-standard, so they are not relayed/mined by default. This is most important for miners that might create blocks larger than 250K big, who could be vulnerable to a make-your-blocks-so-expensive-to-verify-they-get-orphaned attack.
2013-02-01Make sure the genesis block is present after reindexPieter Wuille
2013-01-31Bugfix: Enable ConnectBestBlock to properly report back validation problems, ↵Luke Dashjr
and ensure orphan processing (when their parents are found) cannot be used to counter-DDoS the node providing the parent Also fix a minor typo
2013-01-30Drop padding in blk* when finalizing filePieter Wuille
2013-01-29Merge pull request #2224 from sipa/valstateGavin Andresen
Improve error handling during validation
2013-01-30Deal with LevelDB errorsPieter Wuille
2013-01-29Fix two clang3.3 warningsGavin Andresen
2013-01-30Improve dealing with abort conditionsPieter Wuille
2013-01-30Add disk space checks before flushing CCoins cachePieter Wuille
2013-01-30Treat coinbase value violation as DoSPieter Wuille